transport

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Overview

Package transport provides a Transport for github.com/hashicorp/raft over gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitIndex

type CommitIndex interface {
	CommandCommitIndex() uint64
	LeaderCommitIndex() uint64
}

type Manager

type Manager struct {
	*connections.Manager
	// contains filtered or unexported fields
}

func New

func New(conns *connections.Manager, options ...Option) *Manager

New creates both components of raft-grpc-transport: a gRPC service and a Raft Transport.

func (*Manager) Close

func (m *Manager) Close() (err error)

func (*Manager) Register

func (m *Manager) Register(s grpc.ServiceRegistrar)

Register the RaftTransport gRPC service on a gRPC server.

func (*Manager) Transport

func (m *Manager) Transport() raft.Transport

Transport returns a raft.Transport that communicates over gRPC.

type Option

type Option func(m *Manager)

func WithHeartbeatTimeout

func WithHeartbeatTimeout(d time.Duration) Option

WithHeartbeatTimeout configures the transport to not wait for than d for heartbeat to be executes by remote peer.

Jump to

Keyboard shortcuts

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