Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultServerTickTime = 2000 DefaultServerInitLimit = 10 DefaultServerSyncLimit = 5 DefaultServerAutoPurgeSnapRetainCount = 3 DefaultPeerPort = 2888 DefaultLeaderElectionPort = 3888 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrMissingServerConfigField ¶
type ErrMissingServerConfigField string
func (ErrMissingServerConfigField) Error ¶
func (e ErrMissingServerConfigField) Error() string
type Server ¶
type ServerConfig ¶
type ServerConfig struct { TickTime int // Number of milliseconds of each tick InitLimit int // Number of ticks that the initial synchronization phase can take SyncLimit int // Number of ticks that can pass between sending a request and getting an acknowledgement DataDir string // Direcrory where the snapshot is stored ClientPort int // Port at which clients will connect AutoPurgeSnapRetainCount int // Number of snapshots to retain in dataDir AutoPurgePurgeInterval int // Purge task internal in hours (0 to disable auto purge) Servers []ServerConfigServer }
type ServerConfigServer ¶
type TestCluster ¶
type TestCluster struct { Path string Servers []TestServer }
func StartTestCluster ¶
func StartTestCluster(size int, stdout, stderr io.Writer) (*TestCluster, error)
func (*TestCluster) Stop ¶
func (tc *TestCluster) Stop() error
type TestServer ¶
Click to show internal directories.
Click to hide internal directories.