object

package
v0.48.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: GPL-3.0 Imports: 46 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLInfoExtractor added in v0.45.0

type ACLInfoExtractor interface {
	PutRequestToInfo(*protoobject.PutRequest) (aclsvc.RequestInfo, user.ID, error)
	DeleteRequestToInfo(*protoobject.DeleteRequest) (aclsvc.RequestInfo, error)
	HeadRequestToInfo(*protoobject.HeadRequest) (aclsvc.RequestInfo, error)
	HashRequestToInfo(*protoobject.GetRangeHashRequest) (aclsvc.RequestInfo, error)
	GetRequestToInfo(*protoobject.GetRequest) (aclsvc.RequestInfo, error)
	RangeRequestToInfo(*protoobject.GetRangeRequest) (aclsvc.RequestInfo, error)
	SearchRequestToInfo(*protoobject.SearchRequest) (aclsvc.RequestInfo, error)
	SearchV2RequestToInfo(*protoobject.SearchV2Request) (aclsvc.RequestInfo, error)
}

ACLInfoExtractor is the interface that allows to fetch data required for ACL checks from various types of grpc requests.

type FSChain added in v0.45.0

type FSChain interface {
	container.Source
	netmap.StateDetailed
	icrypto.N3ScriptRunner

	// ForEachContainerNodePublicKeyInLastTwoEpochs iterates over all nodes matching
	// the referenced container's storage policy at the current and the previous
	// NeoFS epochs, and passes their public keys into f. IterateContainerNodeKeys
	// breaks without an error when f returns false. Keys may be repeated.
	//
	// Returns [apistatus.ErrContainerNotFound] if referenced container was not
	// found.
	ForEachContainerNodePublicKeyInLastTwoEpochs(cid.ID, func(pubKey []byte) bool) error

	// ForEachContainerNode iterates over all nodes matching the referenced
	// container's storage policy for now and passes their descriptors into f.
	// IterateContainerNodeKeys breaks without an error when f returns false.
	// Elements may be repeated.
	//
	// Returns [apistatus.ErrContainerNotFound] if referenced container was not
	// found.
	ForEachContainerNode(cnr cid.ID, f func(sdknetmap.NodeInfo) bool) error

	// IsOwnPublicKey checks whether given pubKey assigned to Node in the NeoFS
	// network map.
	IsOwnPublicKey(pubKey []byte) bool

	// LocalNodeUnderMaintenance checks whether local node is under maintenance
	// according to the network map from FSChain.
	LocalNodeUnderMaintenance() bool
}

FSChain provides access to the FS chain required to serve NeoFS API Object service.

type Handlers added in v0.45.0

Handlers represents storage node's internal handler Object service op payloads.

type MetricCollector added in v0.17.0

type MetricCollector interface {
	// HandleOpExecResult handles measured execution results of the given op.
	HandleOpExecResult(_ stat.Method, success bool, _ time.Duration)

	AddPutPayload(int)
	AddGetPayload(int)
}

MetricCollector tracks exec statistics for the following ops:

type Server added in v0.46.0

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

Server represents Object Service server that provides object manipulation operations including Get, Put, Head, Range, Delete, Search, and Replicate. The server enforces access control, verifies requests, and handles data storage and retrieval operations.

func New added in v0.45.0

func New(hs Handlers, magicNumber uint32, fsChain FSChain, st Storage, metaSvc *metasvc.Meta, signer ecdsa.PrivateKey, m MetricCollector, ac aclsvc.ACLChecker, rp ACLInfoExtractor, cs searchsvc.ClientConstructor) *Server

New provides protoobject.ObjectServiceServer for the given parameters.

func (*Server) Delete added in v0.46.0

func (*Server) Get added in v0.46.0

func (*Server) GetRange added in v0.46.0

func (*Server) GetRangeHash added in v0.46.0

GetRangeHash converts gRPC GetRangeHashRequest message and passes it to internal Object service.

func (*Server) Head added in v0.46.0

func (*Server) ProcessSearch added in v0.46.0

func (*Server) Put added in v0.46.0

func (*Server) Replicate added in v0.46.0

Replicate serves neo.fs.v2.object.ObjectService/Replicate RPC.

func (*Server) Search added in v0.46.0

func (*Server) SearchV2 added in v0.46.0

type Storage added in v0.45.0

type Storage interface {

	// VerifyAndStoreObjectLocally checks whether given object has correct format
	// and, if so, saves it in the Storage. StoreObject is called only when local
	// node complies with the container's storage policy.
	VerifyAndStoreObjectLocally(object.Object) error

	// SearchObjects selects up to count container's objects from the given
	// container matching the specified filters.
	SearchObjects(_ cid.ID, _ []objectcore.SearchFilter, attrs []string, cursor *objectcore.SearchCursor, count uint16) ([]sdkclient.SearchResultItem, []byte, error)
	// contains filtered or unexported methods
}

Storage groups ops of the node's storage required to serve NeoFS API Object service.

Directories

Path Synopsis
acl
v2
client
Package internal provides functionality for NeoFS Node Object service communication with NeoFS network.
Package internal provides functionality for NeoFS Node Object service communication with NeoFS network.

Jump to

Keyboard shortcuts

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