Documentation ¶
Index ¶
- Constants
- Variables
- func NewAgentServiceRegistration(service *vo2.Service) *api.AgentServiceRegistration
- type ConsulRegistry
- func (c *ConsulRegistry) Get(ctx context.Context, service *vo2.Service) ([]*vo2.Service, error)
- func (c *ConsulRegistry) Init(ctx context.Context, f func() error) error
- func (c *ConsulRegistry) PluginName() string
- func (c *ConsulRegistry) Register(ctx context.Context, service *vo2.Service) error
- func (c *ConsulRegistry) SubscribeService(ctx context.Context, service *vo2.Service) error
- func (c *ConsulRegistry) UnRegister(ctx context.Context, service *vo2.Service) error
Constants ¶
View Source
const RegistryName = "consul"
Variables ¶
View Source
var ConsulNotFoundErr = errors.New("The client could not be found")
View Source
var ConsulRegistionErr = errors.New("Registion failed")
View Source
var NacosDeregistionErr = errors.New("Deregistion failed")
View Source
var NacosGetServiceErr = errors.New("Nacos get services failed")
View Source
var NacosParamErr = errors.New("Registion failed")
View Source
var NacosSubscribeErr = errors.New("Nacos subscription failed")
View Source
var NacosUnsubscribeErr = errors.New("Nacos Unsubscription failed")
View Source
var NacosWeightErr = errors.New("Weight must be lager than 0")
Functions ¶
func NewAgentServiceRegistration ¶
func NewAgentServiceRegistration(service *vo2.Service) *api.AgentServiceRegistration
create agentService
Types ¶
type ConsulRegistry ¶
func (*ConsulRegistry) Init ¶
func (c *ConsulRegistry) Init(ctx context.Context, f func() error) error
func (*ConsulRegistry) PluginName ¶
func (c *ConsulRegistry) PluginName() string
func (*ConsulRegistry) SubscribeService ¶
subscribe Service
func (*ConsulRegistry) UnRegister ¶
unregister base
Click to show internal directories.
Click to hide internal directories.