object

package
v0.44.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object header not found")
View Source
var RequestContextKey = RequestContextKeyT{}

Functions

This section is empty.

Types

type ClientConstructor added in v0.40.0

type ClientConstructor interface {
	Get(clientcore.NodeInfo) (clientcore.MultiAddressClient, error)
}

type Common

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

Common is an Object API ServiceServer which encapsulates logic spread to all object operations.

If underlying NodeState.IsMaintenance returns true, all operations are immediately failed with apistatus.NodeUnderMaintenance.

func (*Common) Delete

func (*Common) Get

func (x *Common) Get(req *objectV2.GetRequest, stream GetObjectStream) error

func (*Common) GetRange

func (x *Common) GetRange(req *objectV2.GetRangeRequest, stream GetObjectRangeStream) error

func (*Common) GetRangeHash

func (*Common) Head

func (*Common) Init

func (x *Common) Init(state NodeState, nextHandler ServiceServer)

Init initializes the Common instance.

func (*Common) Patch added in v0.43.0

func (x *Common) Patch() (PatchObjectStream, error)

func (*Common) Put

func (x *Common) Put() (PutObjectStream, error)

func (*Common) PutSingle added in v0.37.0

func (*Common) Search

func (x *Common) Search(req *objectV2.SearchRequest, stream SearchStream) error

type GetObjectRangeStream

type GetObjectRangeStream interface {
	util.ServerStream
	Send(*object.GetRangeResponse) error
}

GetObjectRangeStream is an interface of FrostFS API v2 compatible payload range streamer.

type GetObjectStream

type GetObjectStream interface {
	util.ServerStream
	Send(*object.GetResponse) error
}

GetObjectStream is an interface of FrostFS API v2 compatible object streamer.

type MetricCollector

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

func NewMetricCollector

func NewMetricCollector(next ServiceServer, register MetricRegister, enabled bool) *MetricCollector

func (MetricCollector) Delete

func (*MetricCollector) Disable

func (m *MetricCollector) Disable()

func (*MetricCollector) Enable

func (m *MetricCollector) Enable()

func (MetricCollector) Get

func (m MetricCollector) Get(req *object.GetRequest, stream GetObjectStream) (err error)

func (MetricCollector) GetRange

func (MetricCollector) GetRangeHash

func (MetricCollector) Head

func (MetricCollector) Patch added in v0.43.0

func (MetricCollector) Put

func (MetricCollector) PutSingle added in v0.37.0

func (MetricCollector) Search

func (m MetricCollector) Search(req *object.SearchRequest, stream SearchStream) error

type MetricRegister

type MetricRegister interface {
	AddRequestDuration(string, time.Duration, bool)
	AddPayloadSize(string, int)
}

type NodeState

type NodeState interface {
	// IsMaintenance checks if node is under maintenance. Node MUST NOT serve
	// local object operations. Node MUST respond with apistatus.NodeUnderMaintenance
	// error if IsMaintenance returns true.
	IsMaintenance() bool
}

NodeState is storage node state processed by Object service.

type PatchObjectStream added in v0.43.0

type PatchObjectStream interface {
	Send(context.Context, *object.PatchRequest) error
	CloseAndRecv(context.Context) (*object.PatchResponse, error)
}

PatchObjectStream is an interface of FrostFS API v2 compatible patch streamer.

type PutObjectStream

type PutObjectStream interface {
	Send(context.Context, *object.PutRequest) error
	CloseAndRecv(context.Context) (*object.PutResponse, error)
}

PutObjectStream is an interface of FrostFS API v2 compatible client's object streamer.

type RemoteReader added in v0.40.0

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

RemoteReader represents utility for getting the object from a remote host.

func NewRemoteReader added in v0.40.0

func NewRemoteReader(keyStorage *util.KeyStorage, cache ClientConstructor) *RemoteReader

NewRemoteReader creates, initializes and returns new RemoteHeader instance.

func (*RemoteReader) Get added in v0.40.0

func (*RemoteReader) Head added in v0.40.0

