grpc

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds flags for Options.

Types

type ConnBuilder

type ConnBuilder struct {
	// GatewayHostPorts is list of host:port Clymene Gates.
	GatewayHostPorts []string `yaml:"gatewayHostPorts"`

	MaxRetry uint
	TLS      tlscfg.Options

	DiscoveryMinPeers int
	Notifier          discovery.Notifier
	Discoverer        discovery.Discoverer
}

ConnBuilder Struct to hold configurations

func NewConnBuilder

func NewConnBuilder() ConnBuilder

NewConnBuilder creates a new grpc connection builder.

func (*ConnBuilder) CreateConnection

func (b *ConnBuilder) CreateConnection(logger *zap.Logger) (*grpc.ClientConn, error)

CreateConnection creates the gRPC connection

func (*ConnBuilder) InitFromViper

func (b *ConnBuilder) InitFromViper(v *viper.Viper) *ConnBuilder

InitFromViper initializes Options with properties retrieved from Viper.

Jump to

Keyboard shortcuts

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