Documentation ¶
Index ¶
- Constants
- Variables
- func NewStore() configstores.Store
- type Client
- type ConfigStore
- func (n *ConfigStore) Delete(ctx context.Context, request *configstores.DeleteRequest) error
- func (n *ConfigStore) Get(ctx context.Context, request *configstores.GetRequest) ([]*configstores.ConfigurationItem, error)
- func (n *ConfigStore) GetDefaultGroup() string
- func (n *ConfigStore) GetDefaultLabel() string
- func (n *ConfigStore) Init(config *configstores.StoreConfig) (err error)
- func (n *ConfigStore) OnLogLevelChanged(outputLevel log.LogLevel)
- func (n *ConfigStore) Set(ctx context.Context, request *configstores.SetRequest) error
- func (n *ConfigStore) StopSubscribe()
- func (n *ConfigStore) Subscribe(request *configstores.SubscribeReq, ch chan *configstores.SubscribeResp) error
- type DefaultLogger
- func (d *DefaultLogger) Debug(v ...interface{})
- func (d *DefaultLogger) Debugf(format string, params ...interface{})
- func (d *DefaultLogger) Error(v ...interface{})
- func (d *DefaultLogger) Errorf(format string, params ...interface{})
- func (d *DefaultLogger) Info(v ...interface{})
- func (d *DefaultLogger) Infof(format string, params ...interface{})
- func (d *DefaultLogger) Warn(v ...interface{})
- func (d *DefaultLogger) Warnf(format string, params ...interface{})
- type Metadata
- type OnChangeFunc
- type Pagination
Constants ¶
View Source
const ( PageNo = "PageNo" PageSize = "PageSize" )
View Source
const ( DEBUG = "debug" INFO = "info" WARN = "warn" ERROR = "error" )
Variables ¶
View Source
var ( // IllegalParam // This error is usually caused by the logic of the parameters, // such as filling in parameters with illegal characters IllegalParam = errors.New("illegal parameter") )
Functions ¶
func NewStore ¶
func NewStore() configstores.Store
Types ¶
type Client ¶
type Client interface { // GetConfig use to get config from nacos server // dataId require // group require // tenant ==>nacos.namespace optional GetConfig(param vo.ConfigParam) (string, error) // PublishConfig use to publish config to nacos server // dataId require // group require // content require // tenant ==>nacos.namespace optional PublishConfig(param vo.ConfigParam) (bool, error) // DeleteConfig use to delete config // dataId require // group require // tenant ==>nacos.namespace optional DeleteConfig(param vo.ConfigParam) (bool, error) // ListenConfig use to listen config change,it will callback OnChange() when config change // dataId require // group require // onchange require // tenant ==>nacos.namespace optional ListenConfig(params vo.ConfigParam) (err error) //CancelListenConfig use to cancel listen config change // dataId require // group require // tenant ==>nacos.namespace optional CancelListenConfig(params vo.ConfigParam) (err 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(param vo.SearchConfigParam) (*model.ConfigPage, error) // CloseClient Close the GRPC client CloseClient() }
type ConfigStore ¶
type ConfigStore struct {
// contains filtered or unexported fields
}
func (*ConfigStore) Delete ¶
func (n *ConfigStore) Delete(ctx context.Context, request *configstores.DeleteRequest) error
func (*ConfigStore) Get ¶
func (n *ConfigStore) Get(ctx context.Context, request *configstores.GetRequest) ([]*configstores.ConfigurationItem, error)
Get gets configuration from configuration store.
func (*ConfigStore) GetDefaultGroup ¶
func (n *ConfigStore) GetDefaultGroup() string
func (*ConfigStore) GetDefaultLabel ¶
func (n *ConfigStore) GetDefaultLabel() string
func (*ConfigStore) Init ¶
func (n *ConfigStore) Init(config *configstores.StoreConfig) (err error)
Init SetConfig the configuration store.
func (*ConfigStore) OnLogLevelChanged ¶
func (n *ConfigStore) OnLogLevelChanged(outputLevel log.LogLevel)
func (*ConfigStore) Set ¶
func (n *ConfigStore) Set(ctx context.Context, request *configstores.SetRequest) error
func (*ConfigStore) StopSubscribe ¶
func (n *ConfigStore) StopSubscribe()
func (*ConfigStore) Subscribe ¶
func (n *ConfigStore) Subscribe(request *configstores.SubscribeReq, ch chan *configstores.SubscribeResp) error
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
An adapter to implement log.LoggerInterface in agollo package.
func NewDefaultLogger ¶
func NewDefaultLogger(logger log.Logger) *DefaultLogger
func (*DefaultLogger) Debug ¶
func (d *DefaultLogger) Debug(v ...interface{})
func (*DefaultLogger) Debugf ¶
func (d *DefaultLogger) Debugf(format string, params ...interface{})
func (*DefaultLogger) Error ¶
func (d *DefaultLogger) Error(v ...interface{})
func (*DefaultLogger) Errorf ¶
func (d *DefaultLogger) Errorf(format string, params ...interface{})
func (*DefaultLogger) Info ¶
func (d *DefaultLogger) Info(v ...interface{})
func (*DefaultLogger) Infof ¶
func (d *DefaultLogger) Infof(format string, params ...interface{})
func (*DefaultLogger) Warn ¶
func (d *DefaultLogger) Warn(v ...interface{})
func (*DefaultLogger) Warnf ¶
func (d *DefaultLogger) Warnf(format string, params ...interface{})
type Metadata ¶
type OnChangeFunc ¶
type OnChangeFunc func(namespace, group, dataId, data string)
type Pagination ¶
Click to show internal directories.
Click to hide internal directories.