block_store_controller

package
v0.51.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStoreBuilder

type BlockStoreBuilder = refcount.RefCountResolver[block_store.Store]

BlockStoreBuilder builds a block store.

returns the store and an optional release function can return nil to indicate not found.

func NewBlockStoreBuilder

func NewBlockStoreBuilder(store block_store.Store) BlockStoreBuilder

NewBlockStoreBuilder creates a new BlockStoreBuilder with a static block store.

func WrapVerboseBlockStoreBuilder

func WrapVerboseBlockStoreBuilder(le *logrus.Entry, builder BlockStoreBuilder) BlockStoreBuilder

WrapVerboseBlockStoreBuilder wraps a BlockStoreBuilder to be verbose.

type Controller

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

Controller resolves LookupBlockStore with a block_store.Store.

func NewController

func NewController(
	le *logrus.Entry,
	info *controller.Info,
	resolver BlockStoreBuilder,
	blockStoreIds []string,
	buildOnStart bool,
	bucketIDs []string,
	skipNotFound,
	verbose bool,
) *Controller

NewController constructs a new controller.

blockStoreIds is the list of block store ids to match LookupBlockStore. buildOnStart adds a reference on startup & always runs the block store. bucketIDs is a list of bucket ids to resolve LookupBlockFromNetwork directives.

func (*Controller) AddBlockStoreRef

AddBlockStoreRef adds a reference to the block store.

func (*Controller) Close

func (c *Controller) Close() error

Close releases any resources used by the controller.

func (*Controller) Execute

func (c *Controller) Execute(ctx context.Context) error

Execute executes the controller.

func (*Controller) GetControllerInfo

func (c *Controller) GetControllerInfo() *controller.Info

GetControllerInfo returns information about the controller.

func (*Controller) HandleDirective

func (c *Controller) HandleDirective(
	ctx context.Context,
	inst directive.Instance,
) ([]directive.Resolver, error)

HandleDirective asks if the handler can resolve the directive.

func (*Controller) WaitBlockStore

WaitBlockStore adds a reference to the block store and waits for it to be constructed.

Jump to

Keyboard shortcuts

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