Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCreateEndpoint = errors.New("cannot create endpoint") ErrNoConnections = errors.New("no alive connections available") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Logger logger.Logger EndpointsProvider EndpointsProvider Auth transport.Authenticator TransportCredentials credentials.TransportCredentials DB string InitNodes []string Balancer balancer.Config }
type Dynamic ¶ added in v0.0.2
type Dynamic struct {
// contains filtered or unexported fields
}
Dynamic is a dispatcher that provides dynamic transport layer by gluing together endpoints provider and balancer.
It uses provider's announces to populate balancing grid, and acts as grpc transport.
func NewDynamic ¶ added in v0.0.2
func (*Dynamic) Transport ¶ added in v0.0.2
func (d *Dynamic) Transport() grpc.ClientConnInterface
type EndpointsProvider ¶
type Static ¶ added in v0.0.2
type Static struct {
// contains filtered or unexported fields
}
func NewStatic ¶ added in v0.0.2
func NewStatic( ctx context.Context, endpoints []string, creds credentials.TransportCredentials, auth transport.Authenticator, db string, ) (*Static, error)
NewStatic provides transport layer with fixed endpoints.
func (*Static) Transport ¶ added in v0.0.2
func (s *Static) Transport() grpc.ClientConnInterface
Click to show internal directories.
Click to hide internal directories.