Versions in this module Expand all Collapse all v0 v0.4.9 Mar 31, 2015 Changes in this version + const ActiveMonitorTimeout + const ClusterConfigKey + const DefaultActiveSize + const DefaultReadTimeout + const DefaultRemoveDelay + const DefaultSyncInterval + const DefaultWriteTimeout + const MaxHeartbeatTimeoutBackoff + const MinActiveSize + const MinRemoveDelay + const MinSyncInterval + const PeerActivityMonitorTimeout + const RegistryKey + const ReleaseVersion + const ThresholdMonitorTimeout + const Version + func NewListener(scheme, addr string, cfg *tls.Config) net.Listener + func NewPackageStats(now time.Time, size int) *packageStats + func NewRaftFollowersStats(name string) *raftFollowersStats + func NewRaftServerStats(name string) *raftServerStats + func NewTransporter(followersStats *raftFollowersStats, serverStats *raftServerStats, ...) *transporter + func TLSServerConfig(info *TLSInfo) *tls.Config + func Usage() string + type Client struct + func NewClient(transport http.RoundTripper) *Client + func (c *Client) AddMachine(url string, cmd *JoinCommand) (uint64, *etcdErr.Error) + func (c *Client) CheckVersion(url string, version int) (bool, *etcdErr.Error) + func (c *Client) GetClusterConfig(url string) (*ClusterConfig, *etcdErr.Error) + func (c *Client) GetMachines(url string) ([]*machineMessage, *etcdErr.Error) + func (c *Client) GetVersion(url string) (int, *etcdErr.Error) + type ClusterConfig struct + ActiveSize int + RemoveDelay float64 + SyncInterval float64 + func NewClusterConfig() *ClusterConfig + type HEADResponseWriter struct + func (w *HEADResponseWriter) Write([]byte) (int, error) + type JoinCommand struct + EtcdURL string + MaxVersion int + MinVersion int + Name string + RaftURL string + func (c *JoinCommand) Apply(context raft.Context) (interface{}, error) + func (c *JoinCommand) CommandName() string + func (c *JoinCommand) NodeName() string + type PeerServer struct + Config PeerServerConfig + func NewPeerServer(psConfig PeerServerConfig, client *Client, registry *Registry, ...) *PeerServer + func (ps *PeerServer) AppendEntriesHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) EtcdURLHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) GetLogHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) JoinHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) NameHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) RemoveHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) SnapshotHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) SnapshotRecoveryHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) UpgradeHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) VersionCheckHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) VersionHttpHandler(w http.ResponseWriter, req *http.Request) + func (ps *PeerServer) VoteHttpHandler(w http.ResponseWriter, req *http.Request) + func (s *PeerServer) ClusterConfig() *ClusterConfig + func (s *PeerServer) FindCluster(discoverURL string, peers []string) (toStart bool, possiblePeers []string, err error) + func (s *PeerServer) HTTPHandler() http.Handler + func (s *PeerServer) InitNewCluster(clusterConfig *ClusterConfig) + func (s *PeerServer) PeerStats() []byte + func (s *PeerServer) RaftServer() raft.Server + func (s *PeerServer) RemoveNotify() <-chan bool + func (s *PeerServer) SetClusterConfig(c *ClusterConfig) + func (s *PeerServer) SetJoinIndex(joinIndex uint64) + func (s *PeerServer) SetRaftServer(raftServer raft.Server, snapshot bool) + func (s *PeerServer) SetRegistry(registry *Registry) + func (s *PeerServer) SetServer(server *Server) + func (s *PeerServer) SetStore(store store.Store) + func (s *PeerServer) Start(snapshot bool, clusterConfig *ClusterConfig) error + func (s *PeerServer) Stats() []byte + func (s *PeerServer) Stop() + func (s *PeerServer) Upgradable() error + type PeerServerConfig struct + Name string + RetryInterval float64 + RetryTimes int + Scheme string + SnapshotCount int + URL string + type Registry struct + func NewRegistry(s store.Store) *Registry + func (r *Registry) ClientURL(name string) (string, bool) + func (r *Registry) ClientURLs(leaderName, selfName string) []string + func (r *Registry) Count() int + func (r *Registry) Exists(name string) bool + func (r *Registry) Invalidate(name string) + func (r *Registry) Names() []string + func (r *Registry) PeerHost(name string) (string, bool) + func (r *Registry) PeerURL(name string) (string, bool) + func (r *Registry) PeerURLs(leaderName, selfName string) []string + func (r *Registry) Register(name string, peerURL string, machURL string) error + func (r *Registry) Unregister(name string) error + func (r *Registry) UpdatePeerURL(name string, peerURL string) error + type RemoveCommand struct + Name string + func (c *RemoveCommand) Apply(context raft.Context) (interface{}, error) + func (c *RemoveCommand) CommandName() string + type Server struct + Name string + func New(name, url string, peerServer *PeerServer, registry *Registry, ...) *Server + func (s *Server) ClientURL(name string) (string, bool) + func (s *Server) CommitIndex() uint64 + func (s *Server) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Request) error + func (s *Server) EnableTracing() + func (s *Server) GetLeaderHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetLeaderStatsHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetMetricsHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetPeersHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetStatsHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetStoreStatsHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) GetVersionHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) HTTPHandler() http.Handler + func (s *Server) Leader() string + func (s *Server) PeerHost(name string) (string, bool) + func (s *Server) PeerURL(name string) (string, bool) + func (s *Server) SetRegistry(registry *Registry) + func (s *Server) SetStore(store store.Store) + func (s *Server) SnapshotHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) SpeedTestHandler(w http.ResponseWriter, req *http.Request) error + func (s *Server) State() string + func (s *Server) Store() store.Store + func (s *Server) Term() uint64 + func (s *Server) URL() string + type SetClusterConfigCommand struct + Config *ClusterConfig + func (c *SetClusterConfigCommand) Apply(context raft.Context) (interface{}, error) + func (c *SetClusterConfigCommand) CommandName() string + type StandbyServer struct + Config StandbyServerConfig + func NewStandbyServer(config StandbyServerConfig, client *Client) *StandbyServer + func (s *StandbyServer) ClientHTTPHandler() http.Handler + func (s *StandbyServer) ClusterLeader() *machineMessage + func (s *StandbyServer) ClusterSize() int + func (s *StandbyServer) ClusterURLs() []string + func (s *StandbyServer) IsRunning() bool + func (s *StandbyServer) JoinIndex() uint64 + func (s *StandbyServer) RemoveNotify() <-chan bool + func (s *StandbyServer) SetRaftServer(raftServer raft.Server) + func (s *StandbyServer) SetSyncInterval(second float64) + func (s *StandbyServer) Start() + func (s *StandbyServer) Stop() + func (s *StandbyServer) SyncCluster(peers []string) error + type StandbyServerConfig struct + ClientURL string + DataDir string + Name string + PeerScheme string + PeerURL string + type TLSInfo struct + CAFile string + CertFile string + KeyFile string + func (info TLSInfo) ClientConfig() (*tls.Config, error) + func (info TLSInfo) Scheme() string + func (info TLSInfo) ServerConfig() (*tls.Config, error)