Documentation
¶
Index ¶
- Constants
- Variables
- func NewStore(cfg Config) (kvstore.Store, error)
- type Backend
- type Config
- type StoreManager
- func (e *StoreManager) AtomicPutClusterData(cd *cluster.ClusterData, previous *kvstore.KVPair) (*kvstore.KVPair, error)
- func (e *StoreManager) GetClusterData() (*cluster.ClusterData, *kvstore.KVPair, error)
- func (e *StoreManager) GetKeeperInfo(id string) (*cluster.KeeperInfo, bool, error)
- func (e *StoreManager) GetKeepersInfo() (cluster.KeepersInfo, error)
- func (e *StoreManager) GetLeaderSentinelId() (string, error)
- func (e *StoreManager) GetProxiesInfo() (cluster.ProxiesInfo, error)
- func (e *StoreManager) GetProxyInfo(id string) (*cluster.ProxyInfo, bool, error)
- func (e *StoreManager) GetSentinelInfo(id string) (*cluster.SentinelInfo, bool, error)
- func (e *StoreManager) GetSentinelsInfo() (cluster.SentinelsInfo, error)
- func (e *StoreManager) PutClusterData(cd *cluster.ClusterData) error
- func (e *StoreManager) SetKeeperInfo(id string, ms *cluster.KeeperInfo, ttl time.Duration) error
- func (e *StoreManager) SetProxyInfo(pi *cluster.ProxyInfo, ttl time.Duration) error
- func (e *StoreManager) SetSentinelInfo(si *cluster.SentinelInfo, ttl time.Duration) error
Constants ¶
View Source
const ( DefaultEtcdEndpoints = "http://127.0.0.1:2379" DefaultConsulEndpoints = "http://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 ¶
View Source
var URLSchemeRegexp = regexp.MustCompile(`^([a-zA-Z][a-zA-Z0-9+-.]*)://`)
Functions ¶
Types ¶
type StoreManager ¶
type StoreManager struct {
// contains filtered or unexported fields
}
func NewStoreManager ¶
func NewStoreManager(kvStore kvstore.Store, path string) *StoreManager
func (*StoreManager) AtomicPutClusterData ¶ added in v0.5.0
func (e *StoreManager) AtomicPutClusterData(cd *cluster.ClusterData, previous *kvstore.KVPair) (*kvstore.KVPair, error)
func (*StoreManager) GetClusterData ¶
func (e *StoreManager) GetClusterData() (*cluster.ClusterData, *kvstore.KVPair, error)
func (*StoreManager) GetKeeperInfo ¶ added in v0.5.0
func (e *StoreManager) GetKeeperInfo(id string) (*cluster.KeeperInfo, bool, error)
func (*StoreManager) GetKeepersInfo ¶ added in v0.5.0
func (e *StoreManager) GetKeepersInfo() (cluster.KeepersInfo, error)
func (*StoreManager) GetLeaderSentinelId ¶
func (e *StoreManager) GetLeaderSentinelId() (string, error)
func (*StoreManager) GetProxiesInfo ¶
func (e *StoreManager) GetProxiesInfo() (cluster.ProxiesInfo, error)
func (*StoreManager) GetProxyInfo ¶
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) PutClusterData ¶ added in v0.5.0
func (e *StoreManager) PutClusterData(cd *cluster.ClusterData) error
func (*StoreManager) SetKeeperInfo ¶ added in v0.5.0
func (e *StoreManager) SetKeeperInfo(id string, ms *cluster.KeeperInfo, ttl time.Duration) error
func (*StoreManager) SetProxyInfo ¶
func (*StoreManager) SetSentinelInfo ¶
func (e *StoreManager) SetSentinelInfo(si *cluster.SentinelInfo, ttl time.Duration) error
Click to show internal directories.
Click to hide internal directories.