Documentation
¶
Index ¶
- type ETCD
- func (e *ETCD) BatchCreate(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
- func (e *ETCD) BatchCreateAndDecr(ctx context.Context, data map[string]string, decrKey string) (err error)
- func (e *ETCD) BatchDelete(ctx context.Context, keys []string) (*clientv3.TxnResponse, error)
- func (e *ETCD) BatchPut(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
- func (e *ETCD) BatchUpdate(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
- func (e *ETCD) BindStatus(ctx context.Context, entityKey, statusKey, statusValue string, ttl int64) error
- func (e *ETCD) Create(ctx context.Context, key, val string) (*clientv3.TxnResponse, error)
- func (e *ETCD) CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)
- func (e *ETCD) Delete(ctx context.Context, key string) (*clientv3.DeleteResponse, error)
- func (e *ETCD) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (e *ETCD) GetMulti(ctx context.Context, keys []string) ([]*mvccpb.KeyValue, error)
- func (e *ETCD) GetOne(ctx context.Context, key string, opts ...clientv3.OpOption) (*mvccpb.KeyValue, error)
- func (e *ETCD) Put(ctx context.Context, key, val string) (*clientv3.PutResponse, error)
- func (e *ETCD) StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error)
- func (e *ETCD) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
- type ETCDClientV3
- type ETCDTxn
- type KV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ETCD ¶
type ETCD struct {
// contains filtered or unexported fields
}
ETCD is the etcd backed meta store.
func (*ETCD) BatchCreate ¶
func (*ETCD) BatchCreateAndDecr ¶
func (*ETCD) BatchDelete ¶
func (*ETCD) BatchUpdate ¶
func (*ETCD) BindStatus ¶
func (*ETCD) CreateLock ¶
func (*ETCD) StartEphemeral ¶
type ETCDClientV3 ¶
ETCDClientV3 is the etcd client surface the store depends on.
type KV ¶
type KV interface {
BindStatus(ctx context.Context, entityKey, statusKey, statusValue string, ttl int64) error
Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
GetOne(ctx context.Context, key string, opts ...clientv3.OpOption) (*mvccpb.KeyValue, error)
GetMulti(ctx context.Context, keys []string) ([]*mvccpb.KeyValue, error)
Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan
Create(ctx context.Context, key, val string) (*clientv3.TxnResponse, error)
Put(ctx context.Context, key, val string) (*clientv3.PutResponse, error)
Delete(ctx context.Context, key string) (*clientv3.DeleteResponse, error)
BatchCreateAndDecr(ctx context.Context, data map[string]string, decrKey string) error
BatchCreate(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
BatchUpdate(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
BatchDelete(ctx context.Context, keys []string) (*clientv3.TxnResponse, error)
BatchPut(ctx context.Context, data map[string]string) (*clientv3.TxnResponse, error)
StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error)
CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error)
}
KV is the etcd surface the store is built on.
Click to show internal directories.
Click to hide internal directories.