Documentation
¶
Index ¶
- type Option
- func WithEventstream(eventStream nc.Publisher) Option
- func WithRetries(maxRetries int) Option
- func WithStageProcessingLimit(limit int) Option
- func WithStorage(store *storage.Storage) Option
- func WithStorageConverters(convs []converters.Converter) Option
- func WithTaskProcessingLimit(limit int) Option
- func WithUpdateState(updateState updateStateI) Option
- type Options
- type ServerHTTPWrapper
- func (s ServerHTTPWrapper) Delete(ctx context.Context, obj *protocol.ObjectIDNames) (_ *protocol.SimpleResponse, err error)
- func (s ServerHTTPWrapper) Get(obj *protocol.ObjectID, stream protocol.ServiceAPI_GetServer) error
- func (s *ServerHTTPWrapper) GetHTTPHandler(w http.ResponseWriter, r *http.Request)
- func (s ServerHTTPWrapper) GetManifest(ctx context.Context, group *protocol.ManifestGroup) (_ *protocol.ManifestResponse, err error)
- func (s ServerHTTPWrapper) Head(ctx context.Context, obj *protocol.ObjectID) (*protocol.SimpleObjectResponse, error)
- func (s *ServerHTTPWrapper) HeadHTTPHandler(w http.ResponseWriter, r *http.Request)
- func (s ServerHTTPWrapper) Receive(message nc.Message) error
- func (s ServerHTTPWrapper) Refresh(ctx context.Context, obj *protocol.ObjectID) (*protocol.SimpleResponse, error)
- func (s ServerHTTPWrapper) SetManifest(ctx context.Context, manifest *protocol.DataManifest) (_ *protocol.SimpleResponse, err error)
- func (s ServerHTTPWrapper) Upload(stream protocol.ServiceAPI_UploadServer) (err error)
- func (s *ServerHTTPWrapper) UploadHTTPHandler(w http.ResponseWriter, r *http.Request)
- func (s ServerHTTPWrapper) UploadObject(ctx context.Context, group, customID string, overwrite bool, tags []string, ...) (npio.Object, error)
- type ServiceServer
- type UpdateStateFnk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option update function
func WithEventstream ¶
WithEventstream cannel option
func WithStageProcessingLimit ¶
WithStageProcessingLimit custom option
func WithStorageConverters ¶
func WithStorageConverters(convs []converters.Converter) Option
WithStorageConverters custom option
func WithTaskProcessingLimit ¶
WithTaskProcessingLimit custom option
func WithUpdateState ¶
func WithUpdateState(updateState updateStateI) Option
WithUpdateState memory checkpoint option
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options of the server
type ServerHTTPWrapper ¶
type ServerHTTPWrapper struct {
// contains filtered or unexported fields
}
ServerHTTPWrapper object
func NewHTTPWrapper ¶
func NewHTTPWrapper(s any) *ServerHTTPWrapper
NewHTTPWrapper returns HTTP wrapper
func (ServerHTTPWrapper) Delete ¶
func (s ServerHTTPWrapper) Delete(ctx context.Context, obj *protocol.ObjectIDNames) (_ *protocol.SimpleResponse, err error)
Delete object or subobjects
func (ServerHTTPWrapper) Get ¶
func (s ServerHTTPWrapper) Get(obj *protocol.ObjectID, stream protocol.ServiceAPI_GetServer) error
Get object with content by stream
func (*ServerHTTPWrapper) GetHTTPHandler ¶
func (s *ServerHTTPWrapper) GetHTTPHandler(w http.ResponseWriter, r *http.Request)
GetHTTPHandler defined HTTP object read handler
func (ServerHTTPWrapper) GetManifest ¶
func (s ServerHTTPWrapper) GetManifest(ctx context.Context, group *protocol.ManifestGroup) (_ *protocol.ManifestResponse, err error)
GetManifest from the group
func (ServerHTTPWrapper) Head ¶
func (s ServerHTTPWrapper) Head(ctx context.Context, obj *protocol.ObjectID) (*protocol.SimpleObjectResponse, error)
Head returns basic meta information from object
func (*ServerHTTPWrapper) HeadHTTPHandler ¶
func (s *ServerHTTPWrapper) HeadHTTPHandler(w http.ResponseWriter, r *http.Request)
HeadHTTPHandler defined HTTP object info handler
func (ServerHTTPWrapper) Refresh ¶
func (s ServerHTTPWrapper) Refresh(ctx context.Context, obj *protocol.ObjectID) (*protocol.SimpleResponse, error)
Refresh pbject processing (recreate thumbs, meta data and etc.)
func (ServerHTTPWrapper) SetManifest ¶
func (s ServerHTTPWrapper) SetManifest(ctx context.Context, manifest *protocol.DataManifest) (_ *protocol.SimpleResponse, err error)
SetManifest of the group which will be applied for entities of the `group` - {storage-domain}/{group}/manifest.json
- {storage-domain}/{group}/{object-codename}/manifest.json - reference to `{storage-domain}/{group}/manifest.json`
func (ServerHTTPWrapper) Upload ¶
func (s ServerHTTPWrapper) Upload(stream protocol.ServiceAPI_UploadServer) (err error)
Upload new object from the stream
func (*ServerHTTPWrapper) UploadHTTPHandler ¶
func (s *ServerHTTPWrapper) UploadHTTPHandler(w http.ResponseWriter, r *http.Request)
UploadHTTPHandler defined HTTP upload handler query params:
id:string - custom object ID overwrite:bool - overwrite with custom object ID
type ServiceServer ¶
type ServiceServer interface { protocol.ServiceAPIServer UploadObject(ctx context.Context, group, customID string, overwrite bool, tags []string, obj io.Reader) (npio.Object, error) }
ServiceServer with functional extension
type UpdateStateFnk ¶
UpdateStateFnk provides wrapper of function as state interface
func (UpdateStateFnk) TryBeginUpdate ¶
func (f UpdateStateFnk) TryBeginUpdate(key any) bool
TryBeginUpdate state update