Documentation
¶
Index ¶
- type Meta
- func (m *Meta) NotifyObjectSuccess(ch chan<- struct{}, addr oid.Address)
- func (m *Meta) Reload(p Parameters) error
- func (m *Meta) Run(ctx context.Context) error
- func (m *Meta) Search(cID cid.ID, fs []objectcore.SearchFilter, attrs []string, ...) ([]client.SearchResultItem, []byte, error)
- func (m *Meta) UnsubscribeFromObject(addr oid.Address)
- type NeoFSNetwork
- type Parameters
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 (*Meta) NotifyObjectSuccess ¶ added in v0.46.1
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 ¶
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
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.