Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceStrategy ¶
type BalanceStrategy string
const ( RandomBalance BalanceStrategy = "random" RoundRobinBalance BalanceStrategy = "rr" )
type ClientEndpointConf ¶
type ClientEndpointConf struct {
Node *NodeContext
Factory sd.Factory
InstancerDisabled bool
InstancerService string
InstancerTags []string
// Health only
InstancerPassingOnly bool
EndpointerOptions []sd.EndpointerOption
BalancerStrategy BalanceStrategy
RandomBalancerSeed int64
RetryMax int
RetryTimeout time.Duration
RetryCallback lb.Callback
}
type ClientEndpointContext ¶
type ClientEndpointContext struct {
Endpoint endpoint.Endpoint
Endpointer sd.Endpointer
Instancer sd.Instancer
Balancer lb.Balancer
ConsulInstancer *consulsd.Instancer
}
func MakeClientEndpointContext ¶
func MakeClientEndpointContext(conf ClientEndpointConf) (*ClientEndpointContext, error)
type Logger ¶
type NodeContext ¶
type NodeContext struct {
Logger log.Logger
ConsulClient *consulapi.Client
ConsulSdClient consulsd.Client
}
func MakeNodeContext ¶
func MakeNodeContext(conf NodeConf) (*NodeContext, error)
func MustMakeNodeContext ¶
func MustMakeNodeContext(conf NodeConf) *NodeContext
type ServiceEndpointConf ¶
type ServiceEndpointConf struct {
Node *NodeContext
ConsulService *consulapi.AgentServiceRegistration
}
type ServiceEndpointContext ¶
func MakeServiceEndpointContext ¶
func MakeServiceEndpointContext(conf ServiceEndpointConf) (*ServiceEndpointContext, error)
Click to show internal directories.
Click to hide internal directories.