Documentation ¶
Overview ¶
Package etcdbk implements Etcd powered backend
Index ¶
- func GetName() string
- type Config
- type EtcdBackend
- func (b *EtcdBackend) Clock() clockwork.Clock
- func (b *EtcdBackend) Close() error
- func (b *EtcdBackend) CloseWatchers()
- func (b *EtcdBackend) CompareAndSwap(ctx context.Context, expected backend.Item, replaceWith backend.Item) (*backend.Lease, error)
- func (b *EtcdBackend) Create(ctx context.Context, item backend.Item) (*backend.Lease, error)
- func (b *EtcdBackend) Delete(ctx context.Context, key []byte) error
- func (b *EtcdBackend) DeleteRange(ctx context.Context, startKey, endKey []byte) error
- func (b *EtcdBackend) Get(ctx context.Context, key []byte) (*backend.Item, error)
- func (b *EtcdBackend) GetRange(ctx context.Context, startKey, endKey []byte, limit int) (*backend.GetResult, error)
- func (b *EtcdBackend) KeepAlive(ctx context.Context, lease backend.Lease, expires time.Time) error
- func (b *EtcdBackend) NewWatcher(ctx context.Context, watch backend.Watch) (backend.Watcher, error)
- func (b *EtcdBackend) Put(ctx context.Context, item backend.Item) (*backend.Lease, error)
- func (b *EtcdBackend) Update(ctx context.Context, item backend.Item) (*backend.Lease, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v1.0.0
type Config struct { Nodes []string `json:"peers,omitempty"` Key string `json:"prefix,omitempty"` TLSKeyFile string `json:"tls_key_file,omitempty"` TLSCertFile string `json:"tls_cert_file,omitempty"` TLSCAFile string `json:"tls_ca_file,omitempty"` Insecure bool `json:"insecure,omitempty"` // BufferSize is a default buffer size // used to pull events BufferSize int `json:"buffer_size,omitempty"` // DialTimeout specifies dial timeout DialTimeout time.Duration `json:"dial_timeout,omitempty"` }
Config represents JSON config for etcd backend
type EtcdBackend ¶
func (*EtcdBackend) Clock ¶
func (b *EtcdBackend) Clock() clockwork.Clock
func (*EtcdBackend) Close ¶
func (b *EtcdBackend) Close() error
func (*EtcdBackend) CloseWatchers ¶
func (b *EtcdBackend) CloseWatchers()
CloseWatchers closes all the watchers without closing the backend
func (*EtcdBackend) CompareAndSwap ¶
func (b *EtcdBackend) CompareAndSwap(ctx context.Context, expected backend.Item, replaceWith backend.Item) (*backend.Lease, error)
CompareAndSwap compares item with existing item and replaces is with replaceWith item
func (*EtcdBackend) Delete ¶
func (b *EtcdBackend) Delete(ctx context.Context, key []byte) error
Delete deletes item by key
func (*EtcdBackend) DeleteRange ¶
func (b *EtcdBackend) DeleteRange(ctx context.Context, startKey, endKey []byte) error
DeleteRange deletes range of items with keys between startKey and endKey
func (*EtcdBackend) GetRange ¶
func (b *EtcdBackend) GetRange(ctx context.Context, startKey, endKey []byte, limit int) (*backend.GetResult, error)
GetRange returns query range
func (*EtcdBackend) NewWatcher ¶
NewWatcher returns a new event watcher
Click to show internal directories.
Click to hide internal directories.