atomix

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 10 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 *database.DatabaseConfig, protocol primitive.Protocol, opts ...NodeOption) *Node

NewNode creates a new node running the given protocol

func (*Node) RegisterPrimitive

func (n *Node) RegisterPrimitive(t primitiveapi.PrimitiveType, primitive primitive.Primitive)

RegisterPrimitive registers a primitive type

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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