meta

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: GPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) NotifyObjectSuccess added in v0.46.1

func (m *Meta) NotifyObjectSuccess(ch chan<- struct{}, addr oid.Address)

NotifyObjectSuccess subscribes channel for object notification chain inclusion. Channel must be read before subscription is made and writing to it must be non-blocking.

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.

func (*Meta) Search added in v0.46.0

func (m *Meta) Search(cID cid.ID, fs []objectcore.SearchFilter, attrs []string, cursor *objectcore.SearchCursor, count uint16) ([]client.SearchResultItem, []byte, error)

Search selects up to count container's objects from the given container matching the specified filters.

func (*Meta) UnsubscribeFromObject added in v0.46.1

func (m *Meta) UnsubscribeFromObject(addr oid.Address)

UnsubscribeFromObject unsibscribes from object notification. Should be called if notification is not required as a memory clean up.

type NeoFSNetwork added in v0.45.2

type NeoFSNetwork interface {
	// Epoch returns current epoch in the NeoFS network.
	Epoch() (uint64, error)
	// List returns node's containers that support chain-based meta data and
	// any error that does not allow listing.
	List(uint64) (map[cid.ID]struct{}, error)
	// IsMineWithMeta checks if the given container has meta enabled and current
	// node belongs to it.
	IsMineWithMeta([]byte) (bool, error)
	// Head returns actual object header from the NeoFS network (non-local
	// objects should also be returned). Missing, removed object statuses
	// must be reported according to API statuses from SDK.
	Head(context.Context, cid.ID, oid.ID) (object.Object, error)
}

NeoFSNetwork describes current NeoFS storage network state.

type Parameters

type Parameters struct {
	Logger        *zap.Logger
	Network       NeoFSNetwork
	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