Documentation ¶
Index ¶
- Variables
- func Init(traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, ...)
- func NewEtcdV2Client(conf *Config) (client.Client, client.KeysAPI, error)
- func NewV2Config(conf *Config) (c *client.Config, err error)
- func Register(name string, factory DataStoreFactory)
- type Candidate
- type Change
- type ChangeType
- type Config
- type DataStore
- type DataStoreFactory
- type Error
- type ErrorCode
- type EtcdV2DataStore
- func (ev2DS *EtcdV2DataStore) Close() error
- func (ev2DS *EtcdV2DataStore) CompareAndDel(key string, value string) error
- func (ev2DS *EtcdV2DataStore) Del(key string) error
- func (ev2DS *EtcdV2DataStore) Get(key string) (string, error)
- func (ev2DS *EtcdV2DataStore) PutIfAbsent(key string, value string, ttl time.Duration) (prevValue string, err error)
- func (ev2DS *EtcdV2DataStore) RefreshTTL(key string, value string, ttl time.Duration) error
- func (ev2DS *EtcdV2DataStore) Watch(k string, l Listener) error
- type InvalidArgumentError
- type KeyChangeListener
- type Kingsmoot
- type Listener
- type MemberShip
- type OpError
- type Role
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Register ¶
func Register(name string, factory DataStoreFactory)
Types ¶
type Candidate ¶
type Candidate interface { fmt.Stringer UpdateMembership(memberShip MemberShip) error }
type Change ¶
type Change struct { ChangeType ChangeType NewValue string PrevValue string }
type ChangeType ¶
type ChangeType int
const ( Created ChangeType = 1 + iota Updated Deleted )
func (ChangeType) String ¶
func (ct ChangeType) String() string
type DataStore ¶
type DataStore interface { PutIfAbsent(key string, value string, ttl time.Duration) (prevValue string, err error) RefreshTTL(key string, value string, ttl time.Duration) (err error) Get(key string) (value string, err error) Del(key string) error CompareAndDel(key string, prevValue string) error Watch(key string, watch Listener) error Close() error }
func CreateDatastore ¶
func NewEtcdV2DataStore ¶
type DataStoreFactory ¶
type EtcdV2DataStore ¶
type EtcdV2DataStore struct {
// contains filtered or unexported fields
}
func (*EtcdV2DataStore) Close ¶
func (ev2DS *EtcdV2DataStore) Close() error
func (*EtcdV2DataStore) CompareAndDel ¶
func (ev2DS *EtcdV2DataStore) CompareAndDel(key string, value string) error
func (*EtcdV2DataStore) Del ¶
func (ev2DS *EtcdV2DataStore) Del(key string) error
func (*EtcdV2DataStore) PutIfAbsent ¶
func (*EtcdV2DataStore) RefreshTTL ¶
type InvalidArgumentError ¶
type InvalidArgumentError struct { Name string Value string Expected string // contains filtered or unexported fields }
func (*InvalidArgumentError) Cause ¶
func (iae *InvalidArgumentError) Cause() error
func (*InvalidArgumentError) Code ¶
func (iae *InvalidArgumentError) Code() ErrorCode
func (*InvalidArgumentError) Error ¶
func (iae *InvalidArgumentError) Error() string
func (*InvalidArgumentError) Message ¶
func (iae *InvalidArgumentError) Message() string
type KeyChangeListener ¶
type KeyChangeListener struct {
// contains filtered or unexported fields
}
func (*KeyChangeListener) Bye ¶
func (l *KeyChangeListener) Bye(err error)
func (*KeyChangeListener) Notify ¶
func (l *KeyChangeListener) Notify(change *Change)
type Kingsmoot ¶
type Kingsmoot struct {
// contains filtered or unexported fields
}
func NewFromConf ¶
type MemberShip ¶
Click to show internal directories.
Click to hide internal directories.