Documentation ¶
Index ¶
- func NewWatcher(ctx context.Context, cancel context.CancelFunc, out chan<- []string) *watcher
- func PopulateEndpoints(ctx context.Context, clientConn resolver.ClientConn, input <-chan []string)
- func RegisterService(opts *Options) error
- func UpdateState(clientConn resolver.ClientConn, addresses []string)
- type ByAddressString
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWatcher ¶
func NewWatcher(ctx context.Context, cancel context.CancelFunc, out chan<- []string) *watcher
func PopulateEndpoints ¶
func PopulateEndpoints(ctx context.Context, clientConn resolver.ClientConn, input <-chan []string)
func RegisterService ¶
RegisterService register service to nacos
func UpdateState ¶
func UpdateState(clientConn resolver.ClientConn, addresses []string)
Types ¶
type ByAddressString ¶
ByAddressString sorts resolver.Address by Address Field sorting in increasing order.
func (ByAddressString) Len ¶
func (p ByAddressString) Len() int
func (ByAddressString) Less ¶
func (p ByAddressString) Less(i, j int) bool
func (ByAddressString) Swap ¶
func (p ByAddressString) Swap(i, j int)
type Options ¶
type Options struct { ListenOn string ServiceName string Prefix string Weight float64 Cluster string Group string Metadata map[string]string ServerConfig []constant.ServerConfig ClientConfig *constant.ClientConfig }
options
func NewNacosConfig ¶
func NewNacosConfig(serviceName, listenOn string, sc []constant.ServerConfig, cc *constant.ClientConfig, opts ...Option) *Options
Click to show internal directories.
Click to hide internal directories.