natslog

package module
v0.0.0-...-5cacfa5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 14 Imported by: 3

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 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 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 string, conn *nats.Conn, timeout time.Duration, logger *log.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