boltdb

package
v3.30.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package boltdb contains the boltdb implementation of the Balancer interface.

Index

Constants

This section is empty.

Variables

View Source
var BalancerBuckets []boltdb.Bucket = []boltdb.Bucket{
	bucketBalancer,
}

BalancerBuckets defines the buckets used by this package. It can be called during setup to create the buckets ahead of time.

Functions

func NewBalancer

func NewBalancer(db *boltdb.DB, schemar schemar.Schemar, logger logger.Logger) *balancer.Balancer

NewBalancer returns a new instance of controller.Balancer.

Types

type NodeService

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

NodeService represents a service for managing nodes.

func NewNodeService

func NewNodeService(db *boltdb.DB, logger logger.Logger) *NodeService

NewNodeService returns a new instance of NodeService with default values.

func (*NodeService) CreateNode

func (s *NodeService) CreateNode(tx dax.Transaction, addr dax.Address, node *dax.Node) error

func (*NodeService) DeleteNode

func (s *NodeService) DeleteNode(tx dax.Transaction, addr dax.Address) error

func (*NodeService) Nodes

func (s *NodeService) Nodes(tx dax.Transaction) ([]*dax.Node, error)

func (*NodeService) ReadNode

func (s *NodeService) ReadNode(tx dax.Transaction, addr dax.Address) (*dax.Node, error)

Jump to

Keyboard shortcuts

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