network

package
v0.0.0-...-7f8ad27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToAppendRequest

func ConvertToAppendRequest(bufferName, target string, args *rafthashi.AppendEntriesRequest) *intra.AppendEntriesRequest

Types

type ClientCache

type ClientCache struct {
	// contains filtered or unexported fields
}

func NewClientCache

func NewClientCache() *ClientCache

func (*ClientCache) Fetch

func (c *ClientCache) Fetch(target string) intra.NodeRaftClient

type IOFetcher

type IOFetcher interface {
	Create(name string, bufferSize uint64, peers []string) error
	Leader(name string) (string, error)
	Status() map[string][]string
	SetExpectedPeers(name string, expectedPeers []string) error
}

type Inbound

type Inbound struct {
	// contains filtered or unexported fields
}

func NewInbound

func NewInbound(addr string, schedulerHandler intra.NodeServer) *Inbound

func (*Inbound) Addr

func (i *Inbound) Addr() string

func (*Inbound) AppendEntries

func (i *Inbound) AppendEntries(ctx context.Context, in *intra.AppendEntriesRequest) (resp *intra.AppendEntriesResponse, err error)

func (*Inbound) Fetch

func (i *Inbound) Fetch(bufferName string) <-chan rafthashi.RPC

func (*Inbound) RequestVote

func (i *Inbound) RequestVote(ctx context.Context, in *intra.RequestVoteRequest) (resp *intra.RequestVoteResponse, err error)

type Pipeline

type Pipeline struct {
	// contains filtered or unexported fields
}

func NewPipeline

func NewPipeline(bufferName, target string, client intra.NodeRaftClient) *Pipeline

func (*Pipeline) Close

func (p *Pipeline) Close() error

func (*Pipeline) Consumer

func (p *Pipeline) Consumer() <-chan rafthashi.AppendFuture

type SchedulerInbound

type SchedulerInbound struct {
	// contains filtered or unexported fields
}

func NewSchedulerInbound

func NewSchedulerInbound(externalAddr string, ioFetcher IOFetcher) *SchedulerInbound

func (*SchedulerInbound) Create

func (*SchedulerInbound) Leader

func (*SchedulerInbound) Status

func (*SchedulerInbound) UpdateConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL