Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Config() clientv3.Config
- func (c *Client) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
- func (c *Client) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (c *Client) Key(parts ...string) *Key
- func (c *Client) Put(ctx context.Context, key string, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (c *Client) WithHooks(hooks ...StorageHook) *Client
- type Key
- type StorageHook
Constants ¶
View Source
const SEP = '/'
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) WithHooks ¶ added in v0.16.0
func (c *Client) WithHooks(hooks ...StorageHook) *Client
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func KeyFromString ¶ added in v0.25.0
type StorageHook ¶ added in v0.16.0
type StorageHook struct {
GetPre func(ctx context.Context, key string, opts ...clientv3.OpOption) error
PutPre func(ctx context.Context, key string, val string, opts ...clientv3.OpOption) error
DeletePre func(ctx context.Context, key string, opts ...clientv3.OpOption) error
GetPost func(ctx context.Context, key string, res *clientv3.GetResponse, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
PutPost func(ctx context.Context, key string, val string, res *clientv3.PutResponse, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
DeletePost func(ctx context.Context, key string, res *clientv3.DeleteResponse, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
}
Click to show internal directories.
Click to hide internal directories.