Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDialTimeout is the default dial timeout for the etc client. DefaultDialTimeout = 5 * time.Second // DefaultRequestTimeout is the default request timeout for the etc client. DefaultRequestTimeout = 5 * time.Second // DefaultCacheTimeout is the default timeout for a health check when waiting for a response from the cache. DefaultCacheTimeout = 2 * time.Second // DefaultEndpoint is the default etcd endpoint. DefaultEndpoint = "localhost:2379" )
Variables ¶
View Source
var ( // ErrKeyNotFound is the error returned when the key requested is not found. ErrKeyNotFound = errors.New("key not found") // ErrTxNotWritable is the error returned when an mutable operation is called during // a non-writable transaction. ErrTxNotWritable = errors.New("transaction is not writable") )
Functions ¶
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket is a key value bucket.
func (*Bucket) NextSequence ¶
NextSequence generates a universally unique uint64.
type Option ¶
type Option func(c *client) error
Option to change behavior of Open()
func WithDialTimeout ¶
WithDialTimeout allows for setting the etcd dial timeout.
func WithEndpoints ¶
WithEndpoints allows for setting the etcd hosts.
func WithLogger ¶
func WithLogger(logger chronograf.Logger) Option
WithLogger allows for setting this chronograf's logger.
func WithLogin ¶
WithLogin allows for setting the username and password to connect to the etcd cluster.
func WithRequestTimeout ¶
WithRequestTimeout allows for setting the etcd request timeout.
Click to show internal directories.
Click to hide internal directories.