Documentation ¶
Index ¶
- Constants
- type NodeStorage
- func (nodeStorage *NodeStorage) DeleteNode(ip string) error
- func (nodeStorage *NodeStorage) NodeByID(id string) (*entry.Node, error)
- func (nodeStorage *NodeStorage) NodeByIP(ip string) (*entry.Node, error)
- func (nodeStorage *NodeStorage) NodeByName(name string) (*entry.Node, error)
- func (nodeStorage *NodeStorage) SetNodeData(nodeData *types.NodeData) error
- func (nodeStorage *NodeStorage) SetNodeLabels(ip string, labels map[string]string) error
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.
Click to show internal directories.
Click to hide internal directories.