upload

package
v2.0.7-beta.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 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
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