upload

package
v2.1.43 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 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 added in v2.0.6

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 added in v2.0.4

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

type DownloadParams added in v2.0.4

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 added in v2.0.4

type Option func(um *uploadManager)

Option is a functional option for configuring the upload manager.

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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