object

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: 44 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.45.0

New provides protoobject.ObjectServiceServer for the given parameters.

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 {
	netmap.StateDetailed

	// 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 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, _ object.SearchFilters, _ map[int]meta.ParsedIntFilter, attrs []string, cursor *meta.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