Documentation
¶
Overview ¶
Package filemanager correlates panel file requests with agent responses.
Index ¶
- Constants
- Variables
- func AgentTransfer(c *gin.Context)
- func Call(ctx context.Context, uuid, op string, args map[string]any, ...) (json.RawMessage, error)
- func CreatePreviewToken(c *gin.Context)
- func Download(c *gin.Context)
- func PreviewDownload(c *gin.Context)
- func ResetClientOperations(uuid string)
- func Resolve(result v2.FileResult) bool
- func Upload(c *gin.Context)
- type CallOptions
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 ¶
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 PreviewDownload ¶
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
Types ¶
type CallOptions ¶
Click to show internal directories.
Click to hide internal directories.