Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Log(v ...interface{})
Logf(s string, v ...interface{})
}
Logger is abstract type for debug log messages
type LoggerAdapter ¶
type LoggerAdapter struct {
// contains filtered or unexported fields
}
LoggerAdapter allows a log.Logger to be used with the local Logger interface
func (*LoggerAdapter) Log ¶
func (a *LoggerAdapter) Log(v ...interface{})
Log a message to the contained debug log
func (*LoggerAdapter) Logf ¶
func (a *LoggerAdapter) Logf(s string, v ...interface{})
Logf will record a formatted message to the contained debug log
type TransportHooks ¶
type TransportHooks interface {
// PreRPC is called before every single RPC call from the transport
PreRPC(src, target string, r *raft.RPC) error
// PostRPC is called after the RPC call has been processed by the target, but before the source see's the response
PostRPC(src, target string, r *raft.RPC, result *raft.RPCResponse) error
// PreREquestVote is called before sending a RequestVote RPC request.
PreRequestVote(src, target string, r *raft.RequestVoteRequest) (*raft.RequestVoteResponse, error)
// PreAppendEntries is called before sending an AppendEntries RPC request.
PreAppendEntries(src, target string, r *raft.AppendEntriesRequest) (*raft.AppendEntriesResponse, error)
}
TransportHooks allow a test to customize the behavior of the transport. [if you return an error from a PreXXX call, then the error is returned to the caller, and the RPC never made]
Click to show internal directories.
Click to hide internal directories.