Documentation ¶
Index ¶
Constants ¶
View Source
const ( PROTOCOL_HTTP = "http://" PROTOCOL_HTTPS = "https://" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶
type ClientOptions struct { TimeoutMs uint64 //timeout for requesting Nacos server, default value is 10000ms BeatInterval int64 //the time interval for sending beat to server,default value is 5000ms NamespaceId string //the namespaceId of Nacos AppName string //the appName Endpoint string //the endpoint for get Nacos server addresses RegionId string //the regionId for kms AccessKey string //the AccessKey for kms SecretKey string //the SecretKey for kms OpenKMS bool //it's to open kms,default is false. https://help.aliyun.com/product/28933.html CacheDir string //the directory for persist nacos service info,default value is current path UpdateThreadNum int //the number of gorutine for update nacos service info,default value is 20 NotLoadCacheAtStart bool //not to load persistent nacos service info in CacheDir at start time UpdateCacheWhenEmpty bool //update cache when get empty service instance from server Username string //the username for nacos auth Password string //the password for nacos auth LogDir string //the directory for log, default is current path RotateTime string //the rotate time for log, eg: 30m, 1h, 24h, default is 24h MaxAge int64 //the max age of a log file, default value is 3 LogLevel string //the level of log, it's must be debug,info,warn,error, default value is info ContextPath string //the nacos server contextpath }
type IRegistry ¶
type IRegistry interface { RegisterInstance() error Shutdown() Subscribe(serviceName string) error GetInstance(serviceName string) *Instance SelectInstances(serviceName string) ([]*Instance, error) }
var RegistryCenter IRegistry
type Options ¶
type Options struct { ServerAddrs []string ClientOptions ClientOptions RegistryOptions RegistryOptions }
Click to show internal directories.
Click to hide internal directories.