Documentation ¶
Index ¶
- type Registry
- func (r *Registry) AddInstance(name string, instances ...*model.ServiceInstance)
- func (r *Registry) DeleteInstance(name string, instances ...*model.ServiceInstance)
- func (r *Registry) Deregister(name string) bool
- func (r *Registry) Get(name string) (*model.Service, error)
- func (r *Registry) List() ([]string, error)
- func (r *Registry) Register(service *model.Service)
- func (r *Registry) Run(ctx context.Context)
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 an implementation of model.ServiceRegistry.
func NewRegistry ¶
NewRegistry creates a memory service registry. NOTE: It is designed for unit tests, all methods aren't goroutine-safe.
func (*Registry) AddInstance ¶
func (r *Registry) AddInstance(name string, instances ...*model.ServiceInstance)
AddInstance adds some instances to the specified service.
func (*Registry) DeleteInstance ¶
func (r *Registry) DeleteInstance(name string, instances ...*model.ServiceInstance)
DeleteInstance deletes some instances from the specified service.
func (*Registry) Deregister ¶
Deregister deregisters a service.
Click to show internal directories.
Click to hide internal directories.