Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) Delete(ctx context.Context, kvID, labelID string, opts ...OpOption) error
- func (c *Client) Get(ctx context.Context, key string, opts ...GetOption) ([]*model.KVResponse, error)
- func (c *Client) Put(ctx context.Context, kv model.KVDoc, opts ...OpOption) (*model.KVDoc, error)
- func (c *Client) SearchByLabels(ctx context.Context, opts ...GetOption) ([]*model.KVResponse, error)
- type Config
- type GetOption
- type GetOptions
- type OpOption
- type OpOptions
Constants ¶
View Source
const (
APIPathKV = "kie/kv"
)
const
Variables ¶
View Source
var (
ErrKeyNotExist = errors.New("can not find value")
)
client errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the servicecomb kie rest client. it is concurrency safe
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, key string, opts ...GetOption) ([]*model.KVResponse, error)
Get get value of a key
func (*Client) SearchByLabels ¶
func (c *Client) SearchByLabels(ctx context.Context, opts ...GetOption) ([]*model.KVResponse, error)
SearchByLabels get value by lables
type Config ¶
type Config struct {
Endpoint string
DefaultLabels map[string]string
VerifyPeer bool //TODO make it works, now just keep it false
}
Config is the config of client
type GetOption ¶
type GetOption func(*GetOptions)
GetOption is the functional option of client func
func WithGetProject ¶
WithGetProject query keys with certain project
type GetOptions ¶
GetOptions is the options of client func
Click to show internal directories.
Click to hide internal directories.