NacosClientInit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(opts *Options) error

RegisterService register service to nacos

Types

type Option

type Option func(*Options)

func WithCluster

func WithCluster(cluster string) Option

func WithGroup

func WithGroup(group string) Option

func WithMetadata

func WithMetadata(metadata map[string]string) Option

func WithPrefix

func WithPrefix(prefix string) Option

func WithWeight

func WithWeight(weight float64) Option

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

Jump to

Keyboard shortcuts

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