Documentation
¶
Index ¶
- type Component
- func (reg *Component) Close() error
- func (reg *Component) ListServices(ctx context.Context, t eregistry.Target) (services []*server.ServiceInfo, err error)
- func (reg *Component) RegisterService(ctx context.Context, info *server.ServiceInfo) error
- func (reg *Component) SyncServices(context.Context, eregistry.SyncServicesOptions) error
- func (reg *Component) UnregisterService(ctx context.Context, info *server.ServiceInfo) error
- func (reg *Component) WatchServices(ctx context.Context, t eregistry.Target) (chan eregistry.Endpoints, error)
- type Config
- type Container
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Config *Config // contains filtered or unexported fields }
func (*Component) ListServices ¶
func (reg *Component) ListServices(ctx context.Context, t eregistry.Target) (services []*server.ServiceInfo, err error)
ListServices list service registered in registry with name `name`
func (*Component) RegisterService ¶
RegisterService register service to registry
func (*Component) SyncServices ¶ added in v0.2.0
func (*Component) UnregisterService ¶
UnregisterService unregister service from registry
type Config ¶
type Config struct { Scheme string // 协议 Prefix string // 注册前缀 ReadTimeout time.Duration // 读超时 ServiceTTL time.Duration // 服务续期 OnFailHandle string // 错误后处理手段,panic,error }
Config Registry配置
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func DefaultContainer ¶
func DefaultContainer() *Container
Click to show internal directories.
Click to hide internal directories.