Documentation ¶
Overview ¶
globals defines the global variables shared between primary and backup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The port of the replica. Port int // The Operation request ID. OpNum int // The current view number. ViewNum int // The current commit number. CommitNum int // The mode of the replica. Only monitor is supposed to change this. Mode string // The operation log. OpLog *oplog.OpRequestLog // The client table. ClientTable *table.ClientTable // The global cancellable context. CtxCancel context.Context // AllPorts is a map from id to port. AllPorts = map[int]int{} )
Functions ¶
func AllOtherPorts ¶
func AllOtherPorts() []int
AllOtherPorts returns all the other replica ports except for that of the current node.
func GetOrCreateClient ¶
GetOrCreateClient returns a cached rpc.Client or creates a new rpc.Client.
Types ¶
type MutexString ¶
MutexString is a thread-safe string.
Click to show internal directories.
Click to hide internal directories.