Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTimeout = context.DeadlineExceeded DefaultRequestTimeout = 5 * time.Second )
View Source
var ( ErrNoLeader = errors.New("client: no leader") ErrKeyNoExist = errors.New("client: key does not exist") ErrKeyExists = errors.New("client: key already exists") )
View Source
var (
DefaultV2KeysPrefix = "/v2/keys"
)
View Source
var (
DefaultV2MembersPrefix = "/v2/members"
)
Functions ¶
This section is empty.
Types ¶
type KeysAPI ¶
type KeysAPI interface { Create(key, value string, ttl time.Duration) (*Response, error) Get(key string) (*Response, error) Watch(key string, idx uint64) Watcher RecursiveWatch(key string, idx uint64) Watcher }
func NewDiscoveryKeysAPI ¶
type MembersAPI ¶
type MembersAPI interface { List() ([]httptypes.Member, error) Add(peerURL string) (*httptypes.Member, error) Remove(mID string) error }
func NewMembersAPI ¶
type Node ¶
Click to show internal directories.
Click to hide internal directories.