meta

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerLister

type ContainerLister interface {
	// List returns node's containers that support chain-based meta data and
	// any error that does not allow listing.
	List() (map[cid.ID]struct{}, error)
	// IsMineWithMeta checks if the given CID has meta enabled and current
	// node belongs to it.
	IsMineWithMeta(cid.ID) (bool, error)
}

ContainerLister is a source of actual containers current node belongs to.

type Meta

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

Meta handles object meta information received from FS chain and object storages. Chain information is stored in Merkle-Patricia Tries. Full objects index is built and stored as a simple KV storage.

func New

func New(p Parameters) (*Meta, error)

New makes Meta.

func (*Meta) Reload

func (m *Meta) Reload(p Parameters) error

Reload updates service in runtime. Currently supported fields:

  • endpoints

func (*Meta) Run

func (m *Meta) Run(ctx context.Context) error

Run starts notification handling. Must be called only on instances created with New. Blocked until context is done.

type Parameters

type Parameters struct {
	Logger          *zap.Logger
	ContainerLister ContainerLister
	Timeout         time.Duration
	ContainerHash   util.Uint160
	NetmapHash      util.Uint160
	RootPath        string

	// fields that support runtime reload
	NeoEnpoints []string
}

Parameters groups arguments for New call.

Jump to

Keyboard shortcuts

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