Documentation ¶
Index ¶
- Variables
- type Common
- func (x *Common) Delete(ctx context.Context, req *objectV2.DeleteRequest) (*objectV2.DeleteResponse, error)
- func (x *Common) Get(req *objectV2.GetRequest, stream GetObjectStream) error
- func (x *Common) GetRange(req *objectV2.GetRangeRequest, stream GetObjectRangeStream) error
- func (x *Common) GetRangeHash(ctx context.Context, req *objectV2.GetRangeHashRequest) (*objectV2.GetRangeHashResponse, error)
- func (x *Common) Head(ctx context.Context, req *objectV2.HeadRequest) (*objectV2.HeadResponse, error)
- func (x *Common) Init(state NodeState, nextHandler ServiceServer)
- func (x *Common) Put() (PutObjectStream, error)
- func (x *Common) PutSingle(ctx context.Context, req *objectV2.PutSingleRequest) (*objectV2.PutSingleResponse, error)
- func (x *Common) Search(req *objectV2.SearchRequest, stream SearchStream) error
- type GetObjectRangeStream
- type GetObjectStream
- type MetricCollector
- func (m MetricCollector) Delete(ctx context.Context, request *object.DeleteRequest) (*object.DeleteResponse, error)
- func (m *MetricCollector) Disable()
- func (m *MetricCollector) Enable()
- func (m MetricCollector) Get(req *object.GetRequest, stream GetObjectStream) (err error)
- func (m MetricCollector) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
- func (m MetricCollector) GetRangeHash(ctx context.Context, request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
- func (m MetricCollector) Head(ctx context.Context, request *object.HeadRequest) (*object.HeadResponse, error)
- func (m MetricCollector) Put() (PutObjectStream, error)
- func (m MetricCollector) PutSingle(ctx context.Context, request *object.PutSingleRequest) (*object.PutSingleResponse, error)
- func (m MetricCollector) Search(req *object.SearchRequest, stream SearchStream) error
- type MetricRegister
- type NodeState
- type PutObjectStream
- type RequestContext
- type RequestContextKeyT
- type ResponseService
- func (s *ResponseService) Delete(ctx context.Context, req *object.DeleteRequest) (*object.DeleteResponse, error)
- func (s *ResponseService) Get(req *object.GetRequest, stream GetObjectStream) error
- func (s *ResponseService) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
- func (s *ResponseService) GetRangeHash(ctx context.Context, req *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
- func (s *ResponseService) Head(ctx context.Context, req *object.HeadRequest) (*object.HeadResponse, error)
- func (s *ResponseService) Put() (PutObjectStream, error)
- func (s *ResponseService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
- func (s *ResponseService) Search(req *object.SearchRequest, stream SearchStream) error
- type SearchStream
- type ServiceServer
- type SignService
- func (s *SignService) Delete(ctx context.Context, req *object.DeleteRequest) (*object.DeleteResponse, error)
- func (s *SignService) Get(req *object.GetRequest, stream GetObjectStream) error
- func (s *SignService) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
- func (s *SignService) GetRangeHash(ctx context.Context, req *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
- func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*object.HeadResponse, error)
- func (s *SignService) Put() (PutObjectStream, error)
- func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
- func (s *SignService) Search(req *object.SearchRequest, stream SearchStream) error
- type TransportSplitter
- func (c TransportSplitter) Delete(ctx context.Context, request *object.DeleteRequest) (*object.DeleteResponse, error)
- func (c *TransportSplitter) Get(req *object.GetRequest, stream GetObjectStream) error
- func (c TransportSplitter) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
- func (c TransportSplitter) GetRangeHash(ctx context.Context, request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
- func (c TransportSplitter) Head(ctx context.Context, request *object.HeadRequest) (*object.HeadResponse, error)
- func (c TransportSplitter) Put() (PutObjectStream, error)
- func (c TransportSplitter) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
- func (c TransportSplitter) Search(req *object.SearchRequest, stream SearchStream) error
Constants ¶
This section is empty.
Variables ¶
var RequestContextKey = RequestContextKeyT{}
Functions ¶
This section is empty.
Types ¶
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 (x *Common) Delete(ctx context.Context, req *objectV2.DeleteRequest) (*objectV2.DeleteResponse, error)
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 (x *Common) GetRangeHash(ctx context.Context, req *objectV2.GetRangeHashRequest) (*objectV2.GetRangeHashResponse, error)
func (*Common) Head ¶
func (x *Common) Head(ctx context.Context, req *objectV2.HeadRequest) (*objectV2.HeadResponse, error)
func (*Common) Init ¶
func (x *Common) Init(state NodeState, nextHandler ServiceServer)
Init initializes the Common instance.
func (*Common) Put ¶
func (x *Common) Put() (PutObjectStream, error)
func (*Common) PutSingle ¶ added in v0.37.0
func (x *Common) PutSingle(ctx context.Context, req *objectV2.PutSingleRequest) (*objectV2.PutSingleResponse, error)
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 (m MetricCollector) Delete(ctx context.Context, request *object.DeleteRequest) (*object.DeleteResponse, error)
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 (m MetricCollector) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
func (MetricCollector) GetRangeHash ¶
func (m MetricCollector) GetRangeHash(ctx context.Context, request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
func (MetricCollector) Head ¶
func (m MetricCollector) Head(ctx context.Context, request *object.HeadRequest) (*object.HeadResponse, error)
func (MetricCollector) Put ¶
func (m MetricCollector) Put() (PutObjectStream, error)
func (MetricCollector) PutSingle ¶ added in v0.37.0
func (m MetricCollector) PutSingle(ctx context.Context, request *object.PutSingleRequest) (*object.PutSingleResponse, error)
func (MetricCollector) Search ¶
func (m MetricCollector) Search(req *object.SearchRequest, stream SearchStream) error
type MetricRegister ¶
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 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 RequestContext ¶ added in v0.38.0
type RequestContext struct { Namespace string SenderKey []byte ContainerOwner user.ID Role acl.Role SoftAPECheck bool }
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 (s *ResponseService) Delete(ctx context.Context, req *object.DeleteRequest) (*object.DeleteResponse, error)
func (*ResponseService) Get ¶
func (s *ResponseService) Get(req *object.GetRequest, stream GetObjectStream) error
func (*ResponseService) GetRange ¶
func (s *ResponseService) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
func (*ResponseService) GetRangeHash ¶
func (s *ResponseService) GetRangeHash(ctx context.Context, req *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
func (*ResponseService) Head ¶
func (s *ResponseService) Head(ctx context.Context, req *object.HeadRequest) (*object.HeadResponse, error)
func (*ResponseService) Put ¶
func (s *ResponseService) Put() (PutObjectStream, error)
func (*ResponseService) PutSingle ¶ added in v0.37.0
func (s *ResponseService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
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 ¶
type ServiceServer interface { Get(*object.GetRequest, GetObjectStream) error Put() (PutObjectStream, error) Head(context.Context, *object.HeadRequest) (*object.HeadResponse, error) Search(*object.SearchRequest, SearchStream) error Delete(context.Context, *object.DeleteRequest) (*object.DeleteResponse, error) GetRange(*object.GetRangeRequest, GetObjectRangeStream) error GetRangeHash(context.Context, *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error) PutSingle(context.Context, *object.PutSingleRequest) (*object.PutSingleResponse, error) }
ServiceServer is an interface of utility serving v2 Object service.
type SignService ¶
type SignService struct {
// contains filtered or unexported fields
}
func NewSignService ¶
func NewSignService(key *ecdsa.PrivateKey, svc ServiceServer) *SignService
func (*SignService) Delete ¶
func (s *SignService) Delete(ctx context.Context, req *object.DeleteRequest) (*object.DeleteResponse, error)
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 (s *SignService) GetRangeHash(ctx context.Context, req *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
func (*SignService) Head ¶
func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*object.HeadResponse, error)
func (*SignService) Put ¶
func (s *SignService) Put() (PutObjectStream, error)
func (*SignService) PutSingle ¶ added in v0.37.0
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
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 (c TransportSplitter) Delete(ctx context.Context, request *object.DeleteRequest) (*object.DeleteResponse, error)
func (*TransportSplitter) Get ¶
func (c *TransportSplitter) Get(req *object.GetRequest, stream GetObjectStream) error
func (TransportSplitter) GetRange ¶
func (c TransportSplitter) GetRange(req *object.GetRangeRequest, stream GetObjectRangeStream) error
func (TransportSplitter) GetRangeHash ¶
func (c TransportSplitter) GetRangeHash(ctx context.Context, request *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)
func (TransportSplitter) Head ¶
func (c TransportSplitter) Head(ctx context.Context, request *object.HeadRequest) (*object.HeadResponse, error)
func (TransportSplitter) Put ¶
func (c TransportSplitter) Put() (PutObjectStream, error)
func (TransportSplitter) PutSingle ¶ added in v0.37.0
func (c TransportSplitter) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error)
func (TransportSplitter) Search ¶
func (c TransportSplitter) Search(req *object.SearchRequest, stream SearchStream) error