etcd

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2015 Sorint.lab

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEtcdNodeExist

func IsEtcdNodeExist(err error) bool

IsEtcdNodeExist returns true if err is an etcd node aleady exist error.

func IsEtcdNotFound

func IsEtcdNotFound(err error) bool

IsEtcdNotFound returns true if err is an etcd not found error.

func IsEtcdTestFailed

func IsEtcdTestFailed(err error) bool

IsEtcdTestFailed returns true if err is an etcd write conflict.

Types

type EtcdManager

type EtcdManager struct {
	// contains filtered or unexported fields
}

func NewEtcdManager

func NewEtcdManager(etcdEndpoints string, path string, requestTimeout time.Duration) (*EtcdManager, error)

func (*EtcdManager) GetClusterData

func (e *EtcdManager) GetClusterData() (*cluster.ClusterData, *etcd.Response, error)

func (*EtcdManager) GetClusterView

func (e *EtcdManager) GetClusterView() (*cluster.ClusterView, *etcd.Response, error)

func (*EtcdManager) GetKeeperDiscoveryInfo

func (e *EtcdManager) GetKeeperDiscoveryInfo(id string) (*cluster.KeeperDiscoveryInfo, bool, error)

func (*EtcdManager) GetKeepersDiscoveryInfo

func (e *EtcdManager) GetKeepersDiscoveryInfo() (cluster.KeepersDiscoveryInfo, error)

func (*EtcdManager) GetKeepersState

func (e *EtcdManager) GetKeepersState() (cluster.KeepersState, *etcd.Response, error)

func (*EtcdManager) GetLeaderSentinelInfo

func (e *EtcdManager) GetLeaderSentinelInfo() (*cluster.SentinelInfo, *etcd.Response, error)

func (*EtcdManager) GetProxiesInfo

func (e *EtcdManager) GetProxiesInfo() (cluster.ProxiesInfo, error)

func (*EtcdManager) GetProxyInfo

func (e *EtcdManager) GetProxyInfo(id string) (*cluster.ProxyInfo, bool, error)

func (*EtcdManager) GetSentinelInfo

func (e *EtcdManager) GetSentinelInfo(id string) (*cluster.SentinelInfo, bool, error)

func (*EtcdManager) GetSentinelsInfo

func (e *EtcdManager) GetSentinelsInfo() (cluster.SentinelsInfo, error)

func (*EtcdManager) NewLeaseManager

func (e *EtcdManager) NewLeaseManager() lease.Manager

func (*EtcdManager) SetClusterData

func (e *EtcdManager) SetClusterData(mss cluster.KeepersState, cv *cluster.ClusterView, prevIndex uint64) (*etcd.Response, error)

func (*EtcdManager) SetKeeperDiscoveryInfo

func (e *EtcdManager) SetKeeperDiscoveryInfo(id string, ms *cluster.KeeperDiscoveryInfo) (*etcd.Response, error)

func (*EtcdManager) SetLeaderSentinelInfo

func (e *EtcdManager) SetLeaderSentinelInfo(si *cluster.SentinelInfo, ttl time.Duration) (*etcd.Response, error)

func (*EtcdManager) SetProxyInfo

func (e *EtcdManager) SetProxyInfo(pi *cluster.ProxyInfo, ttl time.Duration) (*etcd.Response, error)

func (*EtcdManager) SetSentinelInfo

func (e *EtcdManager) SetSentinelInfo(si *cluster.SentinelInfo, ttl time.Duration) (*etcd.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL