object

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node added in v0.41.0

type Node interface {
	// 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

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

	// VerifyAndStoreObject checks whether given object has correct format and, if
	// so, saves it into local object storage of the Node. StoreObject is called
	// only when the Node complies with the container's storage policy.
	VerifyAndStoreObject(objectsdk.Object) error
}

Node represents NeoFS storage node that is served by Server.

type Server added in v0.12.0

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

Server wraps NeoFS API Object service and provides gRPC Object service server interface.

func New

func New(c objectSvc.ServiceServer, node Node) *Server

New creates, initializes and returns Server instance.

func (*Server) Delete added in v0.12.0

Delete converts gRPC DeleteRequest message and passes it to internal Object service.

func (*Server) Get added in v0.12.0

Get converts gRPC GetRequest message and server-side stream and overtakes its data to gRPC stream.

func (*Server) GetRange added in v0.12.0

GetRange converts gRPC GetRangeRequest message and server-side stream and overtakes its data to gRPC stream.

func (*Server) GetRangeHash added in v0.12.0

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

func (*Server) Head added in v0.12.0

Head converts gRPC HeadRequest message and passes it to internal Object service.

func (*Server) Put added in v0.12.0

Put opens internal Object service Put stream and overtakes data from gRPC stream to it.

func (*Server) Replicate added in v0.41.0

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

func (*Server) Search added in v0.12.0

Search converts gRPC SearchRequest message and server-side stream and overtakes its data to gRPC stream.

Jump to

Keyboard shortcuts

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