upload

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrometheusSubsystemName = "dragonfly_dfdaemon_upload"
	OtelServiceName         = "dragonfly-dfdaemon-upload"
)
View Source
const (
	RouterGroupDownload = "/download"
)

Variables

View Source
var GinLogFileName = "gin-upload.log"

Functions

func WithCertify

func WithCertify(ct *certify.Certify) func(manager *uploadManager)

func WithLimiter

func WithLimiter(limiter *rate.Limiter) func(*uploadManager)

WithLimiter sets upload rate limiter, the burst size must be bigger than piece size.

Types

type DownalodQuery

type DownalodQuery struct {
	PeerID string `form:"peerId" binding:"required"`
}

type DownloadParams

type DownloadParams struct {
	TaskPrefix string `uri:"task_prefix" binding:"required"`
	TaskID     string `uri:"task_id" binding:"required"`
}

type Manager

type Manager interface {
	// Started upload manager server.
	Serve(lis net.Listener) error

	// Stop upload manager server.
	Stop() error
}

Manager is the interface used for upload task.

func NewUploadManager

func NewUploadManager(cfg *config.DaemonOption, storageManager storage.Manager, logDir string, opts ...Option) (Manager, error)

New returns a new Manager instence.

type Option

type Option func(um *uploadManager)

Option is a functional option for configuring the upload manager.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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