k8s

package
v0.0.0-...-ee63aef Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoxArchiveHeadResult

type BoxArchiveHeadResult struct {
	Mode uint32 `json:"mode"` // File mode
	Size int64  `json:"size"` // File size
}

BoxArchiveHeadResult represents the result of a box archive head operation

type Service

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

Service implements the box service interface using Kubernetes

func NewService

func NewService(tracker tracker.AccessTracker) (*Service, error)

NewService creates a new Kubernetes service instance

func (*Service) ArchiveHead

func (s *Service) ArchiveHead(ctx context.Context, boxID string, path string) (*BoxArchiveHeadResult, error)

ArchiveHead returns the metadata for a file in a box

func (*Service) BoxActionClick

func (s *Service) BoxActionClick(ctx context.Context, id string, params *model.BoxActionClickParams) (*model.BoxActionClickResult, error)

func (*Service) BoxActionDrag

func (s *Service) BoxActionDrag(ctx context.Context, id string, params *model.BoxActionDragParams) (*model.BoxActionDragResult, error)

func (*Service) BoxActionMove

func (s *Service) BoxActionMove(ctx context.Context, id string, params *model.BoxActionMoveParams) (*model.BoxActionMoveResult, error)

func (*Service) BoxActionPress

func (s *Service) BoxActionPress(ctx context.Context, id string, params *model.BoxActionPressParams) (*model.BoxActionPressResult, error)

func (*Service) BoxActionScreenshot

func (s *Service) BoxActionScreenshot(ctx context.Context, id string, params *model.BoxActionScreenshotParams) (*model.BoxActionScreenshotResult, error)

func (*Service) BoxActionScroll

func (s *Service) BoxActionScroll(ctx context.Context, id string, params *model.BoxActionScrollParams) (*model.BoxActionScrollResult, error)

func (*Service) BoxActionTouch

func (s *Service) BoxActionTouch(ctx context.Context, id string, params *model.BoxActionTouchParams) (*model.BoxActionTouchResult, error)

func (*Service) BoxActionType

func (s *Service) BoxActionType(ctx context.Context, id string, params *model.BoxActionTypeParams) (*model.BoxActionTypeResult, error)

func (*Service) CreateAndroidBox

func (s *Service) CreateAndroidBox(ctx context.Context, req *model.AndroidBoxCreateParam) (*model.Box, error)

CreateAndroidBox creates a new android box

func (*Service) CreateLinuxBox

func (s *Service) CreateLinuxBox(ctx context.Context, req *model.LinuxAndroidBoxCreateParam) (*model.Box, error)

CreateLinuxBox creates a new linux box

func (*Service) Delete

Delete deletes a box by ID

func (*Service) DeleteAll

DeleteAll deletes all boxes

func (*Service) Exec

Exec executes a command in a box

func (*Service) ExecWS

func (s *Service) ExecWS(ctx context.Context, id string, params *model.BoxExecWSParams, wsConn *websocket.Conn) (*model.BoxExecResult, error)

ExecWS executes a command in a box via WebSocket (Not Implemented for K8s)

func (*Service) ExtractArchive

func (s *Service) ExtractArchive(ctx context.Context, id string, req *model.BoxArchiveExtractParams) error

ExtractArchive extracts tar archive to box

func (*Service) Get

func (s *Service) Get(ctx context.Context, id string) (*model.Box, error)

Get returns a box by ID

func (*Service) GetArchive

GetArchive gets files from box as tar archive

func (*Service) GetExternalPort

func (s *Service) GetExternalPort(ctx context.Context, id string, internalPort int) (int, error)

GetExternalPort retrieves the host port mapping for a specific internal port of a box. It assumes a Kubernetes Service of type NodePort exists with the same name as the box ID.

func (*Service) HeadArchive

HeadArchive returns the metadata for a file in a box

func (*Service) List

func (s *Service) List(ctx context.Context, params *model.BoxListParams) (*model.BoxListResult, error)

List returns all boxes

func (*Service) ListFiles

func (s *Service) ListFiles(ctx context.Context, id string, params *model.BoxFileListParams) (*model.BoxFileListResult, error)

func (*Service) ReadFile

func (s *Service) ReadFile(ctx context.Context, id string, params *model.BoxFileReadParams) (*model.BoxFileReadResult, error)

func (*Service) Reclaim

func (s *Service) Reclaim(ctx context.Context) (*model.BoxReclaimResult, error)

Reclaim reclaims inactive boxes

func (*Service) RunCode

RunCode runs a command in a box

func (*Service) Start

func (s *Service) Start(ctx context.Context, id string) (*model.BoxStartResult, error)

Start starts a stopped box

func (*Service) Stop

func (s *Service) Stop(ctx context.Context, id string) (*model.BoxStopResult, error)

Stop stops a running box

func (*Service) WriteFile

func (s *Service) WriteFile(ctx context.Context, id string, params *model.BoxFileWriteParams) (*model.BoxFileWriteResult, error)

Jump to

Keyboard shortcuts

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