Documentation ¶
Index ¶
- Constants
- type Spec
- type Status
- type ZookeeperServiceRegistry
- func (zk *ZookeeperServiceRegistry) ApplyServiceInstances(serviceInstances map[string]*serviceregistry.ServiceInstanceSpec) error
- func (zk *ZookeeperServiceRegistry) Category() supervisor.ObjectCategory
- func (zk *ZookeeperServiceRegistry) Close()
- func (zk *ZookeeperServiceRegistry) DefaultSpec() interface{}
- func (zk *ZookeeperServiceRegistry) DeleteServiceInstances(serviceInstances map[string]*serviceregistry.ServiceInstanceSpec) error
- func (zk *ZookeeperServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)
- func (zk *ZookeeperServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
- func (zk *ZookeeperServiceRegistry) Init(superSpec *supervisor.Spec)
- func (zk *ZookeeperServiceRegistry) Kind() string
- func (zk *ZookeeperServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)
- func (zk *ZookeeperServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)
- func (zk *ZookeeperServiceRegistry) Name() string
- func (zk *ZookeeperServiceRegistry) Notify() <-chan *serviceregistry.RegistryEvent
- func (zk *ZookeeperServiceRegistry) Status() *supervisor.Status
Constants ¶
const ( // Category is the category of ZookeeperServiceRegistry. Category = supervisor.CategoryBusinessController // Kind is the kind of ZookeeperServiceRegistry. Kind = "ZookeeperServiceRegistry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spec ¶
type Spec struct { ConnTimeout string `yaml:"conntimeout" jsonschema:"required,format=duration"` ZKServices []string `yaml:"zkservices" jsonschema:"required,uniqueItems=true"` Prefix string `yaml:"prefix" jsonschema:"required,pattern=^/"` SyncInterval string `yaml:"syncInterval" jsonschema:"required,format=duration"` }
Spec describes the ZookeeperServiceRegistry.
type Status ¶
type Status struct { Health string `yaml:"health"` ServiceInstancesNum map[string]int `yaml:"serviceInstancesNum"` }
Status is the status of ZookeeperServiceRegistry.
type ZookeeperServiceRegistry ¶
type ZookeeperServiceRegistry struct {
// contains filtered or unexported fields
}
ZookeeperServiceRegistry is Object ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) ApplyServiceInstances ¶
func (zk *ZookeeperServiceRegistry) ApplyServiceInstances(serviceInstances map[string]*serviceregistry.ServiceInstanceSpec) error
ApplyServiceInstances applies service instances to the registry.
func (*ZookeeperServiceRegistry) Category ¶
func (zk *ZookeeperServiceRegistry) Category() supervisor.ObjectCategory
Category returns the category of ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) Close ¶
func (zk *ZookeeperServiceRegistry) Close()
Close closes ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) DefaultSpec ¶
func (zk *ZookeeperServiceRegistry) DefaultSpec() interface{}
DefaultSpec returns the default spec of ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) DeleteServiceInstances ¶
func (zk *ZookeeperServiceRegistry) DeleteServiceInstances(serviceInstances map[string]*serviceregistry.ServiceInstanceSpec) error
DeleteServiceInstances applies service instances to the registry.
func (*ZookeeperServiceRegistry) GetServiceInstance ¶
func (zk *ZookeeperServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)
GetServiceInstance get service instance from the registry.
func (*ZookeeperServiceRegistry) Inherit ¶
func (zk *ZookeeperServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) Init ¶
func (zk *ZookeeperServiceRegistry) Init(superSpec *supervisor.Spec)
Init initializes ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) Kind ¶
func (zk *ZookeeperServiceRegistry) Kind() string
Kind returns the kind of ZookeeperServiceRegistry.
func (*ZookeeperServiceRegistry) ListAllServiceInstances ¶
func (zk *ZookeeperServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)
ListAllServiceInstances list all service instances from the registry.
func (*ZookeeperServiceRegistry) ListServiceInstances ¶
func (zk *ZookeeperServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)
ListServiceInstances list service instances of one service from the registry.
func (*ZookeeperServiceRegistry) Name ¶
func (zk *ZookeeperServiceRegistry) Name() string
Name returns name.
func (*ZookeeperServiceRegistry) Notify ¶
func (zk *ZookeeperServiceRegistry) Notify() <-chan *serviceregistry.RegistryEvent
Notify returns notify channel.
func (*ZookeeperServiceRegistry) Status ¶
func (zk *ZookeeperServiceRegistry) Status() *supervisor.Status
Status returns status of EurekaServiceRegister.