object

package
v0.0.0-...-0ba0ddf Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

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

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

func (*Server) Get

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

func (*Server) GetRange

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

func (*Server) GetRangeHash

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

func (*Server) Head

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

func (*Server) Put

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

func (*Server) Replicate

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

func (*Server) Search

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