Documentation
¶
Index ¶
- type ClientConfig
- type ClientOption
- func WithContextPath(path string) ClientOption
- func WithNamespaceId(namespaceId string) ClientOption
- func WithPassword(password string) ClientOption
- func WithProxy(addr string) ClientOption
- func WithScheme(scheme string) ClientOption
- func WithServerAddr(addr string) ClientOption
- func WithServerPort(num uint64) ClientOption
- func WithServerURL(u string) (ClientOption, error)
- func WithTLSOption(tlsOptions tls.TLSOptions) ClientOption
- func WithUsername(username string) ClientOption
- type ConfigItem
- type ConfigPage
- type ConfigParam
- type ConfigQueryResponse
- type DeleteConfigResponse
- type GetConfigResponse
- type IConfigClient
- type LoginResponse
- type OnChangeFunc
- type PublishConfigResponse
- type SearchConfigParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientOption ¶
type ClientOption func(*ClientConfig)
func WithContextPath ¶
func WithContextPath(path string) ClientOption
func WithProxy ¶
func WithProxy(addr string) ClientOption
func WithScheme ¶
func WithScheme(scheme string) ClientOption
func WithServerAddr ¶
func WithServerAddr(addr string) ClientOption
func WithServerPort ¶
func WithServerPort(num uint64) ClientOption
func WithServerURL ¶
func WithServerURL(u string) (ClientOption, error)
func WithTLSOption ¶
func WithTLSOption(tlsOptions tls.TLSOptions) ClientOption
type ConfigItem ¶
type ConfigPage ¶
type ConfigPage struct { TotalCount int `param:"totalCount"` PageNumber int `param:"pageNumber"` PagesAvailable int `param:"pagesAvailable"` PageItems []ConfigItem `param:"pageItems"` }
type ConfigParam ¶
type ConfigParam struct { DataId string `param:"dataId"` //required Group string `param:"group"` //required Content string `param:"content"` //required Tag string `param:"tag"` AppName string `param:"appName"` Desc string `param:"desc"` Effect string `param:"effect"` BetaIps string `param:"betaIps"` CasMd5 string `param:"casMd5"` Type string `param:"type"` Schema string `param:"schema"` SrcUser string `param:"srcUser"` ConfigTags string `param:"configTags"` OnChange OnChangeFunc }
type ConfigQueryResponse ¶
type DeleteConfigResponse ¶
type GetConfigResponse ¶
type IConfigClient ¶
type IConfigClient interface { // GetConfig use to get config from nacos server // dataId require // group require // tenant ==>nacos.namespace optional GetConfig(ctx context.Context, param ConfigParam) (string, error) // ListenConfig use to listen a config from nacos server // dataId require // group require // onChange require // tenant ==>nacos.namespace optional ListenConfig(ctx context.Context, param ConfigParam) (listenId string, data *ConfigQueryResponse) // PublishConfig use to publish config to nacos server // dataId require // group require // content require // tenant ==>nacos.namespace optional PublishConfig(ctx context.Context, param ConfigParam) (bool, error) // DeleteConfig use to delete config // dataId require // group require // tenant ==>nacos.namespace optional DeleteConfig(ctx context.Context, param ConfigParam) (bool, error) // SearchConfig use to search nacos config // search require search=accurate--精确搜索 search=blur--模糊搜索 // group option // dataId option // tenant ==>nacos.namespace optional // pageNo option,default is 1 // pageSize option,default is 10 SearchConfig(ctx context.Context, param SearchConfigParam) (*ConfigPage, error) QueryConfig(ctx context.Context, param ConfigParam) (content *ConfigQueryResponse, err error) }
func NewConfigClient ¶
func NewConfigClient(ctx context.Context, opts ...ClientOption) (IConfigClient, error)
type LoginResponse ¶
type OnChangeFunc ¶
type OnChangeFunc func(item *ConfigQueryResponse)
type PublishConfigResponse ¶
Click to show internal directories.
Click to hide internal directories.