Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeregisterServiceOptions ¶
type DeregisterServiceOptions struct { Ip string // the IP of the service instance Port uint64 // the port of the service instance listened ClusterName string // optional, default is DEFAULT ServiceName string // the name of the service GroupName string // optional, default is DEFAULT_GROUP }
DeregisterServiceOptions The options of deregister a service instance
func (*DeregisterServiceOptions) GetDeregisterInstanceParam ¶
func (drso *DeregisterServiceOptions) GetDeregisterInstanceParam() *vo.DeregisterInstanceParam
type NacosClientOptions ¶
type NacosClientOptions struct { NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` // optional AppName string `json:"appName" yaml:"appName"` // require, the application name of the client Username string `json:"username,omitempty" yaml:"username,omitempty"` // optional Password string `json:"password,omitempty" yaml:"password,omitempty"` // optional }
NacosClientOptions The options of the Nacos client
type NacosOptions ¶
type NacosOptions struct { Server NacosServerOptions `json:"server" yaml:"server"` Client NacosClientOptions `json:"client" yaml:"client"` }
NacosOptions The options to connect Nacos server
func GetNacosOptionsByEnv ¶
func GetNacosOptionsByEnv() (*NacosOptions, error)
GetNacosOptionsByEnv Get the Nacos server connection options through the environment variable
func (*NacosOptions) GetNacosClientParam ¶ added in v1.2.0
func (no *NacosOptions) GetNacosClientParam() *vo.NacosClientParam
type NacosServerOptions ¶
type NacosServerOptions struct { Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` // optional ContextPath string `json:"contextPath,omitempty" yaml:"contextPath,omitempty"` // optional IpAddr string `json:"ipAddr" yaml:"ipAddr"` // require, the IP or hostname of the Nacos server Port uint64 `json:"port" yaml:"port"` // require, the port of the Nacos server listened }
NacosServerOptions The options of the Nacos server
type RegisterServiceOptions ¶
type RegisterServiceOptions struct { Ip string `json:"ip" yaml:"ip"` // The IP address or host name that the service instance is bound to Port uint64 `json:"port" yaml:"port"` // The port that the service instance listened Weight float64 `json:"weight,omitempty" yaml:"weight,omitempty"` // Weight of the call, default is 10 Metadata map[string]string `json:"metadata,omitempty" yaml:"metadata,omitempty"` // The metadata of the service instance ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` // The cluster name of the service instance, default is DEFAULT ServiceName string `json:"serviceName" yaml:"serviceName"` // The name of the service GroupName string `json:"groupName,omitempty" yaml:"groupName,omitempty"` // The group name of the service instance, default is DEFAULT_GROUP }
RegisterServiceOptions The options to register a service instance
func (*RegisterServiceOptions) GetRegisterInstanceParam ¶
func (rso *RegisterServiceOptions) GetRegisterInstanceParam() *vo.RegisterInstanceParam
type SelectServiceInstanceOptions ¶
type SelectServiceInstanceOptions struct { Clusters []string // The cluster name of the service instances ServiceName string // The name of the service GroupName string // The group name of the service instances }
SelectServiceInstanceOptions The options for select the service instance
func (*SelectServiceInstanceOptions) GetServiceParam ¶
func (ssio *SelectServiceInstanceOptions) GetServiceParam() vo.GetServiceParam
func (*SelectServiceInstanceOptions) SelectInstancesParam ¶
func (ssio *SelectServiceInstanceOptions) SelectInstancesParam() vo.SelectInstancesParam
func (*SelectServiceInstanceOptions) SelectOneHealthInstanceParam ¶
func (ssio *SelectServiceInstanceOptions) SelectOneHealthInstanceParam() vo.SelectOneHealthInstanceParam
type SubscribeServiceInstanceOptions ¶ added in v1.1.0
type SubscribeServiceInstanceOptions struct { Clusters []string // The cluster name of the service instances ServiceName string // The name of the service GroupName string // The group name of the service instances SubscribeCallback func(*model.Instance, error) }
func (*SubscribeServiceInstanceOptions) GetSelectServiceInstanceOptions ¶ added in v1.1.0
func (ssio *SubscribeServiceInstanceOptions) GetSelectServiceInstanceOptions() *SelectServiceInstanceOptions
func (*SubscribeServiceInstanceOptions) GetSubscribeParam ¶ added in v1.1.0
func (ssio *SubscribeServiceInstanceOptions) GetSubscribeParam(callback func([]model.SubscribeService, error)) *vo.SubscribeParam
Click to show internal directories.
Click to hide internal directories.