natslog

package module
v0.0.0-...-bb17516 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 14 Imported by: 2

README

nats-on-a-log

This library provides a NATS transport for HashiCorp's Raft implementation.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("natslog: read timeout")

Functions

func NewNATSTransport

func NewNATSTransport(
	id, subjectPrefix string,
	conn *nats.Conn,
	timeout time.Duration,
	logOutput io.Writer) (*raft.NetworkTransport, error)

NewNATSTransport creates a new raft.NetworkTransport implemented with NATS as the transport layer.

func NewNATSTransportWithConfig

func NewNATSTransportWithConfig(
	id, subjectPrefix string,
	conn *nats.Conn,
	config *raft.NetworkTransportConfig) (*raft.NetworkTransport, error)

NewNATSTransportWithConfig returns a raft.NetworkTransport implemented with NATS as the transport layer, using the given config struct.

func NewNATSTransportWithLogger

func NewNATSTransportWithLogger(
	id, subjectPrefix string,
	conn *nats.Conn,
	timeout time.Duration,
	logger hclog.Logger) (*raft.NetworkTransport, error)

NewNATSTransportWithLogger creates a new raft.NetworkTransport implemented with NATS as the transport layer using the provided Logger.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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