v1

package
v0.0.0-...-f0fce53 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiVersion = "v1"
)

Variables

This section is empty.

Functions

func Convert

func Convert(srcObj core.ApiObject, dstGVK core.GVK) (core.ApiObject, error)

Convert 将v1版本结构与运行时结构互相转换

func New

func New(kind string) (core.ApiObject, error)

New 创建一个新的实体对象

Types

type AdditionalConfigs

type AdditionalConfigs struct {
	Enabled      bool
	ConfigMapRef ConfigMapRef
	Args         []AppArgs
}

type AnsibleInventory

type AnsibleInventory struct {
	Value     string
	ValueFrom ValueFrom
}

type App

type App struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            AppSpec
}

func NewApp

func NewApp() *App

NewApp 实例化应用

func (App) DeepCopy

func (src App) DeepCopy() *App

DeepCopy is auto generated by codegen, create and copy public fields into the new *App

func (App) DeepCopyApiObject

func (src App) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (App) DeepCopyInto

func (src App) DeepCopyInto(dst *App) error

DeepCopyInto is auto generated by codegen, copy public fields into the *App

func (*App) FromJSON

func (obj *App) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*App) FromYAML

func (obj *App) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (App) GetVersion

func (obj App) GetVersion(version string) (AppVersion, bool)

func (App) GetVersionModule

func (obj App) GetVersionModule(version string, moduleName string) (AppModule, bool)

func (App) Sha256

func (obj App) Sha256() string

func (*App) SpecDecode

func (obj *App) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (App) SpecEncode

func (obj App) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (App) SpecHash

func (obj App) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (App) ToJSON

func (obj App) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (App) ToJSONPretty

func (obj App) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (App) ToYAML

func (obj App) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

func (App) VersionEnabled

func (obj App) VersionEnabled(version string) bool

type AppArgs

type AppArgs struct {
	Name       string
	ShortName  string
	Desc       string
	Type       string
	Format     string
	Enum       []string
	HostLimits HostLimits
	Default    interface{}
	Required   bool
	Modifiable bool
	Readonly   bool
}

type AppGlobal

type AppGlobal struct {
	Args         []AppArgs
	ConfigMapRef ConfigMapRef
	HostAliases  []string
}

type AppInstance

type AppInstance struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            AppInstanceSpec
}

func NewAppInstance

func NewAppInstance() *AppInstance

NewAppInstance 实例化应用实例

func (AppInstance) DeepCopy

func (src AppInstance) DeepCopy() *AppInstance

DeepCopy is auto generated by codegen, create and copy public fields into the new *AppInstance

func (AppInstance) DeepCopyApiObject

func (src AppInstance) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (AppInstance) DeepCopyInto

func (src AppInstance) DeepCopyInto(dst *AppInstance) error

DeepCopyInto is auto generated by codegen, copy public fields into the *AppInstance

func (*AppInstance) FromJSON

func (obj *AppInstance) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*AppInstance) FromYAML

func (obj *AppInstance) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (AppInstance) Sha256

func (obj AppInstance) Sha256() string

func (*AppInstance) SpecDecode

func (obj *AppInstance) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (AppInstance) SpecEncode

func (obj AppInstance) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (AppInstance) SpecHash

func (obj AppInstance) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (AppInstance) ToJSON

func (obj AppInstance) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (AppInstance) ToJSONPretty

func (obj AppInstance) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (AppInstance) ToYAML

func (obj AppInstance) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type AppInstanceArgs

type AppInstanceArgs struct {
	Name  string
	Value interface{}
}

type AppInstanceGlobal

type AppInstanceGlobal struct {
	Args         []AppInstanceArgs
	HostAliases  []AppInstanceHostAliases
	ConfigMapRef ConfigMapRef
}

type AppInstanceHostAliases

type AppInstanceHostAliases struct {
	Hostname string
	IP       string
}

type AppInstanceModule

type AppInstanceModule struct {
	Name              string
	Notes             string
	AppVersion        string
	Args              []AppInstanceArgs
	HostRefs          []string
	HostAliases       []AppInstanceHostAliases
	ConfigMapRef      ConfigMapRef
	AdditionalConfigs AdditionalConfigs
}

