filemanager

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package filemanager correlates panel file requests with agent responses.

Index

Constants

View Source
const (
	DefaultTransferChunkSize int64 = 25 * 1024 * 1024
	MinTransferChunkSize     int64 = 1 * 1024 * 1024
	MaxTransferChunkSize     int64 = 128 * 1024 * 1024
	MaxUploadSize            int64 = 8 * 1024 * 1024 * 1024
)

Variables

View Source
var (
	ErrOffline      = errors.New("agent is not connected")
	ErrUnsupported  = errors.New("agent does not support file operations")
	ErrTimeout      = errors.New("file operation timed out")
	ErrUnknownToken = errors.New("unknown or expired file operation")
)
View Source
var ErrTooManyUploads = errors.New("too many concurrent uploads")

Functions

func AgentTransfer

func AgentTransfer(c *gin.Context)

AgentTransfer is the data-plane endpoint used by the Agent. POST is used for both directions: a download carries bytes in the request body, while an upload receives the browser bytes in the response body. GET remains an alias for upload so an interrupted rollout cannot strand an already-open session.

func Call

func Call(ctx context.Context, uuid, op string, args map[string]any, options ...CallOptions) (json.RawMessage, error)

Call dispatches a metadata-only filesystem control operation. Binary file data must use the HTTP transfer endpoint exposed by the transfer package.

func CreatePreviewToken

func CreatePreviewToken(c *gin.Context)

func Download

func Download(c *gin.Context)

func PreviewDownload

func PreviewDownload(c *gin.Context)

func ResetClientOperations added in v1.7.0

func ResetClientOperations(uuid string)

ResetClientOperations retires pending replies, relays and preview grants. It performs no network or filesystem work while admission is held.

func Resolve

func Resolve(result v2.FileResult) bool

func Upload

func Upload(c *gin.Context)

Types

type CallOptions

type CallOptions struct {
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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