typespec

package
v0.0.0-...-432d548 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHealthChecker     = "default"
	Lv7HealthChecker         = "lv7"
	AdvancedLv7HealthChecker = "adv_lv7"
	KeyPort                  = "PORT"
	KeyCheckPath             = "CHECK_PATH"
	KeyLostTimeout           = "LOST_TIMEOUT"
)

carbon health checker keys

View Source
const (
	AppMasterTag = "internal_appmaster_resource_tag"
)

Common text

Variables

View Source
var ResourceRequest_CpusetMode_name = map[int32]string{
	0: "NONE",
	1: "SHARE",
	2: "RESERVED",
	3: "EXCLUSIVE",
}
View Source
var ResourceRequest_CpusetMode_value = map[string]int32{
	"NONE":      0,
	"SHARE":     1,
	"RESERVED":  2,
	"EXCLUSIVE": 3,
}

Functions

func FlatAppStatus

func FlatAppStatus(app *hippo.AppStatusResponse) (map[string]map[string]interface{}, []map[string]interface{})

FlatAppStatus FlatAppStatus

func FlatMap

func FlatMap(prefix string, m map[string]interface{}) map[string]interface{}

FlatMap FlatMap

func FlatResource

func FlatResource(prefix string, resources []*hippo.Resource) map[string]interface{}

FlatResource FlatResource

func FlatSlave

func FlatSlave(slaveNode *hippo.SlaveNodeStatus) (map[string]interface{}, []map[string]interface{})

FlatSlave FlatSlave

func FlatSlaves

func FlatSlaves(slaveNodes []*hippo.SlaveNodeStatus) ([]map[string]interface{}, []map[string]interface{})

FlatSlaves FlatSlaves

func FlatStruct

func FlatStruct(prefix string, st interface{}) map[string]interface{}

FlatStruct FlatStruct

func FlatVisility

func FlatVisility(prefix string, vis []*hippo.Visibility) map[string]interface{}

FlatVisility FlatVisility

func GetAppstatusCPU

func GetAppstatusCPU(app *hippo.AppStatusResponse) int32

GetAppstatusCPU GetAppstatusCPU

func GetFreeCPU

func GetFreeCPU(src interface{}) (int32, error)

GetFreeCPU GetFreeCPU

func GetFreeDISK

func GetFreeDISK(src interface{}) (int32, error)

GetFreeDISK GetFreeDISK

func GetFreeMem

func GetFreeMem(src interface{}) (int32, error)

GetFreeMem GetFreeMem

func GetFreeResource

func GetFreeResource(src interface{}) (int32, int32, int32)

GetFreeResource GetFreeResource

func GetRecourceFromResources

func GetRecourceFromResources(resourceName string, resourceType string, resources []*hippo.Resource) (int32, error)

GetRecourceFromResources GetRecourceFromResources

func GetRequestCPU

func GetRequestCPU(src interface{}) (int32, error)

GetRequestCPU GetRequestCPU

func GetRequestDisk

func GetRequestDisk(src interface{}) (int32, error)

GetRequestDisk GetRequestDisk

func GetRequestFpga

func GetRequestFpga(src interface{}) (int32, error)

GetRequestFpga GetRequestFpga

func GetRequestFromAppstatus

func GetRequestFromAppstatus(app *hippo.AppStatusResponse, tag string) *hippo.ResourceRequest

GetRequestFromAppstatus GetRequestFromAppstatus

func GetRequestGpu

func GetRequestGpu(src interface{}) (int32, error)

GetRequestGpu GetRequestGpu

func GetRequestIP

func GetRequestIP(src interface{}) (int32, error)

GetRequestIP GetRequestIP

func GetRequestMem

func GetRequestMem(src interface{}) (int32, error)

GetRequestMem GetRequestMem

func GetRequestRes

func GetRequestRes(src interface{}) (int32, int32, int32, int32, int32, int32)

GetRequestRes GetRequestRes

func GetRequestResource

func GetRequestResource(src interface{}, resourceName string, resourceType string) (int32, error)

GetRequestResource GetRequestResource

