pnetclient

package
v0.0.0-...-dde4a86 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(node globals.Node) (*grpc.ClientConn, error)

Dial a node and return a connection if successful

func Distribute

func Distribute(key *keyman.Key, peers []globals.Node, generation int) error

Distribute chunked key over the network

func JoinCluster

func JoinCluster(password string) error

JoinCluster is used to request to join a raft cluster

func KSMObserver

func KSMObserver(ksm *keyman.KeyStateMachine)

KSMObserver does raft stuff when the key state machine changes

func NewGeneration

func NewGeneration(password string) (generation int64, peers []string, err error)

NewGeneration is used to create a new KeyPair generation in the cluster, prior to this node joining.

func Ping

func Ping()

Ping the peers

func RequestKeyPiece

func RequestKeyPiece(uuid string, generation int64) (*keyman.KeyPiece, error)

RequestKeyPiece from a node based on its UUID

func SendKeyPiece

func SendKeyPiece(uuid string, generation int64, piece *keyman.KeyPiece, addElement bool) error

SendKeyPiece to the node specified by the UUID

Types

This section is empty.

Jump to

Keyboard shortcuts

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