Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(pctx context.Context, conf Config, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Dial returns a new gRPC ClientConn with some default dial and call options set
func PerRPCPassword ¶
func PerRPCPassword(user, password string) grpc.DialOption
PerRPCPassword returns a new gRPC DialOption which includes a basic auth. password header in each RPC request.
Types ¶
type Config ¶
type Config struct { User string Password string ServerAddress string // The timeout to use for making RPC client connections in nanoseconds // This timeout is Only enforced when used in conjunction with the // grpc.WithBlock dial option. Timeout duration.Duration // The maximum number of times that a request will be retried for failures. // Time between retries follows an exponential backoff starting at 5 seconds // up to 1 minute MaxRetries uint }
Config describes configuration for gRPC clients
func ConfigWithDefaults ¶
ConfigWithDefaults returns a gRPC client config with default values set
Click to show internal directories.
Click to hide internal directories.