func GetRequestResources

func GetRequestResources(src interface{}) ([]*hippo.Resource, error)

GetRequestResources GetRequestResources

func GetResource

func GetResource(src interface{}, resourcePath string, resourceName string, resourceType string) (int32, error)

GetResource GetResource

func GetResourceSlice

func GetResourceSlice(src interface{}, resourcePath string) ([]*hippo.Resource, error)

GetResourceSlice GetResourceSlice

func GetResponseFromAppstatus

func GetResponseFromAppstatus(app *hippo.AppStatusResponse, tag string) *hippo.ResourceResponse

GetResponseFromAppstatus GetResponseFromAppstatus

func GetSlaveCPU

func GetSlaveCPU(src interface{}) (int32, error)

GetSlaveCPU GetSlaveCpu

func GetSlaveDisk

func GetSlaveDisk(src interface{}) (int32, error)

GetSlaveDisk GetSlaveDisk

func GetSlaveMem

func GetSlaveMem(src interface{}) (int32, error)

GetSlaveMem GetSlaveMem

func GetSlaveResource

func GetSlaveResource(src interface{}, resourceName string, resourceType string) (int32, error)

GetSlaveResource GetSlaveResource

func GetSlaveResources

func GetSlaveResources(src interface{}) ([]*hippo.Resource, error)

GetSlaveResources GetSlaveResources

func GetSlaveUsedCPU

func GetSlaveUsedCPU(src interface{}) (int32, error)

GetSlaveUsedCPU GetSlaveUsedCPU

func GetSlaveUsedDisk

func GetSlaveUsedDisk(src interface{}) (int32, error)

GetSlaveUsedDisk GetSlaveUsedDisk

func GetSlaveUsedMem

func GetSlaveUsedMem(src interface{}) (int32, error)

GetSlaveUsedMem GetSlaveUsedMem

func GetSlaveUsedResource

func GetSlaveUsedResource(src interface{}, resourceName string, resourceType string) (int32, error)

GetSlaveUsedResource GetSlaveUsedResource

func GetSlaveUsedResources

func GetSlaveUsedResources(src interface{}) ([]*hippo.Resource, error)

GetSlaveUsedResources GetSlaveUsedResources

func GetSlotCPU

func GetSlotCPU(src interface{}) (int32, error)

GetSlotCPU GetSlotCPU

func GetSlotDisk

func GetSlotDisk(src interface{}) (int32, error)

GetSlotDisk GetSlotDisk

func GetSlotFpga

func GetSlotFpga(src interface{}) (int32, error)

GetSlotFpga GetSlotFpga

func GetSlotGpu

func GetSlotGpu(src interface{}) (int32, error)

GetSlotGpu GetSlotGpu

func GetSlotIP

func GetSlotIP(src interface{}) (int32, error)

GetSlotIP GetSlotIP

func GetSlotMem

func GetSlotMem(src interface{}) (int32, error)

GetSlotMem GetSlotMem

func GetSlotRes

func GetSlotRes(src interface{}) (int32, int32, int32, int32, int32, int32)

GetSlotRes GetSlotRes

func GetSlotResource

func GetSlotResource(src interface{}, resourceName string, resourceType string) (int32, error)

GetSlotResource GetSlotResource

func GetSlotResources

func GetSlotResources(src interface{}) ([]*hippo.Resource, error)

GetSlotResources GetSlotResources

func GetTotalSlaveDisk

func GetTotalSlaveDisk(src interface{}) (int32, error)

GetTotalSlaveDisk GetTotalSlaveDisk

func GetWorkDirTag

func GetWorkDirTag(req *hippo.ResourceRequest) string

GetWorkDirTag GetWorkDirTag

func GetWorkDirTagFromSlot

func GetWorkDirTagFromSlot(slot *hippo.SlotStatus) string

GetWorkDirTagFromSlot GetWorkDirTagFromSlot

func IsMasterTag

func IsMasterTag(tag string) bool

IsMasterTag is the tag is am

Types

type Adjustment

