Documentation ¶
Index ¶
- Variables
- func ClrearStores()
- func FromatKey(key, prefix string) (string, string, string)
- func InitStore(key string, opt GenericStoreOption, stg Interface) error
- func InitStores(stg Interface) (err error)
- type EtcdV3
- func (s *EtcdV3) Close() error
- func (s *EtcdV3) Create(ctx context.Context, key, value string) error
- func (s *EtcdV3) Delete(ctx context.Context, key string) error
- func (s *EtcdV3) DeletePrefix(ctx context.Context, prefix string) error
- func (s *EtcdV3) Get(ctx context.Context, key string) (string, error)
- func (s *EtcdV3) List(ctx context.Context, prefix string) ([]*message.Message, error)
- func (s *EtcdV3) Update(ctx context.Context, key, value string, version int64) error
- func (s *EtcdV3) Watch(ctx context.Context, prefix string) <-chan []*message.Message
- type GenericStore
- func (s *GenericStore) BasePath() string
- func (s *GenericStore) Delete(key string) (interface{}, bool)
- func (s *GenericStore) List(filter func(*message.Message) bool) ([]*message.Message, error)
- func (s *GenericStore) Store(key string, objPtr interface{}) (interface{}, bool)
- func (s *GenericStore) Unwatch()
- func (s *GenericStore) UpdateNodes(ctx context.Context, msg *message.Message) (err error)
- func (s *GenericStore) Watch() <-chan []*message.Message
- type GenericStoreOption
- type Interface
- type MockInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DirPlaceholder = []byte("init_dir")
)
Functions ¶
func ClrearStores ¶
func ClrearStores()
func InitStores ¶
Types ¶
type EtcdV3 ¶
type EtcdV3 struct {
// contains filtered or unexported fields
}
func (*EtcdV3) DeletePrefix ¶
DeletePrefix deletes a range of keys under a given prefix
type GenericStore ¶
func GetStore ¶
func GetStore(entity string) *GenericStore
func GetStores ¶
func GetStores() []*GenericStore
func NewGenericStore ¶
func NewGenericStore(typ string, opt GenericStoreOption, stg Interface) (*GenericStore, error)
func (*GenericStore) BasePath ¶
func (s *GenericStore) BasePath() string
func (*GenericStore) Delete ¶
func (s *GenericStore) Delete(key string) (interface{}, bool)
func (*GenericStore) Store ¶
func (s *GenericStore) Store(key string, objPtr interface{}) (interface{}, bool)
func (*GenericStore) Unwatch ¶
func (s *GenericStore) Unwatch()
func (*GenericStore) UpdateNodes ¶
func (*GenericStore) Watch ¶
func (s *GenericStore) Watch() <-chan []*message.Message
type GenericStoreOption ¶
Click to show internal directories.
Click to hide internal directories.