grpc

package
v0.0.0-...-740a631 Latest Latest
Warning

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

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

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, manager.ManagerServiceClient, error)

NewClient creates new manager 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:7001"`
	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