Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type KVClient
- func (k *KVClient) Get(key string, queryOptions *api.QueryOptions) (*api.KVPair, *api.QueryMeta, error)
- func (k *KVClient) GetInt(key string) (int, error)
- func (k *KVClient) GetString(key string) (string, error)
- func (k *KVClient) Put(key string, value []byte, writeOptions *api.WriteOptions) (*api.WriteMeta, error)
- func (k *KVClient) PutInt(key string, value int) error
- func (k *KVClient) PutString(key, value string) error
Constants ¶
View Source
const SUBSYTEM = "consul"
Variables ¶
View Source
var (
ErrKeyNotFound = errors.New("key not found")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string `yaml:"host" json:"host" mapstructure:"host" validate:"required"` // Consul host inclusive protocol and port, for example http://consul11.mar.eosn.io:8500
Datacenter string `yaml:"datacenter" json:"datacenter" mapstructure:"datacenter" validate:"required"` // Consul datacenter, for example "march"
Folder string `yaml:"folder" json:"folder" mapstructure:"folder" validate:"required"` // Consul folder for KV pairs, for example "test"
}
Click to show internal directories.
Click to hide internal directories.