type AppInstanceModuleRef

type AppInstanceModuleRef struct {
	AppInstanceRef
	Module  string
	Replica int
}

type AppInstanceRef

type AppInstanceRef struct {
	Namespace string
	Name      string
}

type AppInstanceRegistry

type AppInstanceRegistry struct {
	registry.Registry
}

AppInstanceRegistry 应用实例存储器 +namespaced=true

func NewAppInstanceRegistry

func NewAppInstanceRegistry() *AppInstanceRegistry

NewAppInstanceRegistry 实例化应用实例存储器

type AppInstanceSpec

type AppInstanceSpec struct {
	Category      string
	AppRef        AppRef
	Action        string
	LivenessProbe LivenessProbe
	Modules       []AppInstanceModule
	Global        AppInstanceGlobal
	K8sRef        string
}

func (AppInstanceSpec) GetGlobalArgValue

func (s AppInstanceSpec) GetGlobalArgValue(argName string) (interface{}, bool)

func (AppInstanceSpec) GetModuleArgValue

func (s AppInstanceSpec) GetModuleArgValue(moduleName, argName string) (interface{}, bool)

func (*AppInstanceSpec) SetGlobalArgValue

func (s *AppInstanceSpec) SetGlobalArgValue(argName string, argValue interface{}) bool

func (*AppInstanceSpec) SetModuleArgValue

func (s *AppInstanceSpec) SetModuleArgValue(moduleName, argName string, argValue interface{}) bool

type AppModule

type AppModule struct {
	Name              string
	Desc              string
	SkipUpgrade       bool
	Required          bool
	Notes             string
	Replication       bool
	HostLimits        HostLimits
	IncludeRoles      []string
	Args              []AppArgs
	ConfigMapRef      ConfigMapRef
	AdditionalConfigs AdditionalConfigs
	EnableLogging     bool
	EnablePurgeData   bool
	ExtraVars         map[string]interface{}
	Resources         Resources
	HostAliases       []string
}

type AppRef

type AppRef struct {
	Name    string
	Version string
}

type AppRegistry

type AppRegistry struct {
	registry.Registry
}

AppRegistry 应用存储器 +namespaced=true

func NewAppRegistry

func NewAppRegistry() *AppRegistry

NewAppRegistry 实例化应用存储器

type AppSpec

type AppSpec struct {
	Category string
	Platform string
	Versions []AppVersion
}

type AppVersion

type AppVersion struct {
	Version           string
	ShortName         string
	Platform          string
	Desc              string
	Increment         bool
	SupportActions    []string
	SupportMediaTypes []string
	SupportGpuModels  []string
	Enabled           bool
	DashboardId       string
	PkgRef            string
	LivenessProbe     LivenessProbe
	Modules           []AppModule
	Global            AppGlobal
	GpuRequired       bool
}

func (AppVersion) GetModule

func (obj AppVersion) GetModule(moduleName string) (AppModule, bool)

type Audit

type Audit struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            AuditSpec
}

func NewAudit

func NewAudit() *Audit

NewAudit 实例化审计日志

func (Audit) DeepCopy

func (src Audit) DeepCopy() *Audit

DeepCopy is auto generated by codegen, create and copy public fields into the new *Audit

func (Audit) DeepCopyApiObject

func (src Audit) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Audit) DeepCopyInto

func (src Audit) DeepCopyInto(dst *Audit) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Audit

func (*Audit) FromJSON

func (obj *Audit) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Audit) FromYAML

func (obj *Audit) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Audit) Sha256

func (obj Audit) Sha256() string

func (*Audit) SpecDecode

func (obj *Audit) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Audit) SpecEncode

func (obj Audit) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Audit) SpecHash

func (obj Audit) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Audit) ToJSON

func (obj Audit) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Audit) ToJSONPretty

func (obj Audit) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Audit) ToYAML

func (obj Audit) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type AuditRegistry

type AuditRegistry struct {
	registry.Registry
}

AuditRegistry 审计日志存储器

func NewAuditRegistry

func NewAuditRegistry() *AuditRegistry

NewAuditRegistry 实例化审计日志存储器

func (AuditRegistry) Record

func (r AuditRegistry) Record(audit *Audit) error

Record 记录一条新的审计日志

type AuditSpec

type AuditSpec struct {
	ResourceRef ResourceRef
	Action      string
	Msg         string
	SourceIP    string
	ReqBody     string
	RespBody    string
	StatusCode  int
}

type CPU

type CPU struct {
	Cores int
	Model string
}

type ConfigMap

type ConfigMap struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Data            map[string]string
}

func NewConfigMap

func NewConfigMap() *ConfigMap

NewConfigMap 实例化配置字典

func (ConfigMap) DeepCopy

func (src ConfigMap) DeepCopy() *ConfigMap

DeepCopy is auto generated by codegen, create and copy public fields into the new *ConfigMap

func (ConfigMap) DeepCopyApiObject

func (src ConfigMap) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (ConfigMap) DeepCopyInto

func (src ConfigMap) DeepCopyInto(dst *ConfigMap) error

DeepCopyInto is auto generated by codegen, copy public fields into the *ConfigMap

func (*ConfigMap) FromJSON

func (obj *ConfigMap) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*ConfigMap) FromYAML

func (obj *ConfigMap) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (ConfigMap) Sha256

func (obj ConfigMap) Sha256() string

func (*ConfigMap) SpecDecode

func (obj *ConfigMap) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (ConfigMap) SpecEncode

func (obj ConfigMap) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (ConfigMap) SpecHash

func (obj ConfigMap) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (ConfigMap) ToJSON

func (obj ConfigMap) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (ConfigMap) ToJSONPretty

func (obj ConfigMap) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (ConfigMap) ToYAML

func (obj ConfigMap) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type ConfigMapRef

type ConfigMapRef struct {
	Namespace string
	Name      string
	Hash      string
	Revision  int
}

type ConfigMapRegistry

type ConfigMapRegistry struct {
	registry.Registry
}

ConfigMapRegistry 配置字典存储器 +namespaced=true

func NewConfigMapRegistry

func NewConfigMapRegistry() *ConfigMapRegistry

NewConfigMapRegistry 实例化配置字典存储器

type ConfigMapRevision

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

ConfigMapRevision 配置字典修订版本记录器,实现了Revisioner接口

func NewConfigMapRevision

func NewConfigMapRevision() *ConfigMapRevision

NewConfigMapRevision 实例化配置字典修订历史记录器

func (ConfigMapRevision) DeleteAllRevisions

func (r ConfigMapRevision) DeleteAllRevisions(ctx context.Context, namespace string, name string) error

func (ConfigMapRevision) DeleteRevision

func (r ConfigMapRevision) DeleteRevision(ctx context.Context, namespace string, name string, revision int) (core.ApiObject, error)

func (ConfigMapRevision) GetLastRevision

func (r ConfigMapRevision) GetLastRevision(ctx context.Context, namespace string, name string) (core.ApiObject, error)

func (ConfigMapRevision) GetRevision

func (r ConfigMapRevision) GetRevision(ctx context.Context, namespace string, name string, revision int) (core.ApiObject, error)

func (ConfigMapRevision) ListRevisions

func (r ConfigMapRevision) ListRevisions(ctx context.Context, namespace string, name string) (core.ApiObjectList, error)

func (ConfigMapRevision) RevertRevision

func (r ConfigMapRevision) RevertRevision(ctx context.Context, namespace string, name string, revision int) (core.ApiObject, error)

func (ConfigMapRevision) SetRevision

func (r ConfigMapRevision) SetRevision(ctx context.Context, obj core.ApiObject) error

type Disk

type Disk struct {
	Size int
}

type Event

type Event struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            EventSpec
}

func NewEvent

func NewEvent() *Event

NewEvent 实例化事件日志

func (Event) DeepCopy

func (src Event) DeepCopy() *Event

DeepCopy is auto generated by codegen, create and copy public fields into the new *Event

func (Event) DeepCopyApiObject

func (src Event) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Event) DeepCopyInto

func (src Event) DeepCopyInto(dst *Event) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Event

func (*Event) FromJSON

func (obj *Event) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Event) FromYAML

func (obj *Event) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Event) Sha256

func (obj Event) Sha256() string

func (*Event) SpecDecode

func (obj *Event) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Event) SpecEncode

func (obj Event) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Event) SpecHash

func (obj Event) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Event) ToJSON

func (obj Event) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Event) ToJSONPretty

func (obj Event) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Event) ToYAML

func (obj Event) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type EventRegistry

type EventRegistry struct {
	registry.Registry
}

EventRegistry 事件日志存储器

func NewEventRegistry

func NewEventRegistry() *EventRegistry

NewEventRegistry 实例化事件日志存储器

func (EventRegistry) Record

func (r EventRegistry) Record(event *Event) error

Record 记录一条新的事件日志

type EventSpec

type EventSpec struct {
	ResourceRef ResourceRef
	Action      string
	Msg         string
	JobRef      string
}

type GPU

type GPU struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            GPUSpec
}

func NewGPU

func NewGPU() *GPU

NewGPU 实例化显卡

func (GPU) DeepCopy

func (src GPU) DeepCopy() *GPU

DeepCopy is auto generated by codegen, create and copy public fields into the new *GPU

func (GPU) DeepCopyApiObject

func (src GPU) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (GPU) DeepCopyInto

func (src GPU) DeepCopyInto(dst *GPU) error

DeepCopyInto is auto generated by codegen, copy public fields into the *GPU

func (*GPU) FromJSON

func (obj *GPU) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*GPU) FromYAML

func (obj *GPU) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (GPU) Sha256

func (obj GPU) Sha256() string

func (*GPU) SpecDecode

func (obj *GPU) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (GPU) SpecEncode

func (obj GPU) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (GPU) SpecHash

func (obj GPU) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (GPU) ToJSON

func (obj GPU) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (GPU) ToJSONPretty

func (obj GPU) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (GPU) ToYAML

func (obj GPU) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type GPUInfo

type GPUInfo struct {
	ID     int
	Model  string
	UUID   string
	Memory int
	Type   string
}

type GPURegistry

type GPURegistry struct {
	registry.Registry
}

GPURegistry 显卡存储器

func NewGPURegistry

func NewGPURegistry() *GPURegistry

NewGPURegistry 实例化显卡存储器

func (GPURegistry) GetGPUName

func (r GPURegistry) GetGPUName(hostRef string, slot int) string

GetGPUName 获取显卡标识名

type GPUSpec

type GPUSpec struct {
	HostRef              string
	Info                 GPUInfo
	AppInstanceModuleRef AppInstanceModuleRef
}

type GroupVars

type GroupVars struct {
	ValueFrom ValueFrom
}

type Helper

type Helper struct {
	App         *AppRegistry
	AppInstance *AppInstanceRegistry
	Audit       *AuditRegistry
	ConfigMap   *ConfigMapRegistry
	Event       *EventRegistry
	GPU         *GPURegistry
	Host        *HostRegistry
	Job         *JobRegistry
	K8sConfig   *K8sConfigRegistry
	Namespace   *NamespaceRegistry
	Pkg         *PkgRegistry
	Project     *ProjectRegistry
	Revision    *RevisionRegistry
}

Helper 对v1版本所有实体对象的操作封装

func GetHelper

func GetHelper() Helper

type Host

type Host struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            HostSpec
}

func NewHost

func NewHost() *Host

NewHost 实例化主机

func (Host) DeepCopy

func (src Host) DeepCopy() *Host

DeepCopy is auto generated by codegen, create and copy public fields into the new *Host

func (Host) DeepCopyApiObject

func (src Host) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Host) DeepCopyInto

func (src Host) DeepCopyInto(dst *Host) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Host

func (*Host) FromJSON

func (obj *Host) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Host) FromYAML

func (obj *Host) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Host) Sha256

func (obj Host) Sha256() string

func (*Host) SpecDecode

func (obj *Host) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Host) SpecEncode

func (obj Host) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Host) SpecHash

func (obj Host) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Host) ToJSON

func (obj Host) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Host) ToJSONPretty

func (obj Host) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Host) ToYAML

func (obj Host) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type HostInfo

type HostInfo struct {
	OS     OS
	CPU    CPU
	Memory Memory
	Disk   Disk
	GPUs   []GPUInfo
}

type HostLimits

type HostLimits struct {
	Max int
	Min int
}

type HostPlugin

type HostPlugin struct {
	AppInstanceRef AppInstanceRef
	AppRef         AppRef
}

type HostRegistry

type HostRegistry struct {
	registry.Registry
}

HostRegistry 主机存储器

func NewHostRegistry

func NewHostRegistry() *HostRegistry

NewHostRegistry 实例化主机存储器

type HostSSH

type HostSSH struct {
	Host     string
	User     string
	Password string
	Port     uint16
}

type HostSpec

type HostSpec struct {
	SSH     HostSSH
	Info    HostInfo
	Plugins []HostPlugin
	Sdks    []SdkPlugin
}

type Job

type Job struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            JobSpec
}

func NewJob

func NewJob() *Job

NewJob 实例化任务

func (Job) DeepCopy

func (src Job) DeepCopy() *Job

DeepCopy is auto generated by codegen, create and copy public fields into the new *Job

func (Job) DeepCopyApiObject

func (src Job) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Job) DeepCopyInto

func (src Job) DeepCopyInto(dst *Job) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Job

func (*Job) FromJSON

func (obj *Job) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Job) FromYAML

func (obj *Job) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Job) Sha256

func (obj Job) Sha256() string

func (*Job) SpecDecode

func (obj *Job) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Job) SpecEncode

func (obj Job) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Job) SpecHash

func (obj Job) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Job) ToJSON

func (obj Job) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Job) ToJSONPretty

func (obj Job) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Job) ToYAML

func (obj Job) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type JobAnsible

type JobAnsible struct {
	Bin          string
	Inventories  []AnsibleInventory
	Envs         []string
	Tags         []string
	Playbook     string
	Configs      []JobConfig
	GroupVars    GroupVars
	RecklessMode bool
}

type JobConfig

type JobConfig struct {
	Path         string
	ConfigMapRef ConfigMapRef
}

type JobExec

type JobExec struct {
	Type    string
	Ansible JobAnsible
}

type JobRegistry

type JobRegistry struct {
	registry.Registry
}

JobRegistry 任务存储器

func NewJobRegistry

func NewJobRegistry() *JobRegistry

NewJobRegistry 实例化任务存储器

func (JobRegistry) GetLog

func (r JobRegistry) GetLog(jobsDir string, jobName string) ([]byte, error)

GetLog 获取任务的运行日志

func (JobRegistry) GetLogPath

func (r JobRegistry) GetLogPath(jobsDir string, jobName string) (string, error)

GetLogPath 获取任务工作目录路径

func (JobRegistry) WatchLog

func (r JobRegistry) WatchLog(ctx context.Context, jobsDir string, jobName string) (<-chan string, error)

WatchLog 监听任务运行日志的输出内容

type JobSpec

type JobSpec struct {
	Exec             JobExec
	TimeoutSeconds   time.Duration
	FailureThreshold int
}

type K8sConfig

type K8sConfig struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            K8sYaml
}

func NewK8sConfig

func NewK8sConfig() *K8sConfig

NewK8sConfig 实例化K8S集群

func (K8sConfig) DeepCopy

func (src K8sConfig) DeepCopy() *K8sConfig

DeepCopy is auto generated by codegen, create and copy public fields into the new *K8sConfig

func (K8sConfig) DeepCopyApiObject

func (src K8sConfig) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (K8sConfig) DeepCopyInto

func (src K8sConfig) DeepCopyInto(dst *K8sConfig) error

DeepCopyInto is auto generated by codegen, copy public fields into the *K8sConfig

func (*K8sConfig) FromJSON

func (obj *K8sConfig) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*K8sConfig) FromYAML

func (obj *K8sConfig) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (K8sConfig) Sha256

func (obj K8sConfig) Sha256() string

func (*K8sConfig) SpecDecode

func (obj *K8sConfig) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (K8sConfig) SpecEncode

func (obj K8sConfig) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (K8sConfig) SpecHash

func (obj K8sConfig) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (K8sConfig) ToJSON

func (obj K8sConfig) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (K8sConfig) ToJSONPretty

func (obj K8sConfig) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (K8sConfig) ToYAML

func (obj K8sConfig) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type K8sConfigRegistry

type K8sConfigRegistry struct {
	registry.Registry
}

K8sConfigRegistry K8S集群存储器 +namespaced=true

func NewK8sConfigRegistry

func NewK8sConfigRegistry() *K8sConfigRegistry

NewK8sConfigRegistry 实例化K8S集群存储器

func (K8sConfigRegistry) GetFirstMasterHost

func (r K8sConfigRegistry) GetFirstMasterHost(name string) (*Host, error)

type K8sHostRef

type K8sHostRef struct {
	ValueFrom ValueFrom
	Label     map[string]string
}

type K8sYaml

type K8sYaml struct {
	Action string
	Chrony string
	Etcd   struct {
		Hosts []K8sHostRef
	}
	ExLb   string
	Harbor struct {
		Hosts []K8sHostRef
	}
	K8SMaster struct {
		Hosts []K8sHostRef
	} `json:"K8s-master" yaml:"K8s-master"`
	K8SWorker struct {
		Hosts []K8sHostRef
	} `json:"K8s-worker" yaml:"K8s-worker"`
	K8SWorkerNew struct {
		Hosts []K8sHostRef
	} `json:"K8s-worker-new" yaml:"K8s-worker-new"`
	GPU struct {
		Hosts []K8sHostRef
	}
}

type LivenessProbe

type LivenessProbe struct {
	InitialDelaySeconds int
	PeriodSeconds       int
	TimeoutSeconds      int
}

type Memory

type Memory struct {
	Size  int
	Model string
}

type Namespace

type Namespace struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
}

func NewNamespace

func NewNamespace() *Namespace

NewNamespace 实例化命名空间

func (Namespace) DeepCopy

func (src Namespace) DeepCopy() *Namespace

DeepCopy is auto generated by codegen, create and copy public fields into the new *Namespace

func (Namespace) DeepCopyApiObject

func (src Namespace) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Namespace) DeepCopyInto

func (src Namespace) DeepCopyInto(dst *Namespace) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Namespace

func (*Namespace) FromJSON

func (obj *Namespace) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Namespace) FromYAML

func (obj *Namespace) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Namespace) Sha256

func (obj Namespace) Sha256() string

func (*Namespace) SpecDecode

func (obj *Namespace) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Namespace) SpecEncode

func (obj Namespace) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Namespace) SpecHash

func (obj Namespace) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Namespace) ToJSON

func (obj Namespace) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Namespace) ToJSONPretty

func (obj Namespace) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Namespace) ToYAML

func (obj Namespace) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type NamespaceRegistry

type NamespaceRegistry struct {
	registry.Registry
}

NamespaceRegistry 命名空间存储器

func NewNamespaceRegistry

func NewNamespaceRegistry() *NamespaceRegistry

NewNamespaceRegistry 实例化命名空间存储器

type OS

type OS struct {
	Release string
	Kernel  string
}

type Pkg

type Pkg struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	Spec            PkgSpec
}

func NewPkg

func NewPkg() *Pkg

NewPkg 实例化部署包

func (Pkg) DeepCopy

func (src Pkg) DeepCopy() *Pkg

DeepCopy is auto generated by codegen, create and copy public fields into the new *Pkg

func (Pkg) DeepCopyApiObject

func (src Pkg) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Pkg) DeepCopyInto

func (src Pkg) DeepCopyInto(dst *Pkg) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Pkg

func (*Pkg) FromJSON

func (obj *Pkg) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Pkg) FromYAML

func (obj *Pkg) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Pkg) Sha256

func (obj Pkg) Sha256() string

func (*Pkg) SpecDecode

func (obj *Pkg) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Pkg) SpecEncode

func (obj Pkg) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Pkg) SpecHash

func (obj Pkg) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Pkg) ToJSON

func (obj Pkg) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Pkg) ToJSONPretty

func (obj Pkg) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Pkg) ToYAML

func (obj Pkg) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type PkgRegistry

type PkgRegistry struct {
	registry.Registry
}

PkgRegistry 部署包存储器

func NewPkgRegistry

func NewPkgRegistry() *PkgRegistry

NewPkgRegistry 实例化部署包存储器

type PkgSpec

type PkgSpec struct {
	Desc      string
	Module    string
	Version   string
	Platform  string
	Provision string
	Synced    bool
	Author    string
	Images    []string
}

type Project

type Project struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	ReferNamespaces []string
}

func NewProject

func NewProject() *Project

NewProject 实例化项目

func (Project) DeepCopy

func (src Project) DeepCopy() *Project

DeepCopy is auto generated by codegen, create and copy public fields into the new *Project

func (Project) DeepCopyApiObject

func (src Project) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Project) DeepCopyInto

func (src Project) DeepCopyInto(dst *Project) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Project

func (*Project) FromJSON

func (obj *Project) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Project) FromYAML

func (obj *Project) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Project) Sha256

func (obj Project) Sha256() string

func (*Project) SpecDecode

func (obj *Project) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Project) SpecEncode

func (obj Project) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Project) SpecHash

func (obj Project) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Project) ToJSON

func (obj Project) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Project) ToJSONPretty

func (obj Project) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Project) ToYAML

func (obj Project) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type ProjectRegistry

type ProjectRegistry struct {
	registry.Registry
}

ProjectRegistry 项目存储器

func NewProjectRegistry

func NewProjectRegistry() *ProjectRegistry

NewProjectRegistry 实例化项目存储器

type ResourceRef

type ResourceRef struct {
	Namespace string
	Name      string
	Kind      string
}

type Resources

type Resources struct {
	AlgorithmPlugin               bool
	SupportAlgorithmPluginsRegexp string
}

type Revision

type Revision struct {
	core.BaseApiObj `json:",inline" yaml:",inline"`
	ResourceRef     ResourceRef
	Revision        int
	Data            string
}

func NewRevision

func NewRevision() *Revision

NewRevision 实例化修订版本

func (Revision) DeepCopy

func (src Revision) DeepCopy() *Revision

DeepCopy is auto generated by codegen, create and copy public fields into the new *Revision

func (Revision) DeepCopyApiObject

func (src Revision) DeepCopyApiObject() core.ApiObject

DeepCopyApiObject is auto generated by codegen, deep copy and return as ApiObject

func (Revision) DeepCopyInto

func (src Revision) DeepCopyInto(dst *Revision) error

DeepCopyInto is auto generated by codegen, copy public fields into the *Revision

func (*Revision) FromJSON

func (obj *Revision) FromJSON(data []byte) error

FromJSON is auto generated by codegen, unmarshal from json bytes

func (*Revision) FromYAML

func (obj *Revision) FromYAML(data []byte) error

FromYAML is auto generated by codegen, unmarshal from yaml bytes

func (Revision) Sha256

func (obj Revision) Sha256() string

func (*Revision) SpecDecode

func (obj *Revision) SpecDecode(data []byte) error

SpecDecode 反序列化Spec字段的内容

func (Revision) SpecEncode

func (obj Revision) SpecEncode() ([]byte, error)

SpecEncode 序列化Spec字段的内容

func (Revision) SpecHash

func (obj Revision) SpecHash() string

SpecHash 计算Spec字段中的"有效"内容哈希值

func (Revision) ToJSON

func (obj Revision) ToJSON() ([]byte, error)

ToJSON is auto generated by codegen, marshal to json bytes

func (Revision) ToJSONPretty

func (obj Revision) ToJSONPretty() ([]byte, error)

ToJSONPretty is auto generated by codegen, marshal to json bytes with pretty format

func (Revision) ToYAML

func (obj Revision) ToYAML() ([]byte, error)

ToYAML is auto generated by codegen, marshal to yaml bytes

type RevisionRegistry

type RevisionRegistry struct {
	registry.Registry
}

RevisionRegistry 修订版本存储器

func NewRevisionRegistry

func NewRevisionRegistry() *RevisionRegistry

NewRevisionRegistry 实例化修订版本存储器

type SdkPlugin

type SdkPlugin struct {
	AppInstanceRef AppInstanceRef
	AppRef         AppRef
}

type ValueFrom

type ValueFrom struct {
	ConfigMapRef ConfigMapRef
	HostRef      string
}

Jump to

Keyboard shortcuts

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