Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdRegistry ¶
type EtcdRegistry struct {
// contains filtered or unexported fields
}
EtcdRegistry lib
func NewEtcdRegistry ¶
func NewEtcdRegistry(etcdEndpoints []string, etcdBasePath string, defaultTimeout time.Duration) (*EtcdRegistry, error)
NewEtcdRegistry EtcdRegistry factory method
func (*EtcdRegistry) GetServiceNodes ¶
func (r *EtcdRegistry) GetServiceNodes(serviceName string) ([]Node, error)
GetServiceNodes returns a list of active service nodes
func (*EtcdRegistry) RegisterNode ¶
func (r *EtcdRegistry) RegisterNode(ctx context.Context, serviceName string, node Node, ttl time.Duration) error
RegisterNode registers a new Node to a service with a TTL. After registration, TTL lease will be kept alive until node is unregistered or process killed
Click to show internal directories.
Click to hide internal directories.