upload

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DedupQueue added in v1.1.10

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

func NewDedupQueue added in v1.1.10

func NewDedupQueue(capacity int) *DedupQueue

func (*DedupQueue) Clear added in v1.1.10

func (dq *DedupQueue) Clear()

Clear removes all elements from the queue.

func (*DedupQueue) IsEmpty added in v1.1.10

func (dq *DedupQueue) IsEmpty() bool

IsEmpty checks if the queue has no elements.

func (*DedupQueue) IsFull added in v1.1.10

func (dq *DedupQueue) IsFull() bool

IsFull checks if the queue is at maximum capacity.

func (*DedupQueue) Pop added in v1.1.10

func (dq *DedupQueue) Pop() (string, bool)

Pop removes and returns the first element from the queue.

func (*DedupQueue) Push added in v1.1.10

func (dq *DedupQueue) Push(record string) bool

Push adds a new element to the queue, ignores if element already exists or queue is full.

func (*DedupQueue) Size added in v1.1.10

func (dq *DedupQueue) Size() int

Size returns the current number of elements in the queue.

type FileUploadProgress

type FileUploadProgress struct {
	Name      string
	Uploaded  int64
	TotalSize int64
}

type Manager

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

Manager is a manager for uploading files through minio client. Note that it's user's responsibility to check the Errs field after Wait() to see if there's any error.

func NewUploadManager

func NewUploadManager(client *minio.Client, storage *storage.Storage, cacheBucket string, networkChan chan *model.NetworkUsage) (*Manager, error)

func (*Manager) FMultipartPutObject

func (u *Manager) FMultipartPutObject(ctx context.Context, bucket string, key string, filePath string, fileSize int64, opts minio.PutObjectOptions) (err error)

FMultipartPutObject uploads a file to a bucket with a key and sha256.

func (*Manager) FPutObject

func (u *Manager) FPutObject(absPath string, bucket string, key string, filesize int64, userTags map[string]string, cleanCache bool) error

FPutObject uploads a file to a bucket with a key and sha256. If the file size is larger than minPartSize, it will use multipart upload.

Jump to

Keyboard shortcuts

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