type Adjustment struct {
	ID      string                         `json:"id,omitempty"`
	HippoID string                         `json:"hippoId,omitempty"`
	RoleID  string                         `json:"roleId,omitempty"`
	Plan    hippo.UpdateMappingRuleRequest `json:"plan,omitempty"`
}

Adjustment Adjustment

type BrokenRecoverQuotaConfig

type BrokenRecoverQuotaConfig struct {
	MaxFailedCount *int32 `json:"maxFailedCount,omitempty"`
	TimeWindow     *int32 `json:"timeWindow,omitempty"` // sec
}

BrokenRecoverQuotaConfig define BrokenRecoverQuotaConfig

func (*BrokenRecoverQuotaConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokenRecoverQuotaConfig.

func (*BrokenRecoverQuotaConfig) DeepCopyInto

func (in *BrokenRecoverQuotaConfig) DeepCopyInto(out *BrokenRecoverQuotaConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrokenRecoverQuotaConfig) GetMaxFailedCount

func (b *BrokenRecoverQuotaConfig) GetMaxFailedCount() int32

GetMaxFailedCount GetMaxFailedCount

func (*BrokenRecoverQuotaConfig) GetTimeWindow

func (b *BrokenRecoverQuotaConfig) GetTimeWindow() int32

GetTimeWindow GetTimeWindow

type ClassQuota

type ClassQuota struct {
	HippoID string                               `json:"hippoId,omitempty"`
	Plan    map[string]map[string]map[string]int `json:"plan,omitempty"`
}

ClassQuota ClassQuota

type ConstraintConfig

type ConstraintConfig struct {
	Level               *int32    `json:"level,omitempty"`
	Strictly            *bool     `json:"strictly,omitempty"`
	UseHostWorkDir      *bool     `json:"useHostWorkDir,omitempty"`
	MaxInstancePerHost  *int32    `json:"maxInstancePerHost,omitempty"`
	MaxInstancePerFrame *int32    `json:"maxInstancePerFrame,omitempty"`
	MaxInstancePerRack  *int32    `json:"maxInstancePerRack,omitempty"`
	MaxInstancePerASW   *int32    `json:"maxInstancePerASW,omitempty"`
	MaxInstancePerPSW   *int32    `json:"maxInstancePerPSW,omitempty"`
	SpecifiedIps        *[]string `json:"specifiedIps,omitempty"`
	ProhibitedIps       *[]string `json:"prohibitedIps,omitempty"`
}

ConstraintConfig defines MaxInstancePerHost

func (*ConstraintConfig) DeepCopy

func (in *ConstraintConfig) DeepCopy() *ConstraintConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstraintConfig.

func (*ConstraintConfig) DeepCopyInto

func (in *ConstraintConfig) DeepCopyInto(out *ConstraintConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FlatedApp

type FlatedApp struct {
	ReqID            string `json:"req_id"`
	ReqApplicationid string `json:"req_applicationid"`
	ReqTag           string `json:"req_tag"`

	ReqGroupid     string `json:"req_groupid"`
	ReqText        string `json:"req_text"`
	ReqExclusive   string `json:"req_exclusive"`
	ReqExcludeText string `json:"req_exclude_text"`
	ReqQueue       string `json:"req_queue"`
	ReqPriority    int32  `json:"req_priority"`

	ReqCpusetmode string `json:"req_cpusetmode"`
	ReqCPU        int32  `json:"req_cpu"`
	ReqMem        int32  `json:"req_mem"`
	ReqDisk       int32  `json:"req_disk"`
	ReqGpu        int32  `json:"req_gpu"`
	ReqCount      int32  `json:"req_count"`
	ReqGap        int    `json:"req_gap"`
	ReqAllocated  int    `json:"req_allocated"`
	ReqShareCPU   int    `json:"req_share_cpu"`

	ReqWorkdirtag    string `json:"req_workdirtag"`
	ReqAllocatemode  string `json:"req_allocatemode"`
	ReqRequirementid string `json:"req_requirementid"`

	ClusterID string `json:"cluster_id"`
	UpdateAt  int64  `json:"update_at"`
}

FlatedApp FlatedApp

type FlatedSlave

type FlatedSlave struct {
	SlaveSlaveid           int64  `json:"slave_slaveid"`
	SlaveAddress           string `json:"slave_address"`
	SlaveSlavehttpport     int32  `json:"slave_slavehttpport"`
	SlaveRestfulhttpport   int32  `json:"slave_restfulhttpport"`
	SlaveState             string `json:"slave_state"`
	SlaveLastheartbeattime int64  `json:"slave_lastheartbeattime"`
	SlaveTags              string `json:"slave_tags" sql:"type:text"`
	SlaveIsoffline         bool   `json:"slave_isoffline"`
	SlaveStatus            string `json:"slave_status"`

	SlaveResourcegroup string `json:"slave_resourcegroup"`
	SlaveQueue         string `json:"slave_queue"`
	SlaveText          string `json:"slave_text"`
	SlaveExcludeText   string `json:"slave_exclude_text"`
	SlaveExclusive     string `json:"slave_exclusive" sql:"type:text"`
	SlaveVisibilityIn  string `json:"slave_visibility_in" sql:"type:text"`

	SlaveCPU       int32 `json:"slave_cpu"`
	SlaveMem       int32 `json:"slave_mem"`
	SlaveDisk      int32 `json:"slave_disk"`
	SlaveUsedCPU   int32 `json:"slave_used_cpu"`
	SlaveUsedMem   int32 `json:"slave_used_mem"`
	SlaveUsedDisk  int32 `json:"slave_used_disk"`
	SlaveSlotcount int32 `json:"slave_slotcount"`
	SlaveIP        int32 `json:"slave_ip"`
	SlaveFreeIP    int32 `json:"slave_free_ip"`

	SlaveBinaryversion string `json:"slave_binaryversion"`

	ClusterID string `json:"cluster_id"`
	UpdateAt  int64  `json:"update_at"`
}

FlatedSlave FlatedSlave

type FlatedSlot

type FlatedSlot struct {
	SlotSlotid        int32  `json:"slot_slotid"`
	SlotResourcetag   string `json:"slot_resourcetag"`
	SlotApplicationid string `json:"slot_applicationid"`
	SlotRequirementid string `json:"slot_requirementid"`
	SlotIsstopping    bool   `json:"slot_isstopping"`

	SlotGroupid     string `json:"slot_groupid"`
	SlotText        string `json:"slot_text"`
	SlotExcludeText string `json:"slot_exclude_text"`
	SlotExclusive   string `json:"slot_exclusive"`

	SlotCPU      int32  `json:"slot_cpu"`
	SlotCPUSet   int32  `json:"slot_cpu_set"`
	SlotMem      int32  `json:"slot_mem"`
	SlotDisk     int32  `json:"slot_disk"`
	SlotNvidia0  int32  `json:"slot_nvidia0"`
	SlotPriority uint32 `json:"slot_priority"`

	SlaveAddress         string `json:"slave_address"`
	SlaveRestfulhttpport int32  `json:"slave_restfulhttpport"`
	SlaveIsoffline       bool   `json:"slave_isoffline"`
	SlaveStatus          string `json:"slave_status"`

	ClusterID string `json:"cluster_id"`
	UpdateAt  int64  `json:"update_at"`
}

FlatedSlot FlatedSlot

type FlatedSummary

type FlatedSummary struct {
	SlotSlotid        int32  `json:"slot_slotid"`
	SlotResourcetag   string `json:"slot_resourcetag"`
	SlotApplicationid string `json:"slot_applicationid"`
	SlotGroupid       string `json:"slot_groupid"`

	SlotCPU      int32  `json:"slot_cpu"`
	SlotCPUSet   int32  `json:"slot_cpu_set"`
	SlotMem      int32  `json:"slot_mem"`
	SlotDisk     int32  `json:"slot_disk"`
	SlotPriority uint32 `json:"slot_priority"`

	ReqCPU        int32  `json:"req_cpu"`
	ReqCount      int32  `json:"req_count"`
	ReqAllocated  int    `json:"req_allocated"`
	ReqWorkdirtag string `json:"req_workdirtag"`

	SlaveAddress         string `json:"slave_address"`
	SlaveRestfulhttpport int32  `json:"slave_restfulhttpport"`
	SlaveIsoffline       bool   `json:"slave_isoffline"`
	SlaveStatus          string `json:"slave_status"`

	SlaveCPU      int32 `json:"slave_cpu"`
	SlaveMem      int32 `json:"slave_mem"`
	SlaveDisk     int32 `json:"slave_disk"`
	SlaveUsedCPU  int32 `json:"slave_used_cpu"`
	SlaveUsedMem  int32 `json:"slave_used_mem"`
	SlaveUsedDisk int32 `json:"slave_used_disk"`

	ClusterID string `json:"cluster_id"`
	UpdateAt  int64  `json:"update_at"`
}

FlatedSummary FlatedSummary

type Flater

type Flater interface {
	Flat(prefix string) map[string]interface{}
}

Flater Flater

type GlobalPlan

type GlobalPlan struct {
	Count                    *int32                    `json:"count,omitempty"`
	MinHealthCapacity        *int32                    `json:"minHealthCapacity,omitempty"`
	LatestVersionRatio       *int32                    `json:"latestVersionRatio,omitempty"`
	HealthCheckerConfig      *HealthCheckerConfig      `json:"healthCheckerConfig,omitempty"`
	ServiceConfigs           []ServiceConfig           `json:"serviceConfigs,omitempty"`
	BrokenRecoverQuotaConfig *BrokenRecoverQuotaConfig `json:"brokenRecoverQuotaConfig,omitempty"`
	Properties               *map[string]string        `json:"properties,omitempty"`
}

GlobalPlan define group scheduler plan

func (*GlobalPlan) DeepCopy

func (in *GlobalPlan) DeepCopy() *GlobalPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalPlan.

func (*GlobalPlan) DeepCopyInto

func (in *GlobalPlan) DeepCopyInto(out *GlobalPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GlobalPlan) GetBrokenRecoverQuotaConfig

func (g *GlobalPlan) GetBrokenRecoverQuotaConfig() *BrokenRecoverQuotaConfig

GetBrokenRecoverQuotaConfig get

func (*GlobalPlan) GetLatestVersionRatio

func (g *GlobalPlan) GetLatestVersionRatio() *int32

GetLatestVersionRatio get

func (*GlobalPlan) GetMinHealthCapacity

func (g *GlobalPlan) GetMinHealthCapacity() int32

GetMinHealthCapacity get

type GroupPlan

type GroupPlan struct {
	GroupID           string                `json:"groupId,omitempty"`
	MinHealthCapacity *int32                `json:"minHealthCapacity,omitempty"`
	ExtraRatio        *int32                `json:"extraRatio,omitempty"`
	RolePlans         map[string]*RolePlan  `json:"rolePlans,omitempty"`
	SchedulerConfig   *GroupSchedulerConfig `json:"schedulerConfig,omitempty"`
}

GroupPlan define group target

func (*GroupPlan) DeepCopy

func (in *GroupPlan) DeepCopy() *GroupPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPlan.

func (*GroupPlan) DeepCopyInto

func (in *GroupPlan) DeepCopyInto(out *GroupPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GroupPlan) GetExtraRatio

func (g *GroupPlan) GetExtraRatio() int32

GetExtraRatio GetExtraRatio

func (*GroupPlan) GetMinHealthCapacity

func (g *GroupPlan) GetMinHealthCapacity() int32

GetMinHealthCapacity GetMinHealthCapacity

type GroupSchedulerConfig

type GroupSchedulerConfig struct {
	Name      *string `json:"name,omitempty"`
	ConfigStr *string `json:"configStr,omitempty"`
}

GroupSchedulerConfig define group schedule config

func (*GroupSchedulerConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupSchedulerConfig.

func (*GroupSchedulerConfig) DeepCopyInto

func (in *GroupSchedulerConfig) DeepCopyInto(out *GroupSchedulerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckerConfig

type HealthCheckerConfig struct {
	Name *string           `json:"name,omitempty"`
	Args map[string]string `json:"args,omitempty"`
}

HealthCheckerConfig define health check config

func (*HealthCheckerConfig) DeepCopy

func (in *HealthCheckerConfig) DeepCopy() *HealthCheckerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckerConfig.

func (*HealthCheckerConfig) DeepCopyInto

func (in *HealthCheckerConfig) DeepCopyInto(out *HealthCheckerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HealthCheckerConfig) GetLostTimeout

func (h *HealthCheckerConfig) GetLostTimeout() int64

GetLostTimeout GetLostTimeout

type LaunchPlan

type LaunchPlan struct {
	PackageInfos []PackageInfo  `json:"packageInfos,omitempty"`
	ProcessInfos []ProcessInfo  `json:"processInfos,omitempty"`
	DataInfos    *[]interface{} `json:"dataInfos,omitempty"`
	PodDesc      string         `json:"podDesc,omitempty"`
}

LaunchPlan define role process plan

func (*LaunchPlan) DeepCopy

func (in *LaunchPlan) DeepCopy() *LaunchPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LaunchPlan.

func (*LaunchPlan) DeepCopyInto

func (in *LaunchPlan) DeepCopyInto(out *LaunchPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PackageInfo

type PackageInfo struct {
	URI  string `json:"packageURI,omitempty"`
	Type string `json:"type,omitempty"`
}

PackageInfo define package infos

func (*PackageInfo) DeepCopy

func (in *PackageInfo) DeepCopy() *PackageInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageInfo.

func (*PackageInfo) DeepCopyInto

func (in *PackageInfo) DeepCopyInto(out *PackageInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProcessInfo

type ProcessInfo struct {
	IsDaemon          *bool       `json:"isDaemon,omitempty"`
	Name              *string     `json:"processName,omitempty"`
	Cmd               *string     `json:"cmd,omitempty"`
	Args              *[][]string `json:"args,omitempty"`
	Envs              *[][]string `json:"envs,omitempty"`
	OtherInfos        *[][]string `json:"otherInfos,omitempty"`
	InstanceID        *int64      `json:"instanceId,omitempty"`
	StopTimeout       *int        `json:"stopTimeout,omitempty"`
	RestartInterval   *int64      `json:"restartInterval,omitempty"`
	RestartCountLimit *int        `json:"restartCountLimit,omitempty"`
	ProcStopSig       *int32      `json:"procStopSig,omitempty"`
}

ProcessInfo define process info

func (*ProcessInfo) DeepCopy

func (in *ProcessInfo) DeepCopy() *ProcessInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessInfo.

func (*ProcessInfo) DeepCopyInto

func (in *ProcessInfo) DeepCopyInto(out *ProcessInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProcessInfo) GetArgs

func (p *ProcessInfo) GetArgs() []string

GetArgs GetArgs

func (*ProcessInfo) GetCmd

func (p *ProcessInfo) GetCmd() []string

GetCmd GetCmd

func (*ProcessInfo) GetIsDaemon

func (p *ProcessInfo) GetIsDaemon() bool

GetIsDaemon GetIsDaemon

func (*ProcessInfo) GetName

func (p *ProcessInfo) GetName() string

GetName GetName

func (*ProcessInfo) GetRestartCountLimit

func (p *ProcessInfo) GetRestartCountLimit() int

GetRestartCountLimit GetRestartCountLimit

func (*ProcessInfo) GetStopTimeout

func (p *ProcessInfo) GetStopTimeout() int

GetStopTimeout GetStopTimeout

type ResourcePlan

type ResourcePlan struct {
	Resources        []carbon.SlotResource       `json:"resources,omitempty"`
	Declarations     *[]hippo.Resource           `json:"declarations,omitempty"`
	AllocateMode     *string                     `json:"allocateMode,omitempty"`
	Queue            *string                     `json:"queue,omitempty"`
	Priority         *carbon.CarbonPriority      `json:"priority,omitempty"`
	Group            *string                     `json:"group,omitempty"`
	CpusetMode       *ResourceRequest_CpusetMode `json:"cpusetMode,omitempty"`
	Constraints      *ConstraintConfig           `json:"constraints,omitempty"`
	ContainerConfigs []string                    `json:"containerConfigs,omitempty"`
	MetaTags         *map[string]string          `json:"metaTags,omitempty"`
}

ResourcePlan define role resource plan

func (*ResourcePlan) DeepCopy

func (in *ResourcePlan) DeepCopy() *ResourcePlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePlan.

func (*ResourcePlan) DeepCopyInto

func (in *ResourcePlan) DeepCopyInto(out *ResourcePlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourcePlan) GetAllocateMode

func (r *ResourcePlan) GetAllocateMode() string

GetAllocateMode GetAllocateMode

func (*ResourcePlan) GetCpusetMode

func (r *ResourcePlan) GetCpusetMode() ResourceRequest_CpusetMode

GetCpusetMode GetCpusetMode

func (*ResourcePlan) GetMaxInstancePerHost

func (r *ResourcePlan) GetMaxInstancePerHost() int

GetMaxInstancePerHost GetMaxInstancePerHost

func (*ResourcePlan) GetPriority

func (r *ResourcePlan) GetPriority() *carbon.CarbonPriority

GetPriority GetPriority

type ResourceRequest_CpusetMode

type ResourceRequest_CpusetMode int32
const (
	ResourceRequest_NONE      ResourceRequest_CpusetMode = 0
	ResourceRequest_SHARE     ResourceRequest_CpusetMode = 1
	ResourceRequest_RESERVED  ResourceRequest_CpusetMode = 2
	ResourceRequest_EXCLUSIVE ResourceRequest_CpusetMode = 3
)

func (ResourceRequest_CpusetMode) Enum

func (ResourceRequest_CpusetMode) String

func (*ResourceRequest_CpusetMode) UnmarshalJSON

func (x *ResourceRequest_CpusetMode) UnmarshalJSON(data []byte) error

type RolePlan

type RolePlan struct {
	RoleID              string               `json:"roleId,omitempty"`
	Global              GlobalPlan           `json:"global,omitempty"`
	RoleSchedulerConfig *RoleSchedulerConfig `json:"roleSchedulerConfig,omitempty"`
	Version             VersionedPlan        `json:"version,omitempty"`
}

RolePlan define role target

func (*RolePlan) DeepCopy

func (in *RolePlan) DeepCopy() *RolePlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePlan.

func (*RolePlan) DeepCopyInto

func (in *RolePlan) DeepCopyInto(out *RolePlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RoleSchedulerConfig

type RoleSchedulerConfig struct {
	MinHealthCapacity *int32                `json:"minHealthCapacity,omitempty"`
	ExtraRatio        *int32                `json:"extraRatio,omitempty"`
	SchedulerConfig   *GroupSchedulerConfig `json:"schedulerConfig,omitempty"`
}

RoleSchedulerConfig define role scheduler plan

func (*RoleSchedulerConfig) DeepCopy

func (in *RoleSchedulerConfig) DeepCopy() *RoleSchedulerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleSchedulerConfig.

func (*RoleSchedulerConfig) DeepCopyInto

func (in *RoleSchedulerConfig) DeepCopyInto(out *RoleSchedulerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceAdapterType

type ServiceAdapterType int

ServiceAdapterType define service types

const (
	STNONE       ServiceAdapterType = 0
	STCM2        ServiceAdapterType = 1
	STVIP        ServiceAdapterType = 2
	STLVS        ServiceAdapterType = 3
	STHSF        ServiceAdapterType = 4
	STARMORY     ServiceAdapterType = 5
	STSLB        ServiceAdapterType = 6
	STECSARMORY  ServiceAdapterType = 7
	STVPCSLB     ServiceAdapterType = 8
	STDROGOLVS   ServiceAdapterType = 10 // placeholder for drogo lvs sync
	STSKYLINE    ServiceAdapterType = 11
	STECSSKYLINE ServiceAdapterType = 12
	STANTVIP     ServiceAdapterType = 13
	STLIBRARY    ServiceAdapterType = 0x80
)

ServiceAdapterTypes

type ServiceConfig

type ServiceConfig struct {
	Name      string             `json:"name,omitempty"`
	Type      ServiceAdapterType `json:"type,omitempty"`
	ConfigStr string             `json:"configStr,omitempty"`
	Masked    *bool              `json:"masked,omitempty"`
	MetaStr   *string            `json:"metaStr,omitempty"`
	// no use
	DeleteDelay *int `json:"deleteDelay,omitempty"`
}

ServiceConfig define service config

func (*ServiceConfig) DeepCopy

func (in *ServiceConfig) DeepCopy() *ServiceConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig.

func (*ServiceConfig) DeepCopyInto

func (in *ServiceConfig) DeepCopyInto(out *ServiceConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ServiceConfig) GetMasked

func (s *ServiceConfig) GetMasked() bool

GetMasked GetMasked

func (*ServiceConfig) GetMetaStr

func (s *ServiceConfig) GetMetaStr() string

GetMetaStr GetMetaStr

type VersionedPlan

type VersionedPlan struct {
	ResourcePlan ResourcePlan `json:"resourcePlan,omitempty"`
	LaunchPlan   LaunchPlan   `json:"launchPlan,omitempty"`
	Signature    *string      `json:"signature,omitempty"`

	//not used when generate version
	UserDefVersion             *string `json:"userDefVersion,omitempty"`
	CustomInfo                 *string `json:"customInfo,omitempty"`
	Online                     *bool   `json:"online,omitempty"`
	NotMatchTimeout            *int64  `json:"notMatchTimeout,omitempty"`
	NotReadyTimeout            *int64  `json:"notReadyTimeout,omitempty"`
	UpdatingGracefully         *bool   `json:"updatingGracefully,omitempty"`
	RestartAfterResourceChange *bool   `json:"restartAfterResourceChange,omitempty"`
	// no use
	Preload     *bool   `json:"preload,omitempty"`
	Cm2TopoInfo *string `json:"cm2TopoInfo,omitempty"`
}

VersionedPlan define role resource plan and process plan

func (*VersionedPlan) DeepCopy

func (in *VersionedPlan) DeepCopy() *VersionedPlan

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionedPlan.

func (*VersionedPlan) DeepCopyInto

func (in *VersionedPlan) DeepCopyInto(out *VersionedPlan)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VersionedPlan) GetCm2TopoInfo

func (v *VersionedPlan) GetCm2TopoInfo() string

GetCm2TopoInfo GetCm2TopoInfo

func (*VersionedPlan) GetCustomInfo

func (v *VersionedPlan) GetCustomInfo() string

GetCustomInfo GetCustomInfo

func (*VersionedPlan) GetNotMatchTimeout

func (v *VersionedPlan) GetNotMatchTimeout() int64

GetNotMatchTimeout GetNotMatchTimeout

func (*VersionedPlan) GetNotReadyTimeout

func (v *VersionedPlan) GetNotReadyTimeout() int64

GetNotReadyTimeout GetNotReadyTimeout

func (*VersionedPlan) GetOnline

func (v *VersionedPlan) GetOnline() bool

GetOnline GetOnline

func (*VersionedPlan) GetPreload

func (v *VersionedPlan) GetPreload() bool

GetPreload GetPreload

func (*VersionedPlan) GetRestartAfterResourceChange

func (v *VersionedPlan) GetRestartAfterResourceChange() bool

GetRestartAfterResourceChange GetRestartAfterResourceChange

func (*VersionedPlan) GetSignature

func (v *VersionedPlan) GetSignature() string

GetSignature GetSignature

func (*VersionedPlan) GetUpdatingGracefully

func (v *VersionedPlan) GetUpdatingGracefully() bool

GetUpdatingGracefully GetUpdatingGracefully

func (*VersionedPlan) GetUserDefVersion

func (v *VersionedPlan) GetUserDefVersion() string

GetUserDefVersion GetUserDefVersion

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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