raftmod

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

README

raftmod

Raft Service Module

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogStoreClass = reflect.TypeOf((*raft.LogStore)(nil)).Elem()
View Source
var SnapshotStoreClass = reflect.TypeOf((*raft.SnapshotStore)(nil)).Elem()
View Source
var StableStoreClass = reflect.TypeOf((*raft.StableStore)(nil)).Elem()

Functions

func LocalIP

func LocalIP() (net.IP, error)

LocalIP get the host machine local IP address

func NewEncryptedSnapshotStore added in v1.0.3

func NewEncryptedSnapshotStore(store raft.SnapshotStore, token string) (raft.SnapshotStore, error)

func RaftClientPool

func RaftClientPool() raftapi.RaftClientPool

func RaftLogStoreFactory

func RaftLogStoreFactory() glue.FactoryBean

func RaftServer

func RaftServer() raftapi.RaftServer

func RaftSnapshotFactory

func RaftSnapshotFactory() glue.FactoryBean

func RaftStableStoreFactory

func RaftStableStoreFactory() glue.FactoryBean

func StreamDecrypter added in v1.0.3

func StreamDecrypter(sessionKey []byte, source io.ReadCloser) (io.ReadCloser, error)

func StreamEncrypter added in v1.0.3

func StreamEncrypter(sessionKey []byte, sink raft.SnapshotSink) (raft.SnapshotSink, error)

Types

type EmptyAddr

type EmptyAddr struct {
}

func (EmptyAddr) Network

func (t EmptyAddr) Network() string

func (EmptyAddr) String

func (t EmptyAddr) String() string

type TCPStreamLayer

type TCPStreamLayer struct {
	// contains filtered or unexported fields
}

TCPStreamLayer implements StreamLayer interface for plain TCP.

func (*TCPStreamLayer) Accept

func (t *TCPStreamLayer) Accept() (c net.Conn, err error)

Accept implements the net.Listener interface.

func (*TCPStreamLayer) Addr

func (t *TCPStreamLayer) Addr() net.Addr

Addr implements the net.Listener interface.

func (*TCPStreamLayer) Close

func (t *TCPStreamLayer) Close() (err error)

Close implements the net.Listener interface.

func (*TCPStreamLayer) Dial

func (t *TCPStreamLayer) Dial(address raft.ServerAddress, timeout time.Duration) (net.Conn, error)

Dial implements the StreamLayer interface.

Jump to

Keyboard shortcuts

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