natslog

package module
v0.0.0-...-99ac1ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 14 Imported by: 0

README

nats-on-a-log

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

Documentation

Overview

Package natslog provides an implementation of the Transport interface for the HashiCorp Raft library using NATS.

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