Head requests object header from the remote node.

type RemoteRequestPrm added in v0.40.0

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

RemoteRequestPrm groups remote operation parameters.

func (*RemoteRequestPrm) WithNodeInfo added in v0.40.0

func (p *RemoteRequestPrm) WithNodeInfo(v netmap.NodeInfo) *RemoteRequestPrm

WithNodeInfo sets information about the remote node.

func (*RemoteRequestPrm) WithObjectAddress added in v0.40.0

func (p *RemoteRequestPrm) WithObjectAddress(v oid.Address) *RemoteRequestPrm

WithObjectAddress sets object address.

func (*RemoteRequestPrm) WithRaw added in v0.40.0

func (p *RemoteRequestPrm) WithRaw(v bool) *RemoteRequestPrm

type RequestContext added in v0.38.0

type RequestContext struct {
	Namespace string

	SenderKey []byte

	ContainerOwner user.ID

	Role acl.Role

	SoftAPECheck bool

	BearerToken *bearer.Token
}

RequestContext is a context passed between middleware handlers.

type RequestContextKeyT added in v0.38.0

type RequestContextKeyT struct{}

type ResponseService

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

func NewResponseService

func NewResponseService(objSvc ServiceServer, respSvc *response.Service) *ResponseService

NewResponseService returns object service instance that passes internal service call to response service.

func (*ResponseService) Delete

func (*ResponseService) Get

func (s *ResponseService) Get(req *object.GetRequest, stream GetObjectStream) error

func (*ResponseService) GetRange

func (*ResponseService) GetRangeHash

func (*ResponseService) Head

func (*ResponseService) Patch added in v0.43.0

func (s *ResponseService) Patch() (PatchObjectStream, error)

func (*ResponseService) Put

func (*ResponseService) PutSingle added in v0.37.0

func (*ResponseService) Search

func (s *ResponseService) Search(req *object.SearchRequest, stream SearchStream) error

type SearchStream

type SearchStream interface {
	util.ServerStream
	Send(*object.SearchResponse) error
}

SearchStream is an interface of FrostFS API v2 compatible search streamer.

type ServiceServer

ServiceServer is an interface of utility serving v2 Object service.

func NewAuditService added in v0.42.0

func NewAuditService(next ServiceServer, log *logger.Logger, enabled *atomic.Bool) ServiceServer

type SignService

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

func NewSignService

func NewSignService(key *ecdsa.PrivateKey, svc ServiceServer) *SignService

func (*SignService) Delete

func (*SignService) Get

func (s *SignService) Get(req *object.GetRequest, stream GetObjectStream) error

func (*SignService) GetRange

func (s *SignService) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error

func (*SignService) GetRangeHash

func (*SignService) Head

func (*SignService) Patch added in v0.43.0

func (s *SignService) Patch() (PatchObjectStream, error)

func (*SignService) Put

func (s *SignService) Put() (PutObjectStream, error)

func (*SignService) PutSingle added in v0.37.0

func (*SignService) Search

func (s *SignService) Search(req *object.SearchRequest, stream SearchStream) error

type TransportSplitter

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

func NewTransportSplitter

func NewTransportSplitter(size, amount uint64, next ServiceServer) *TransportSplitter

func (TransportSplitter) Delete

func (*TransportSplitter) Get

func (TransportSplitter) GetRange

func (TransportSplitter) GetRangeHash

func (TransportSplitter) Head

func (TransportSplitter) Patch added in v0.43.0

func (TransportSplitter) Put

func (TransportSplitter) PutSingle added in v0.37.0

func (TransportSplitter) Search

func (c TransportSplitter) Search(req *object.SearchRequest, stream SearchStream) error

Directories

Path Synopsis
acl
v2
common
v2
get
v2
client
Package internal provides functionality for FrostFS Node Object service communication with FrostFS network.
Package internal provides functionality for FrostFS Node Object service communication with FrostFS network.
put
v2
v2

Jump to

Keyboard shortcuts

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