atomix

package
v0.0.0-...-1bf965b Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ID string
	// contains filtered or unexported fields
}

Node is an Atomix node

func NewNode

func NewNode(nodeID string, config *controller.PartitionConfig, protocol node.Protocol, registry *node.Registry, opts ...NodeOption) *Node

NewNode creates a new node running the given protocol

func (*Node) Start

func (n *Node) Start() error

Start starts the node

func (*Node) Stop

func (n *Node) Stop() error

Stop stops the node

type NodeOption

type NodeOption interface {
	// contains filtered or unexported methods
}

NodeOption is an option for constructing a Node

func WithLocal

func WithLocal(lis net.Listener) NodeOption

WithLocal sets the node to local mode for testing

func WithPort

func WithPort(port int) NodeOption

WithPort sets the port on the node

Jump to

Keyboard shortcuts

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