Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type ServiceConfigClient
- func (s *ServiceConfigClient) ClearConfig(sequence string) error
- func (s *ServiceConfigClient) GetConfig(sequence string) (*Config, error)
- func (s *ServiceConfigClient) GetConfigs() (map[string]*Config, error)
- func (s *ServiceConfigClient) GetKeyName(serverName string, sequences ...string) string
- func (s *ServiceConfigClient) ListConfigs() (map[string]*Config, error)
- func (s *ServiceConfigClient) Watch(ctx context.Context) (<-chan struct{}, error)
- func (s *ServiceConfigClient) WriteConfig(sequence string, c Config) error
Constants ¶
View Source
const ( Service = "/kelvins-service" DefaultCluster = "cluster" )
Variables ¶
View Source
var ErrServiceConfigKeyNotExist = errors.New("service config key not exist")
Functions ¶
This section is empty.
Types ¶
type ServiceConfigClient ¶
func NewServiceConfigClient ¶
func NewServiceConfigClient(slb *slb.ServiceLB) *ServiceConfigClient
func (*ServiceConfigClient) ClearConfig ¶
func (s *ServiceConfigClient) ClearConfig(sequence string) error
func (*ServiceConfigClient) GetConfig ¶
func (s *ServiceConfigClient) GetConfig(sequence string) (*Config, error)
func (*ServiceConfigClient) GetConfigs ¶
func (s *ServiceConfigClient) GetConfigs() (map[string]*Config, error)
func (*ServiceConfigClient) GetKeyName ¶
func (s *ServiceConfigClient) GetKeyName(serverName string, sequences ...string) string
GetKeyName etcd key cannot end with a number
func (*ServiceConfigClient) ListConfigs ¶
func (s *ServiceConfigClient) ListConfigs() (map[string]*Config, error)
func (*ServiceConfigClient) Watch ¶
func (s *ServiceConfigClient) Watch(ctx context.Context) (<-chan struct{}, error)
func (*ServiceConfigClient) WriteConfig ¶
func (s *ServiceConfigClient) WriteConfig(sequence string, c Config) error
Click to show internal directories.
Click to hide internal directories.