Documentation ¶
Index ¶
- type Client
- func (c *Client) CAS(key string, value []byte, flags, index uint64) (bool, error)
- func (c *Client) Delete(key string) error
- func (c *Client) DeleteTree(prefix string) error
- func (c *Client) Get(key string) (*KVMeta, *KVPair, error)
- func (c *Client) List(prefix string) (*KVMeta, KVPairs, error)
- func (c *Client) Put(key string, value []byte, flags uint64) error
- func (c *Client) WatchGet(key string, modifyIndex uint64) (*KVMeta, *KVPair, error)
- func (c *Client) WatchList(prefix string, modifyIndex uint64) (*KVMeta, KVPairs, error)
- type Config
- type KVMeta
- type KVPair
- type KVPairs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a client to Consul for K/V data
func (*Client) DeleteTree ¶
DeleteTree is used to delete all keys with a prefix
type Config ¶
type Config struct { // Address is the address of the Consul server Address string // Datacenter to use. If not provided, the default agent datacenter is used. Datacenter string // HTTPClient is the client to use. Default will be // used if not provided. HTTPClient *http.Client // WaitTime limits how long a Watch will block. If not provided, // the agent default values will be used. WaitTime time.Duration }
Config is used to configure the creation of a client
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a default configuration for the client
Click to show internal directories.
Click to hide internal directories.