eserviceregistry

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Category is the category of EtcdServiceRegistry.
	Category = supervisor.CategoryBusinessController

	// Kind is the kind of EtcdServiceRegistry.
	Kind = "EtcdServiceRegistry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdServiceRegistry

type EtcdServiceRegistry struct {
	// contains filtered or unexported fields
}

EtcdServiceRegistry is Object EtcdServiceRegistry.

func (*EtcdServiceRegistry) ApplyServiceInstances

func (e *EtcdServiceRegistry) ApplyServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error

ApplyServiceInstances applies service instances to the registry.

func (*EtcdServiceRegistry) Category

Category returns the category of EtcdServiceRegistry.

func (*EtcdServiceRegistry) Close

func (e *EtcdServiceRegistry) Close()

Close closes EtcdServiceRegistry.

func (*EtcdServiceRegistry) DefaultSpec

func (e *EtcdServiceRegistry) DefaultSpec() interface{}

DefaultSpec returns the default spec of EtcdServiceRegistry.

func (*EtcdServiceRegistry) DeleteServiceInstances

func (e *EtcdServiceRegistry) DeleteServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error

DeleteServiceInstances applies service instances to the registry.

func (*EtcdServiceRegistry) GetServiceInstance

func (e *EtcdServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)

GetServiceInstance get service instance from the registry.

func (*EtcdServiceRegistry) Inherit

func (e *EtcdServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)

Inherit inherits previous generation of EtcdServiceRegistry.

func (*EtcdServiceRegistry) Init

func (e *EtcdServiceRegistry) Init(superSpec *supervisor.Spec)

Init initializes EtcdServiceRegistry.

func (*EtcdServiceRegistry) Kind

func (e *EtcdServiceRegistry) Kind() string

Kind returns the kind of EtcdServiceRegistry.

func (*EtcdServiceRegistry) ListAllServiceInstances

func (e *EtcdServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)

ListAllServiceInstances list all service instances from the registry.

func (*EtcdServiceRegistry) ListServiceInstances

func (e *EtcdServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)

ListServiceInstances list service instances of one service from the registry.

func (*EtcdServiceRegistry) Name

func (e *EtcdServiceRegistry) Name() string

Name returns name.

func (*EtcdServiceRegistry) Notify

Notify returns notify channel.

func (*EtcdServiceRegistry) Status

func (e *EtcdServiceRegistry) Status() *supervisor.Status

Status returns status of EtcdServiceRegister.

type Spec

type Spec struct {
	Endpoints    []string `yaml:"endpoints" jsonschema:"required,uniqueItems=true"`
	Prefix       string   `yaml:"prefix" jsonschema:"required,pattern=^/"`
	CacheTimeout string   `yaml:"cacheTimeout" jsonschema:"required,format=duration"`
}

Spec describes the EtcdServiceRegistry.

type Status

type Status struct {
	Health              string         `yaml:"health"`
	ServiceInstancesNum map[string]int `yaml:"instancesNum"`
}

Status is the status of EtcdServiceRegistry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL