Documentation ¶
Index ¶
- Constants
- type NacosServiceRegistry
- func (n *NacosServiceRegistry) ApplyServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error
- func (n *NacosServiceRegistry) Category() supervisor.ObjectCategory
- func (n *NacosServiceRegistry) Close()
- func (n *NacosServiceRegistry) DefaultSpec() interface{}
- func (n *NacosServiceRegistry) DeleteServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error
- func (n *NacosServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)
- func (n *NacosServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
- func (n *NacosServiceRegistry) Init(superSpec *supervisor.Spec)
- func (n *NacosServiceRegistry) Kind() string
- func (n *NacosServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)
- func (n *NacosServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)
- func (n *NacosServiceRegistry) Name() string
- func (n *NacosServiceRegistry) Notify() <-chan *serviceregistry.RegistryEvent
- func (n *NacosServiceRegistry) Status() *supervisor.Status
- type ServerSpec
- type Spec
- type Status
Constants ¶
const ( // Category is the category of NacosServiceRegistry. Category = supervisor.CategoryBusinessController // Kind is the kind of NacosServiceRegistry. Kind = "NacosServiceRegistry" // MetaKeyRegistryName is the key of service registry name. MetaKeyRegistryName = "RegistryName" // MetaKeyInstanceID is the key of service instance ID. MetaKeyInstanceID = "InstanceID" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NacosServiceRegistry ¶
type NacosServiceRegistry struct {
// contains filtered or unexported fields
}
NacosServiceRegistry is Object NacosServiceRegistry.
func (*NacosServiceRegistry) ApplyServiceInstances ¶
func (n *NacosServiceRegistry) ApplyServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error
ApplyServiceInstances applies service instances to the registry.
func (*NacosServiceRegistry) Category ¶
func (n *NacosServiceRegistry) Category() supervisor.ObjectCategory
Category returns the category of NacosServiceRegistry.
func (*NacosServiceRegistry) Close ¶
func (n *NacosServiceRegistry) Close()
Close closes NacosServiceRegistry.
func (*NacosServiceRegistry) DefaultSpec ¶
func (n *NacosServiceRegistry) DefaultSpec() interface{}
DefaultSpec returns the default spec of NacosServiceRegistry.
func (*NacosServiceRegistry) DeleteServiceInstances ¶
func (n *NacosServiceRegistry) DeleteServiceInstances(instances map[string]*serviceregistry.ServiceInstanceSpec) error
DeleteServiceInstances applies service instances to the registry.
func (*NacosServiceRegistry) GetServiceInstance ¶
func (n *NacosServiceRegistry) GetServiceInstance(serviceName, instanceID string) (*serviceregistry.ServiceInstanceSpec, error)
GetServiceInstance get service instance from the registry.
func (*NacosServiceRegistry) Inherit ¶
func (n *NacosServiceRegistry) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of NacosServiceRegistry.
func (*NacosServiceRegistry) Init ¶
func (n *NacosServiceRegistry) Init(superSpec *supervisor.Spec)
Init initializes NacosServiceRegistry.
func (*NacosServiceRegistry) Kind ¶
func (n *NacosServiceRegistry) Kind() string
Kind returns the kind of NacosServiceRegistry.
func (*NacosServiceRegistry) ListAllServiceInstances ¶
func (n *NacosServiceRegistry) ListAllServiceInstances() (map[string]*serviceregistry.ServiceInstanceSpec, error)
ListAllServiceInstances list all service instances from the registry.
func (*NacosServiceRegistry) ListServiceInstances ¶
func (n *NacosServiceRegistry) ListServiceInstances(serviceName string) (map[string]*serviceregistry.ServiceInstanceSpec, error)
ListServiceInstances list service instances of one service from the registry.
func (*NacosServiceRegistry) Notify ¶
func (n *NacosServiceRegistry) Notify() <-chan *serviceregistry.RegistryEvent
Notify returns notify channel.
func (*NacosServiceRegistry) Status ¶
func (n *NacosServiceRegistry) Status() *supervisor.Status
Status returns status of NacosServiceRegister.
type ServerSpec ¶
type ServerSpec struct { Scheme string `yaml:"scheme" jsonschema:"omitempty,enum=http,enum=https"` ContextPath string `yaml:"contextPath" jsonschema:"omitempty"` IPAddr string `yaml:"ipAddr" jsonschema:"required"` Port uint16 `yaml:"port" jsonschema:"required"` }
ServerSpec is the server config of Nacos.
type Spec ¶
type Spec struct { Servers []*ServerSpec `yaml:"servers" jsonschema:"required"` SyncInterval string `yaml:"syncInterval" jsonschema:"required,format=duration"` Namespace string `yaml:"namespace" jsonschema:"omitempty"` Username string `yaml:"username" jsonschema:"omitempty"` Password string `yaml:"password" jsonschema:"omitempty"` }
Spec describes the NacosServiceRegistry.