Documentation ¶
Index ¶
- Variables
- func NewNATSTransport(id string, conn *nats.Conn, timeout time.Duration, logOutput io.Writer) (*raft.NetworkTransport, error)
- func NewNATSTransportWithConfig(id string, conn *nats.Conn, config *raft.NetworkTransportConfig) (*raft.NetworkTransport, error)
- func NewNATSTransportWithLogger(id string, conn *nats.Conn, timeout time.Duration, logger *log.Logger) (*raft.NetworkTransport, error)
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.
Click to show internal directories.
Click to hide internal directories.