store

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEtcdEndpoints   = "127.0.0.1:2379"
	DefaultConsulEndpoints = "127.0.0.1:8500"
)
View Source
const (
	//TODO(sgotti) fix this in libkv?
	// consul min ttl is 10s and libkv divides this by 2
	MinTTL = 20 * time.Second
)

Variables

This section is empty.

Functions

func NewStore

func NewStore(backend Backend, addrsStr string) (kvstore.Store, error)

Types

type Backend

type Backend string

Backend represents a KV Store Backend

const (
	CONSUL Backend = "consul"
	ETCD   Backend = "etcd"
)

type StoreManager

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

func NewStoreManager

func NewStoreManager(kvStore kvstore.Store, path string) *StoreManager

func (*StoreManager) GetClusterData

func (e *StoreManager) GetClusterData() (*cluster.ClusterData, *kvstore.KVPair, error)

func (*StoreManager) GetClusterView

func (e *StoreManager) GetClusterView() (*cluster.ClusterView, *kvstore.KVPair, error)

func (*StoreManager) GetKeeperDiscoveryInfo

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

func (*StoreManager) GetKeepersDiscoveryInfo

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

func (*StoreManager) GetKeepersState

func (e *StoreManager) GetKeepersState() (cluster.KeepersState, *kvstore.KVPair, error)

func (*StoreManager) GetLeaderSentinelId

func (e *StoreManager) GetLeaderSentinelId() (string, error)

func (*StoreManager) GetProxiesInfo

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

func (*StoreManager) GetProxyInfo

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

func (*StoreManager) GetSentinelInfo

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

func (*StoreManager) GetSentinelsInfo

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

func (*StoreManager) SetClusterData

func (e *StoreManager) SetClusterData(mss cluster.KeepersState, cv *cluster.ClusterView, previous *kvstore.KVPair) (*kvstore.KVPair, error)

func (*StoreManager) SetKeeperDiscoveryInfo

func (e *StoreManager) SetKeeperDiscoveryInfo(id string, ms *cluster.KeeperDiscoveryInfo, ttl time.Duration) error

func (*StoreManager) SetProxyInfo

func (e *StoreManager) SetProxyInfo(pi *cluster.ProxyInfo, ttl time.Duration) error

func (*StoreManager) SetSentinelInfo

func (e *StoreManager) SetSentinelInfo(si *cluster.SentinelInfo, ttl time.Duration) error

Jump to

Keyboard shortcuts

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