Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyNotFoundError ¶
func NewPrefixNotFoundError ¶
Types ¶
type Agent ¶
type Agent interface {
Checks() (map[string]*api.AgentCheck, error)
Services() (map[string]*api.AgentService, error)
ServiceRegister(service *api.AgentServiceRegistration) error
ServiceDeregister(serviceID string) error
PassTTL(checkID, note string) error
WarnTTL(checkID, note string) error
FailTTL(checkID, note string) error
NodeName() (string, error)
CheckDeregister(checkID string) error
}
func NewConsulAgent ¶
type Catalog ¶
func NewConsulCatalog ¶
type Client ¶
type Client interface {
Agent() Agent
Session() Session
Catalog() Catalog
KV() KV
Status() Status
LockOpts(opts *api.LockOptions) (Lock, error)
}
func NewClientFromUrl ¶
func NewConsulClient ¶
func NewTLSClientFromUrl ¶
type KV ¶
type KV interface {
Get(key string, q *api.QueryOptions) (*api.KVPair, *api.QueryMeta, error)
List(prefix string, q *api.QueryOptions) (api.KVPairs, *api.QueryMeta, error)
Put(p *api.KVPair, q *api.WriteOptions) (*api.WriteMeta, error)
Release(p *api.KVPair, q *api.WriteOptions) (bool, *api.WriteMeta, error)
DeleteTree(prefix string, w *api.WriteOptions) (*api.WriteMeta, error)
}
func NewConsulKV ¶
type KeyNotFoundError ¶
type KeyNotFoundError string
func (KeyNotFoundError) Error ¶
func (e KeyNotFoundError) Error() string
type Lock ¶
type Lock interface {
Lock(stopCh <-chan struct{}) (lostLock <-chan struct{}, err error)
}
type PrefixNotFoundError ¶
type PrefixNotFoundError string
func (PrefixNotFoundError) Error ¶
func (e PrefixNotFoundError) Error() string
type Session ¶
type Session interface {
Create(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)
CreateNoChecks(se *api.SessionEntry, q *api.WriteOptions) (string, *api.WriteMeta, error)
Destroy(id string, q *api.WriteOptions) (*api.WriteMeta, error)
Info(id string, q *api.QueryOptions) (*api.SessionEntry, *api.QueryMeta, error)
List(q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)
Node(node string, q *api.QueryOptions) ([]*api.SessionEntry, *api.QueryMeta, error)
Renew(id string, q *api.WriteOptions) (*api.SessionEntry, *api.WriteMeta, error)
RenewPeriodic(initialTTL string, id string, q *api.WriteOptions, doneCh chan struct{}) error
}
func NewConsulSession ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.