 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
      Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPathPrefixes ¶
CheckPathPrefixes ensure path is allowed by prefixes
Types ¶
type Cmd ¶
type Cmd struct {
	Args  []string   `json:"args"`
	Env   []string   `json:"env,omitempty"`
	Files []*CmdFile `json:"files,omitempty"`
	CPULimit     uint64 `json:"cpuLimit"`
	RealCPULimit uint64 `json:"realCpuLimit"`
	ClockLimit   uint64 `json:"clockLimit"`
	MemoryLimit  uint64 `json:"memoryLimit"`
	StackLimit   uint64 `json:"stackLimit"`
	ProcLimit    uint64 `json:"procLimit"`
	CPURateLimit uint64 `json:"cpuRateLimit"`
	CPUSetLimit  string `json:"cpuSetLimit"`
	CopyIn map[string]CmdFile `json:"copyIn"`
	CopyOut       []string `json:"copyOut"`
	CopyOutCached []string `json:"copyOutCached"`
	CopyOutMax    uint64   `json:"copyOutMax"`
	CopyOutDir    string   `json:"copyOutDir"`
	TTY               bool `json:"tty,omitempty"`
	StrictMemoryLimit bool `json:"strictMemoryLimit"`
	DataSegmentLimit  bool `json:"dataSegmentLimit"`
	AddressSpaceLimit bool `json:"addressSpaceLimit"`
}
    Cmd defines command and limits to start a program using in envexec
type CmdFile ¶
type CmdFile struct {
	Src       *string `json:"src"`
	Content   *string `json:"content"`
	FileID    *string `json:"fileId"`
	Name      *string `json:"name"`
	Max       *int64  `json:"max"`
	Symlink   *string `json:"symlink"`
	StreamIn  bool    `json:"streamIn"`
	StreamOut bool    `json:"streamOut"`
	Pipe      bool    `json:"pipe"`
}
    CmdFile defines file from multiple source including local / memory / cached or pipe collector
type FileError ¶ added in v1.8.1
FileError defines the location, file name and the detailed message for a failed file operation
type FileErrorType ¶ added in v1.8.1
type FileErrorType = envexec.FileErrorType
FileErrorType defines the location that file operation fails
type PipeMap ¶
type PipeMap struct {
	In    PipeIndex `json:"in"`
	Out   PipeIndex `json:"out"`
	Name  string    `json:"name"`
	Max   int64     `json:"max"`
	Proxy bool      `json:"proxy"`
}
    PipeMap defines in / out pipe for multiple program
type Request ¶
type Request struct {
	RequestID   string    `json:"requestId"`
	Cmd         []Cmd     `json:"cmd"`
	PipeMapping []PipeMap `json:"pipeMapping"`
}
    Request defines single worker request
type Response ¶
type Response struct {
	RequestID string   `json:"requestId"`
	Results   []Result `json:"results"`
	ErrorMsg  string   `json:"error,omitempty"`
	// contains filtered or unexported fields
}
    Response defines worker response for single request
func ConvertResponse ¶
ConvertResponse converts
type Result ¶
type Result struct {
	Status     Status            `json:"status"`
	ExitStatus int               `json:"exitStatus"`
	Error      string            `json:"error,omitempty"`
	Time       uint64            `json:"time"`
	Memory     uint64            `json:"memory"`
	RunTime    uint64            `json:"runTime"`
	ProcPeak   uint64            `json:"procPeak,omitempty"`
	Files      map[string]string `json:"files,omitempty"`
	FileIDs    map[string]string `json:"fileIds,omitempty"`
	FileError  []FileError       `json:"fileError,omitempty"`
	Buffs map[string][]byte `json:"-"`
	// contains filtered or unexported fields
}
    Result defines single command result
type Status ¶
Status offers JSON marshal for envexec.Status
func (Status) MarshalJSON ¶
MarshalJSON convert status into string
func (*Status) UnmarshalJSON ¶
UnmarshalJSON convert string into status