raft: github.com/hashicorp/raft/fuzzy Index | Files

package fuzzy

import "github.com/hashicorp/raft/fuzzy"


Package Files

apply_src.go cluster.go fsm.go node.go resolve.go transport.go verifier.go

type Logger Uses

type Logger interface {
    Log(v ...interface{})
    Logf(s string, v ...interface{})

Logger is abstract type for debug log messages

type LoggerAdapter Uses

type LoggerAdapter struct {
    // contains filtered or unexported fields

LoggerAdapter allows a log.Logger to be used with the local Logger interface

func (*LoggerAdapter) Log Uses

func (a *LoggerAdapter) Log(v ...interface{})

Log a message to the contained debug log

func (*LoggerAdapter) Logf Uses

func (a *LoggerAdapter) Logf(s string, v ...interface{})

Logf will record a formatted message to the contained debug log

type TransportHooks Uses

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]

Package fuzzy imports 19 packages (graph). Updated 2019-06-04. Refresh now. Tools for package owners.