uploader

package
v0.1.1-dev-1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

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

Uploader implements the gRPC of UploaderService, responsible for uploading object payload data.

func NewUploaderService

func NewUploaderService(cfg *UploaderConfig) (*Uploader, error)

NewUploaderService returns an instance of Uploader that implementation of the lifecycle.Service and UploaderService interface

func (*Uploader) Name

func (uploader *Uploader) Name() string

Name return the uploader service name, for the lifecycle management

func (*Uploader) PutObject

func (uploader *Uploader) PutObject(stream types.UploaderService_PutObjectServer) (err error)

PutObject upload an object payload data with object info.

func (*Uploader) QueryPuttingObject

func (uploader *Uploader) QueryPuttingObject(ctx context.Context, req *types.QueryPuttingObjectRequest) (
	resp *types.QueryPuttingObjectResponse, err error)

QueryPuttingObject query an uploading object with object id from cache

func (*Uploader) Start

func (uploader *Uploader) Start(ctx context.Context) error

Start the uploader gRPC service

func (*Uploader) Stop

func (uploader *Uploader) Stop(ctx context.Context) error

Stop the uploader gRPC service and recycle the resources

type UploaderConfig

type UploaderConfig struct {
	GRPCAddress         string
	SignerGrpcAddress   string
	TaskNodeGrpcAddress string
	SpDBConfig          *config.SQLDBConfig
	PieceStoreConfig    *storage.PieceStoreConfig
}

UploaderConfig defines Uploader service config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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