Documentation ¶
Index ¶
- type API
- func (c *API) Connect() error
- func (c *API) Delete(ctx context.Context, key string) error
- func (c *API) DynamicValue(ctx context.Context, wg *sync.WaitGroup, key string) (<-chan []byte, func(), error)
- func (c *API) LoadRaw(ctx context.Context, key string) ([]byte, error)
- func (c *API) SetRaw(ctx context.Context, key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Client *api.Client KV *api.KV QueryOptions api.QueryOptions WriteOptions api.WriteOptions }
func (*API) DynamicValue ¶
func (c *API) DynamicValue(ctx context.Context, wg *sync.WaitGroup, key string) (<-chan []byte, func(), error)
DynamicValue return a channel for getting latest value of key. This function will start a goroutine for watching key. The caller should call stop function when it is no longer needed.
Click to show internal directories.
Click to hide internal directories.