Documentation ¶
Index ¶
- type Registry
- func (r *Registry) Deregister(_ context.Context, svcIns *registry.ServiceInstance) error
- func (r *Registry) GetService(_ context.Context, serviceName string) ([]*registry.ServiceInstance, error)
- func (r *Registry) Register(_ context.Context, svcIns *registry.ServiceInstance) error
- func (r *Registry) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)
- type RegistryClient
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is servicecomb registry.
func NewRegistry ¶
func NewRegistry(client RegistryClient) *Registry
func (*Registry) Deregister ¶
func (*Registry) GetService ¶
type RegistryClient ¶
type RegistryClient interface { GetMicroServiceID(appID, microServiceName, version, env string, opts ...sc.CallOption) (string, error) FindMicroServiceInstances(consumerID, appID, microServiceName, versionRule string, opts ...sc.CallOption) ([]*discovery.MicroServiceInstance, error) RegisterService(microService *discovery.MicroService) (string, error) RegisterMicroServiceInstance(microServiceInstance *discovery.MicroServiceInstance) (string, error) Heartbeat(microServiceID, microServiceInstanceID string) (bool, error) UnregisterMicroServiceInstance(microServiceID, microServiceInstanceID string) (bool, error) WatchMicroService(microServiceID string, callback func(*sc.MicroServiceInstanceChangedEvent)) error }
Click to show internal directories.
Click to hide internal directories.