draft

package
v0.0.0-...-2eec6a9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Draft

type Draft struct {
	Replicas int
	Nodes    []Node
}

func New

func New(replicas int) (*Draft, error)

func Unmarshal

func Unmarshal(data []byte) (*Draft, error)

func (*Draft) Alloc

func (draft *Draft) Alloc() (*spec.SAT, error)

func (*Draft) Marshal

func (draft *Draft) Marshal() ([]byte, error)

func (*Draft) Validate

func (draft *Draft) Validate() error

func (*Draft) WorkingNodes

func (draft *Draft) WorkingNodes() []Node

type Node

type Node struct {
	ID     string
	Addr   string
	Weight int
}

Jump to

Keyboard shortcuts

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