Documentation ¶
Index ¶
- Variables
- type EtcdServiceDiscovery
- func (e *EtcdServiceDiscovery) Close(ctx context.Context) error
- func (e *EtcdServiceDiscovery) ServiceDiscovery(ctx context.Context, service string) (chan ItermInfo, error)
- func (e *EtcdServiceDiscovery) ServiceHeartbeat(ctx context.Context) error
- func (e *EtcdServiceDiscovery) ServiceRegister(ctx context.Context) error
- type ItermInfo
- type Operate
- type ServiceDiscoveryConfig
- type ServiceDiscoveryLog
- type ServiceDiscoveryManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLogNil = errors.New("service discovery log nil") ErrServiceAlreadyExists = errors.New("service already exists") )
Functions ¶
This section is empty.
Types ¶
type EtcdServiceDiscovery ¶
type EtcdServiceDiscovery struct {
// contains filtered or unexported fields
}
func NewEtcdServiceDiscovery ¶
func NewEtcdServiceDiscovery(ctx context.Context, serviceDiscoveryConfig ServiceDiscoveryConfig, log ServiceDiscoveryLog) (*EtcdServiceDiscovery, error)
func (*EtcdServiceDiscovery) Close ¶
func (e *EtcdServiceDiscovery) Close(ctx context.Context) error
func (*EtcdServiceDiscovery) ServiceDiscovery ¶
func (*EtcdServiceDiscovery) ServiceHeartbeat ¶
func (e *EtcdServiceDiscovery) ServiceHeartbeat(ctx context.Context) error
func (*EtcdServiceDiscovery) ServiceRegister ¶
func (e *EtcdServiceDiscovery) ServiceRegister(ctx context.Context) error
type ItermInfo ¶
type ItermInfo struct {
// contains filtered or unexported fields
}
func (*ItermInfo) GetOperate ¶
type ServiceDiscoveryConfig ¶
type ServiceDiscoveryLog ¶ added in v1.1.0
type ServiceDiscoveryManager ¶
type ServiceDiscoveryManager interface { // Service registe ServiceRegister(ctx context.Context) error // The ServiceHeartbeat method maintains the // heartbeat behavior of the service and registry ServiceHeartbeat(ctx context.Context) error // If you choose the service discovery method, // you must consume the chan include `ItermInfo` it returns. ServiceDiscovery(ctx context.Context, service string) (chan ItermInfo, error) // Close ServiceDiscoveryManager Close(ctx context.Context) error }
func NewServiceDiscoveryManager ¶
func NewServiceDiscoveryManager(ctx context.Context, serviceDiscoveryConfig ServiceDiscoveryConfig, log ServiceDiscoveryLog) (ServiceDiscoveryManager, error)
Click to show internal directories.
Click to hide internal directories.