common

package
v0.0.0-...-32b710e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerScheme = "http"
	ControllerIP     = "127.0.0.1"
	ControllerPort   = 30117
)

define const vars

Variables

This section is empty.

Functions

func FreshEnvFromProjectSetting

func FreshEnvFromProjectSetting() error

func SetLogLevel

func SetLogLevel(level string)

SetLogLevel to set log level

Types

type Action

type Action struct {
	Index    uint64 `json:"index"`
	Cmd      string `json:"cmd"`
	Arg      string `json:"arg"`
	Running  bool   `json:"running"`
	Finished bool   `json:"finished"`
}

Action define shader action

type Actionresult

type Actionresult struct {
	Index     uint64
	Finished  bool
	Succeed   bool
	Outputmsg string
	Errormsg  string
	Exitcode  int
	Err       error
}

Actionresult define action result

type ApplyParameters

type ApplyParameters struct {
	ProjectID                     string            `json:"project_id"`
	Scene                         string            `json:"scene"`
	ServerHost                    string            `json:"server_host"`
	BatchMode                     bool              `json:"batch_mode"`
	WorkerList                    []string          `json:"specific_host_list"`
	NeedApply                     bool              `json:"need_apply"`
	ControllerDynamicPort         bool              `json:"controller_dynamic_port" value:"false" usage:"if true, controller will listen dynamic port"`
	ShaderDynamicPort             bool              `json:"shader_dynamic_port" value:"false" usage:"if true, shader will listen dynamic port"`
	BuildID                       string            `json:"build_id"`
	ShaderToolIdleRunSeconds      int               `json:"shader_tool_idle_run_seconds"`
	ControllerIdleRunSeconds      int               `json:"controller_idle_run_seconds" value:"120" usage:"controller remain time after there is no active work (seconds)"`
	ControllerNoBatchWait         bool              `` /* 127-byte string literal not displayed */
	ControllerSendCork            bool              `json:"controller_send_cork" value:"false" usage:"if true, controller will send file with cork"`
	ControllerSendFileMemoryLimit int64             `json:"controller_send_file_memory" value:"4294967296" usage:"memory limit when send file with cork"`
	ControllerNetErrorLimit       int               `json:"controller_net_error_limit" value:"5" usage:"judge net error if failed times over this"`
	ControllerRemoteRetryTimes    int               `json:"controller_remote_retry_times" value:"0" usage:"default remote retry times"`
	ControllerEnableLink          bool              `json:"controller_enable_link" value:"false" usage:"if true, controller will enable dist link"`
	ControllerEnableLib           bool              `json:"controller_enable_lib" value:"false" usage:"if true, controller will enable dist lib"`
	ControllerLongTCP             bool              `json:"controller_long_tcp" value:"false" usage:"if true, controller will connect to remote worker with long tcp connection"`
	ControllerWorkerOfferSlot     bool              `json:"controller_worker_offer_slot" value:"false" usage:"if true, controller will get slot by worker offer"`
	LimitPerWorker                int               `json:"limit_per_worker"`
	MaxLocalTotalJobs             int               `json:"max_Local_total_jobs"`
	MaxLocalPreJobs               int               `json:"max_Local_pre_jobs"`
	MaxLocalExeJobs               int               `json:"max_Local_exe_jobs"`
	MaxLocalPostJobs              int               `json:"max_Local_post_jobs"`
	Env                           map[string]string `json:"env"`
	ContinueOnError               bool              `json:"continue_on_error" usage:"if false, the program will stop on error immediately"`
	ControllerUseLocalCPUPercent  int               `json:"controller_use_local_cpu_percent"`
}

ApplyParameters define parameters to apply resource

type AvailableResp

type AvailableResp struct {
	PID int32 `json:"pid"`
}

AvailableResp describe the response of available api

type Flags

type Flags struct {
	ToolDir         string
	JobDir          string
	JobJSONPrefix   string
	JobStartIndex   int32
	CommitSuicide   bool
	Port            int32
	LogLevel        string
	LogDir          string
	ProcessInfoFile string
}

Flags define flags needed by shader tool

type ResourceStatus

type ResourceStatus int

ResourceStatus save resource status

const (
	ResourceInit ResourceStatus = iota
	ResourceApplying
	ResourceApplySucceed
	ResourceApplyFailed
	ResourceUnknown = 99
)

define file send status

func (ResourceStatus) String

func (f ResourceStatus) String() string

String return the string of FileSendStatus

type UE4Action

type UE4Action struct {
	ToolJSONFile string          `json:"tool_json_file"`
	ToolJSON     dcSDK.Toolchain `json:"tool_json"`
	Actions      []Action        `json:"shaders"`
}

UE4Action define ue4 action

Jump to

Keyboard shortcuts

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