node

package
v0.0.0-...-b392570 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketName represents the name of the bucket where this stores data.
	BucketName = "nodes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeStorage

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

NodeStorage is exported

func NewNodeStorage

func NewNodeStorage(driver *bolt.DB) (*NodeStorage, error)

NewNodeStorage is exported

func (*NodeStorage) DeleteNode

func (nodeStorage *NodeStorage) DeleteNode(ip string) error

DeleteNode deletes a node entry.

func (*NodeStorage) NodeByID

func (nodeStorage *NodeStorage) NodeByID(id string) (*entry.Node, error)

NodeByID is exported

func (*NodeStorage) NodeByIP

func (nodeStorage *NodeStorage) NodeByIP(ip string) (*entry.Node, error)

NodeByIP is exported

func (*NodeStorage) NodeByName

func (nodeStorage *NodeStorage) NodeByName(name string) (*entry.Node, error)

NodeByName is exported

func (*NodeStorage) SetNodeData

func (nodeStorage *NodeStorage) SetNodeData(nodeData *types.NodeData) error

SetNodeData set a node entry.

func (*NodeStorage) SetNodeLabels

func (nodeStorage *NodeStorage) SetNodeLabels(ip string, labels map[string]string) error

SetNodeLabels set a node labels.

Jump to

Keyboard shortcuts

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