Documentation ¶
Index ¶
- Constants
- func NormalizeAddress(addr string, defaultPort uint16) string
- type Client
- type ConsulClient
- func (c *ConsulClient) Create(path string, data string) *Error
- func (c *ConsulClient) Delete(path string, version int32) *Error
- func (c *ConsulClient) Exists(path string) *Error
- func (c *ConsulClient) GetChildren(path string) ([]string, *Error)
- func (c *ConsulClient) GetData(path string) (*Node, *Error)
- func (c *ConsulClient) SetData(path string, data string, version int32) *Error
- type Error
- type EtcdClient
- func (c *EtcdClient) Create(path string, data string) (err *Error)
- func (c *EtcdClient) Delete(path string, version int32) (err *Error)
- func (c *EtcdClient) Exists(path string) (err *Error)
- func (c *EtcdClient) GetChildren(path string) ([]string, *Error)
- func (c *EtcdClient) GetData(path string) (*Node, *Error)
- func (c *EtcdClient) SetData(path string, data string, version int32) (err *Error)
- type Node
- type Nodes
Constants ¶
View Source
const ( Unknown = 1 Unimplemented = 2 BackendUnreachable = 3 KeyNotFound = 4 KeyExists = 5 BadVersion = 6 )
Variables ¶
This section is empty.
Functions ¶
func NormalizeAddress ¶
normalizeAddress returns addr with the passed default port appended if there is not already a port specified.
Types ¶
type ConsulClient ¶
type ConsulClient struct {
// contains filtered or unexported fields
}
func NewConsulClient ¶
func NewConsulClient(addr string, dialTimeout time.Duration) (*ConsulClient, error)
func (*ConsulClient) Exists ¶
func (c *ConsulClient) Exists(path string) *Error
func (*ConsulClient) GetChildren ¶
func (c *ConsulClient) GetChildren(path string) ([]string, *Error)
type EtcdClient ¶
type EtcdClient struct {
// contains filtered or unexported fields
}
func NewEtcdClient ¶
func (*EtcdClient) Exists ¶
func (c *EtcdClient) Exists(path string) (err *Error)
func (*EtcdClient) GetChildren ¶
func (c *EtcdClient) GetChildren(path string) ([]string, *Error)
Click to show internal directories.
Click to hide internal directories.