uplog

package
v7.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UpApiVersionV1 表示上传接口的版本 1
	UpApiVersionV1 = uplog.UpApiVersionV1
	// UpApiVersionV1 表示上传接口的版本 2
	UpApiVersionV2 = uplog.UpApiVersionV2
	// UpTypeForm 表示表单上传
	UpTypeForm = uplog.UpTypeForm
	// UpTypeResumableV1 表示分片上传 V1
	UpTypeResumableV1 = uplog.UpTypeResumableV1
	// UpTypeResumableV2 表示分片上传 V2
	UpTypeResumableV2 = uplog.UpTypeResumableV2
)

Variables

This section is empty.

Functions

func DisableUplog

func DisableUplog()

DisableUplog 禁止日志功能

func EnableUplog

func EnableUplog()

EnableUplog 启用日志功能

func FlushBuffer

func FlushBuffer() error

FlushBuffer 刷新日志缓存

func GetUplogMaxStorageBytes added in v7.22.0

func GetUplogMaxStorageBytes() uint64

GetUplogMaxStorageBytes 获取日志最大存储容量

func GetUplogUrl

func GetUplogUrl() string

GetUplogUrl 获取日志上传 URL

func GetWriteFileBufferInterval

func GetWriteFileBufferInterval() time.Duration

GetWriteFileBufferInterval() 获取日志文件缓存刷新间隔

func IsUplogEnabled

func IsUplogEnabled() bool

IsUplogEnabled 判断日志功能是否启用

func SetFlushFileBufferInterval

func SetFlushFileBufferInterval(d time.Duration)

SetFlushFileBufferInterval 设置日志文件缓存刷新间隔

func SetUplogFileBufferDirPath

func SetUplogFileBufferDirPath(path string)

SetUplogFileBufferDirPath 设置日志文件缓存目录

func SetUplogMaxStorageBytes added in v7.22.0

func SetUplogMaxStorageBytes(max uint64)

SetUplogMaxStorageBytes 设置日志最大存储容量

func SetUplogUrl

func SetUplogUrl(url string)

SetUplogUrl 设置日志上传 URL

func WithBlock

func WithBlock(ctx context.Context, upApiVersion UpApiVersion, fileSize, recoveredFrom uint64, targetBucket, targetKey, upToken string, handle func(context.Context) error) error

WithBlock 用于记录一轮分片上传的日志

func WithQuality

func WithQuality(ctx context.Context, upType UpType, fileSize uint64, targetBucket, targetKey, upToken string, handle func(ctx context.Context, switchRegion func()) error) error

WithQuality 用于记录上传质量日志

Types

type UpApiVersion

type UpApiVersion = uplog.UpApiVersion

UpApiVersion 表示上传接口的版本

type UpType

type UpType = uplog.UpType

UpType 表示上传类型

Jump to

Keyboard shortcuts

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