grpc

package
v0.0.0-...-4bf80d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package grpc contains the domain concept definitions needed to support Agent Client grpc functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Close closes gRPC connection.
	Close() error

	// Secure is used for pretty printing TLS info.
	Secure() string

	// Connection returns the gRPC connection.
	Connection() *gogrpc.ClientConn
}

func NewClient

func NewClient(cfg Config) (Client, agent.AgentServiceClient, error)

NewClient creates new agent gRPC client instance.

type Config

type Config struct {
	ClientTLS bool          `env:"CLIENT_TLS"    envDefault:"false"`
	CACerts   string        `env:"CA_CERTS"      envDefault:""`
	URL       string        `env:"URL"           envDefault:"localhost:7020"`
	Timeout   time.Duration `env:"TIMEOUT"       envDefault:"60s"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL