runtime

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New 创建一个新的实体对象

Types

type AdditionalConfigs

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

type AnsibleConfig

type AnsibleConfig struct {
	PathPrefix string
	ValueFrom  ValueFrom
}

type AnsibleGroupVars

type AnsibleGroupVars struct {
	Value     string
	ValueFrom ValueFrom
}

type AnsibleInventory

type AnsibleInventory struct {
	Value     string
	ValueFrom ValueFrom
}

type AnsiblePlaybook

type AnsiblePlaybook struct {
	Value     string
	ValueFrom ValueFrom
}

type AppInstance

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

func NewAppInstance

func NewAppInstance() *AppInstance

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

func (AppInstance) SpecEncode

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

func (AppInstance) SpecHash

func (obj AppInstance) SpecHash() string

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
	ConfigMapRef ConfigMapRef
}

type AppInstanceHostAliases

type AppInstanceHostAliases struct {
	Hostname string
	IP       string
}

type AppInstanceModule

type AppInstanceModule struct {
	Name       string
	AppVersion string
	Replicas   []AppInstanceModuleReplica
}

type AppInstanceModuleReplica

type AppInstanceModuleReplica struct {
	Args              []AppInstanceArgs
	HostRefs          []string
	HostAliases       []AppInstanceHostAliases
	Notes             string
	ConfigMapRef      ConfigMapRef
	AdditionalConfigs AdditionalConfigs
}

type AppInstanceRef

type AppInstanceRef struct {
	Namespace string
	Name      string
}

type AppInstanceSpec

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

type AppRef

type AppRef struct {
	Name    string
	Version string
}

type CPU

type CPU struct {
	Cores int
	Model string
}

type ConfigMap

type ConfigMap struct {
	core.BaseRuntimeObj `json:",inline" yaml:",inline"`
	Spec                map[string]string `json:"spec" yaml:"spec"`
}

type ConfigMapRef

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

type Disk

type Disk struct {
	Size int
}

type GPUInfo

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

type Helper

type Helper struct {
}

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

func GetHelper

func GetHelper() Helper

type Host

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

func NewHost

func NewHost() *Host

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

func (Host) SpecEncode

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

func (Host) SpecHash

func (obj Host) SpecHash() string

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
	Plugins []HostPlugin
}

type HostPlugin

type HostPlugin struct {
	AppInstanceRef AppInstanceRef
	AppRef         AppRef
}

type HostSSH

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

type HostSpec

type HostSpec struct {
	SSH HostSSH
}

type Job

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

func NewJob

func NewJob() *Job

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

func (Job) SpecEncode

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

func (Job) SpecHash

func (obj Job) SpecHash() string

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
	Plays        []JobAnsiblePlay
	RecklessMode bool
}

type JobAnsiblePlay

type JobAnsiblePlay struct {
	Name      string
	Envs      []string
	Tags      []string
	Playbook  AnsiblePlaybook
	Configs   []AnsibleConfig
	GroupVars AnsibleGroupVars
	Inventory AnsibleInventory
}

type JobExec

type JobExec struct {
	Type    string
	Ansible JobAnsible
}

type JobSpec

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

type LivenessProbe

type LivenessProbe struct {
	InitialDelaySeconds int
	PeriodSeconds       int
	TimeoutSeconds      int
}

type Memory

type Memory struct {
	Size  int
	Model string
}

type OS

type OS struct {
	Release string
	Kernel  string
}

type ValueFrom

type ValueFrom struct {
	ConfigMapRef ConfigMapRef
}

Jump to

Keyboard shortcuts

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