Documentation ¶
Index ¶
- Constants
- type AccessConf
- type AccessIPConf
- type AccessPortConf
- type AppBriefInfo
- type AppBriefStat
- type AppChangeRecord
- type AppDetailsArgs
- type AppDetailsData
- type AppDetailsResult
- type AppStatus
- type BaseRes
- type BlockPodArgs
- type BlockPodResult
- type CanaryStrategyConf
- type ChangeDetailArgs
- type ChangeDetailData
- type ChangeDetailResult
- type ContainerConf
- type ContainerInfo
- type ContainerStatus
- type CreateAppArgs
- type CreateAppData
- type CreateAppResult
- type DeleteAppArgs
- type DeleteAppResult
- type DeletePodArgs
- type DeletePodResult
- type DeployConf
- type ExecAction
- type HTTPGetAction
- type HostPathConfig
- type ImageConf
- type InsInfo
- type InsStauts
- type ListAppArgs
- type ListAppData
- type ListAppResult
- type ListAppStatsArgs
- type ListAppStatsData
- type ListAppStatsResult
- type ListBriefResPoolArgs
- type ListBriefResPoolData
- type ListBriefResPoolResult
- type ListChangeArgs
- type ListChangeData
- type ListChangeResult
- type ListPodArgs
- type ListPodData
- type ListPodResult
- type LogConf
- type Misc
- type PFSConfig
- type PortConf
- type ProbeConf
- type ProbeHandlerConf
- type PubAccessArgs
- type PubAccessResult
- type ResPoolBriefInfo
- type ResPoolConf
- type ResPoolCountInfo
- type ResPoolDetailArgs
- type ResPoolDetailData
- type ResPoolDetailResult
- type ResPoolInfo
- type ResPoolMeta
- type ResPoolSpec
- type ResPoolStatus
- type ResQueueInfo
- type ScaleAppArgs
- type ScaleAppResult
- type StorageConf
- type TCPSocketAction
- type UpdateAppArgs
- type UpdateAppData
- type UpdateAppResult
- type VolumnConf
- type VolumnMountConf
Constants ¶
View Source
const ( API = "/api" AIHC_POM = "/aihcpom" URI_PREFIXV1 = bce.URI_PREFIX + "v1" TYPE_RESPOOL = "/respool" TYPE_APP = "/app" TYPE_POD = "/pod" REQUEST_CREATE = "/create" REQUEST_LIST = "/list" REQUEST_STATS = "/stats" REQUEST_DETAILS = "/details" REQUEST_DETAIL = "/detail" REQUEST_UPDATE = "/update" REQUEST_SCALE = "/scale" REQUEST_PUBACCESS = "/pubaccess" REQUEST_LISTCHANGE = "/listchange" REQUEST_CHANGEDETAIL = "/changedetail" REQUEST_DELETE = "/delete" REQUEST_BLOCK = "/block" REQUEST_LISTBRIEF = "/listbrief" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessConf ¶
type AccessIPConf ¶
type AccessPortConf ¶
type AppBriefInfo ¶
type AppBriefInfo struct { AppId string `json:"appId,omitempty"` AppName string `json:"appName,omitempty"` ResPoolId string `json:"resPoolId,omitempty"` ResPoolName string `json:"resPoolName,omitempty"` ResQueue string `json:"resQueue,omitempty"` Region string `json:"region,omitempty"` PublicAccess bool `json:"publicAccess,omitempty"` Creator string `json:"creator,omitempty"` Ctime uint32 `json:"ctime,omitempty"` Mtime uint32 `json:"mtime,omitempty"` }
type AppBriefStat ¶
type AppChangeRecord ¶
type AppDetailsArgs ¶
type AppDetailsArgs struct {
AppId string `json:"appId,omitempty"`
}
type AppDetailsData ¶
type AppDetailsData struct { App *CreateAppArgs `json:"app,omitempty"` Status *AppStatus `json:"status,omitempty"` Creator string `json:"creator,omitempty"` Ctime uint32 `json:"ctime,omitempty"` Mtime uint32 `json:"mtime,omitempty"` }
type AppDetailsResult ¶
type AppDetailsResult struct { Data AppDetailsData `json:"data,omitempty"` BaseRes }
func AppDetails ¶
func AppDetails(cli bce.Client, region string, args *AppDetailsArgs) (*AppDetailsResult, error)
type AppStatus ¶
type AppStatus struct { AccessIPs *AccessIPConf `json:"accessIPs,omitempty"` AccessPorts []*AccessPortConf `json:"accessPorts,omitempty"` BlbShortId string `json:"blbShortId,omitempty"` }
type BlockPodArgs ¶
type BlockPodResult ¶
type BlockPodResult struct {
BaseRes
}
func BlockPod ¶
func BlockPod(cli bce.Client, region string, args *BlockPodArgs) (*BlockPodResult, error)
type CanaryStrategyConf ¶
type CanaryStrategyConf struct { MaxSurge int32 `json:"maxSurge,omitempty"` }
type ChangeDetailArgs ¶
type ChangeDetailArgs struct {
ChangeId string `json:"changeId,omitempty"`
}
type ChangeDetailData ¶
type ChangeDetailResult ¶
type ChangeDetailResult struct { Data ChangeDetailData `json:"data,omitempty"` BaseRes }
func ChangeDetail ¶
func ChangeDetail(cli bce.Client, region string, args *ChangeDetailArgs) (*ChangeDetailResult, error)
type ContainerConf ¶
type ContainerConf struct { Name string `json:"name,omitempty"` Cpus int32 `json:"cpus,omitempty"` Memory int32 `json:"memory,omitempty"` Cards int32 `json:"cards,omitempty"` RunCmd []string `json:"runCmd,omitempty"` RunArgs []string `json:"runArgs,omitempty"` Ports []*PortConf `json:"ports,omitempty"` Env map[string]string `json:"env,omitempty"` Image *ImageConf `json:"image,omitempty"` VolumeMounts []*VolumnMountConf `json:"volumeMounts,omitempty"` StartupsProbe *ProbeConf `json:"startupsProbe,omitempty"` ReadinessProbe *ProbeConf `json:"readinessProbe,omitempty"` LivenessProbe *ProbeConf `json:"livenessProbe,omitempty"` }
type ContainerInfo ¶
type ContainerInfo struct { ContainerId string `json:"containerId,omitempty"` Container *ContainerConf `json:"container,omitempty"` Status *ContainerStatus `json:"status,omitempty"` }
type ContainerStatus ¶
type CreateAppArgs ¶
type CreateAppArgs struct { AppName string `json:"appName,omitempty"` ChipType string `json:"chipType,omitempty"` InsCount int32 `json:"insCount,omitempty"` ResPool *ResPoolConf `json:"resPool,omitempty"` Storage *StorageConf `json:"storage,omitempty"` Containers []*ContainerConf `json:"containers,omitempty"` Access *AccessConf `json:"access,omitempty"` Log *LogConf `json:"log,omitempty"` Deploy *DeployConf `json:"deploy,omitempty"` Misc *Misc `json:"misc,omitempty"` }
type CreateAppData ¶
type CreateAppData struct {
AppId string `json:"appId,omitempty"`
}
type CreateAppResult ¶
type CreateAppResult struct { Data CreateAppData `json:"data,omitempty"` BaseRes }
type DeleteAppArgs ¶
type DeleteAppArgs struct {
AppId string `json:"appId,omitempty"`
}
type DeleteAppResult ¶
type DeleteAppResult struct {
BaseRes
}
func DeleteApp ¶
func DeleteApp(cli bce.Client, region string, args *DeleteAppArgs) (*DeleteAppResult, error)
type DeletePodArgs ¶
type DeletePodResult ¶
type DeletePodResult struct {
BaseRes
}
func DeletePod ¶
func DeletePod(cli bce.Client, region string, args *DeletePodArgs) (*DeletePodResult, error)
type DeployConf ¶
type DeployConf struct {
CanaryStrategy *CanaryStrategyConf `protobuf:"bytes,1,opt,name=canaryStrategy,proto3" json:"canaryStrategy,omitempty"`
}
type ExecAction ¶
type ExecAction struct {
Command []string `json:"command,omitempty"`
}
type HTTPGetAction ¶
type HostPathConfig ¶
type HostPathConfig struct {
SrcPath string `json:"srcPath,omitempty"`
}
type InsInfo ¶
type InsInfo struct { InsID string `json:"insID,omitempty"` Containers []*ContainerInfo `json:"containers,omitempty"` Status *InsStauts `json:"status,omitempty"` }
type InsStauts ¶
type InsStauts struct { Blocked bool `json:"blocked,omitempty"` InsStatus string `json:"insStatus,omitempty"` Ctime uint32 `json:"ctime,omitempty"` AvailableContainers int32 `json:"availableContainers,omitempty"` TotalContainers int32 `json:"totalContainers,omitempty"` PodIP string `json:"podIP,omitempty"` NodeIP string `json:"nodeIP,omitempty"` }
type ListAppArgs ¶
type ListAppData ¶
type ListAppData struct { AppList []*AppBriefInfo `json:"list,omitempty"` Count int32 `json:"count,omitempty"` }
type ListAppResult ¶
type ListAppResult struct { Data ListAppData `json:"data,omitempty"` BaseRes }
func ListApp ¶
func ListApp(cli bce.Client, region string, args *ListAppArgs, extraInfo map[string]string) (*ListAppResult, error)
type ListAppStatsArgs ¶
type ListAppStatsArgs struct {
AppIds []string `json:"appIds,omitempty"`
}
type ListAppStatsData ¶
type ListAppStatsData struct {
Apps map[string]*AppBriefStat `json:"apps,omitempty"`
}
type ListAppStatsResult ¶
type ListAppStatsResult struct { Data ListAppStatsData `json:"data,omitempty"` BaseRes }
func ListAppStats ¶
func ListAppStats(cli bce.Client, region string, args *ListAppStatsArgs) (*ListAppStatsResult, error)
type ListBriefResPoolArgs ¶
type ListBriefResPoolData ¶
type ListBriefResPoolData struct {
ResPools []*ResPoolBriefInfo `json:"resPools,omitempty"`
}
type ListBriefResPoolResult ¶
type ListBriefResPoolResult struct { Data ListBriefResPoolData `json:"data,omitempty"` BaseRes }
func ListBriefResPool ¶
func ListBriefResPool(cli bce.Client, region string, args *ListBriefResPoolArgs) (*ListBriefResPoolResult, error)
type ListChangeArgs ¶
type ListChangeData ¶
type ListChangeData struct { Count int32 `json:"count,omitempty"` List []*AppChangeRecord `json:"list,omitempty"` }
type ListChangeResult ¶
type ListChangeResult struct { Data ListChangeData `json:"data,omitempty"` BaseRes }
func ListChange ¶
func ListChange(cli bce.Client, region string, args *ListChangeArgs) (*ListChangeResult, error)
type ListPodArgs ¶
type ListPodArgs struct {
AppId string `json:"appId,omitempty"`
}
type ListPodData ¶
type ListPodData struct {
List []*InsInfo `json:"list,omitempty"`
}
type ListPodResult ¶
type ListPodResult struct { Data ListPodData `json:"data,omitempty"` BaseRes }
func ListPod ¶
func ListPod(cli bce.Client, region string, args *ListPodArgs) (*ListPodResult, error)
type ProbeConf ¶
type ProbeConf struct { InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` PeriodSeconds int32 `json:"periodSeconds,omitempty"` SuccessThreshold int32 `json:"successThreshold,omitempty"` FailureThreshold int32 `json:"failureThreshold,omitempty"` Handler *ProbeHandlerConf `json:"handler,omitempty"` }
type ProbeHandlerConf ¶
type ProbeHandlerConf struct { Exec *ExecAction `json:"exec,omitempty"` HttpGet *HTTPGetAction `json:"httpGet,omitempty"` TcpSocketAction *TCPSocketAction `json:"tcpSocketAction,omitempty"` }
type PubAccessArgs ¶
type PubAccessResult ¶
type PubAccessResult struct {
BaseRes
}
func PubAccess ¶
func PubAccess(cli bce.Client, region string, args *PubAccessArgs) (*PubAccessResult, error)
type ResPoolBriefInfo ¶
type ResPoolBriefInfo struct { ResPoolId string `json:"resPoolId,omitempty"` ResPoolName string `json:"resPoolName,omitempty"` AssociatedPfsID string `json:"associatedPfsID,omitempty"` ClusterType string `json:"clusterType,omitempty"` Description string `json:"description,omitempty"` ForbidDelete bool `json:"forbidDelete,omitempty"` K8SVersion string `json:"k8sVersion,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` Phase string `json:"phase,omitempty"` }
type ResPoolConf ¶
type ResPoolCountInfo ¶
type ResPoolDetailArgs ¶
type ResPoolDetailArgs struct {
ResPoolId string `json:"resPoolId,omitempty"`
}
type ResPoolDetailData ¶
type ResPoolDetailData struct { ResPool *ResPoolInfo `json:"resPool,omitempty"` ResQueue []*ResQueueInfo `json:"resQueue,omitempty"` }
type ResPoolDetailResult ¶
type ResPoolDetailResult struct { Data ResPoolDetailData `json:"data,omitempty"` BaseRes }
func ResPoolDetail ¶
func ResPoolDetail(cli bce.Client, region string, args *ResPoolDetailArgs) (*ResPoolDetailResult, error)
type ResPoolInfo ¶
type ResPoolInfo struct { Meta *ResPoolMeta `json:"meta,omitempty"` Spec *ResPoolSpec `json:"spec,omitempty"` Status *ResPoolStatus `json:"status,omitempty"` }
type ResPoolMeta ¶
type ResPoolSpec ¶
type ResPoolSpec struct { K8SVersion string `json:"k8sVersion,omitempty"` AssociatedPfsID string `json:"associatedPfsID,omitempty"` Region string `json:"region,omitempty"` AssociatedCpromIDs []string `json:"associatedCpromIDs,omitempty"` CreatedBy string `json:"createdBy,omitempty"` Description string `json:"description,omitempty"` ForbidDelete bool `json:"forbidDelete,omitempty"` }
type ResPoolStatus ¶
type ResPoolStatus struct { GPUCount *ResPoolCountInfo `json:"GPUCount,omitempty"` NodeCount *ResPoolCountInfo `json:"NodeCount,omitempty"` Phase string `json:"phase,omitempty"` }
type ResQueueInfo ¶
type ResQueueInfo struct { Name string `json:"name,omitempty"` NameSpace string `json:"nameSpace,omitempty"` ParentQueue string `json:"parentQueue,omitempty"` QueueType string `json:"queueType,omitempty"` State string `json:"state,omitempty"` Reclaimable bool `json:"reclaimable,omitempty"` Preemptable bool `json:"preemptable,omitempty"` Capability map[string]string `json:"capability,omitempty"` Allocated map[string]string `json:"allocated,omitempty"` DisableOversell bool `json:"disableOversell,omitempty"` CreatedTime string `json:"createdTime,omitempty"` }
type ScaleAppArgs ¶
type ScaleAppResult ¶
type ScaleAppResult struct {
BaseRes
}
func ScaleApp ¶
func ScaleApp(cli bce.Client, region string, args *ScaleAppArgs) (*ScaleAppResult, error)
type StorageConf ¶
type StorageConf struct { ShmSize int32 `json:"shmSize,omitempty"` Volumns []*VolumnConf `json:"volumns,omitempty"` }
type TCPSocketAction ¶
type TCPSocketAction struct {
Port int32 `json:"port,omitempty"`
}
type UpdateAppArgs ¶
type UpdateAppArgs struct { AppId string `json:"appId,omitempty"` AppConf *CreateAppArgs `json:"appConf,omitempty"` ShortDesc string `json:"shortDesc,omitempty"` }
type UpdateAppData ¶
type UpdateAppData struct {
AppId string `json:"appId,omitempty"`
}
type UpdateAppResult ¶
type UpdateAppResult struct { Data UpdateAppData `json:"data,omitempty"` BaseRes }
func UpdateApp ¶
func UpdateApp(cli bce.Client, region string, reqBody *bce.Body, args *UpdateAppArgs) (*UpdateAppResult, error)
type VolumnConf ¶
type VolumnConf struct { VolumeType string `json:"volumeType,omitempty"` VolumnName string `json:"volumnName,omitempty"` Pfs *PFSConfig `json:"pfs,omitempty"` Hostpath *HostPathConfig `json:"hostpath,omitempty"` }
type VolumnMountConf ¶
Click to show internal directories.
Click to hide internal directories.