Documentation
¶
Index ¶
- Variables
- func AddPublicSSHKey(key []byte) error
- func CreateEndpoint(endpointInput *CreateEndpointInput) (endpointId string, err error)
- func CreatePod(podInput *CreatePodInput) (pod map[string]interface{}, err error)
- func CreateTemplate(templateInput *CreateTemplateInput) (templateId string, err error)
- func GetCloud(in *GetCloudInput) (gpuTypes []interface{}, err error)
- func Query(input Input) (res *http.Response, err error)
- func RemovePod(id string) (ok bool, err error)
- func StartOnDemandPod(id string) (pod map[string]interface{}, err error)
- func StartSpotPod(id string, bidPerGpu float32) (podBidResume map[string]interface{}, err error)
- func StopPod(id string) (podStop map[string]interface{}, err error)
- func UpdateEndpointTemplate(endpointId string, templateId string) (err error)
- type CreateEndpointInput
- type CreatePodInput
- type CreateTemplateInput
- type Endpoint
- type EndpointData
- type EndpointOut
- type GetCloudInput
- type GraphQLError
- type Input
- type Machine
- type MySelfData
- type MySelfDataEndpoint
- type NetworkVolume
- type Pod
- type PodData
- type PodEnv
- type PodOut
- type Ports
- type Runtime
- type SSHKey
- type UpdateEndpointTemplateInput
- type UserOut
Constants ¶
This section is empty.
Variables ¶
View Source
var Version string
Functions ¶
func AddPublicSSHKey ¶
func CreateEndpoint ¶
func CreateEndpoint(endpointInput *CreateEndpointInput) (endpointId string, err error)
func CreatePod ¶
func CreatePod(podInput *CreatePodInput) (pod map[string]interface{}, err error)
func CreateTemplate ¶
func CreateTemplate(templateInput *CreateTemplateInput) (templateId string, err error)
func GetCloud ¶
func GetCloud(in *GetCloudInput) (gpuTypes []interface{}, err error)
func StartOnDemandPod ¶
func StartSpotPod ¶
func UpdateEndpointTemplate ¶
Types ¶
type CreateEndpointInput ¶
type CreateEndpointInput struct { Name string `json:"name"` TemplateId string `json:"templateId"` GpuIds string `json:"gpuIds"` NetworkVolumeId string `json:"networkVolumeId"` Locations string `json:"locations"` IdleTimeout int `json:"idleTimeout"` ScalerType string `json:"scalerType"` ScalerValue int `json:"scalerValue"` WorkersMin int `json:"workersMin"` WorkersMax int `json:"workersMax"` }
type CreatePodInput ¶
type CreatePodInput struct { CloudType string `json:"cloudType"` ContainerDiskInGb int `json:"containerDiskInGb"` DeployCost float32 `json:"deployCost,omitempty"` DockerArgs string `json:"dockerArgs"` Env []*PodEnv `json:"env"` GpuCount int `json:"gpuCount"` GpuTypeId string `json:"gpuTypeId"` ImageName string `json:"imageName"` MinMemoryInGb int `json:"minMemoryInGb"` MinVcpuCount int `json:"minVcpuCount"` Name string `json:"name"` NetworkVolumeId string `json:"networkVolumeId"` Ports string `json:"ports"` SupportPublicIp bool `json:"supportPublicIp"` StartSSH bool `json:"startSsh"` TemplateId string `json:"templateId"` VolumeInGb int `json:"volumeInGb"` VolumeMountPath string `json:"volumeMountPath"` }
type CreateTemplateInput ¶
type CreateTemplateInput struct { Name string `json:"name"` ImageName string `json:"imageName"` DockerStartCmd string `json:"dockerArgs"` ContainerDiskInGb int `json:"containerDiskInGb"` VolumeInGb int `json:"volumeInGb"` VolumeMountPath string `json:"volumeMountPath"` Ports string `json:"ports"` Env []*PodEnv `json:"env"` IsServerless bool `json:"isServerless"` StartSSH bool `json:"startSsh"` IsPublic bool `json:"isPublic"` Readme string `json:"readme"` }
type Endpoint ¶
there are many more fields in the result of the query but I just care about these for CLI port
func GetEndpoints ¶
type EndpointData ¶
type EndpointData struct {
Myself *MySelfDataEndpoint
}
type EndpointOut ¶
type EndpointOut struct { Data *EndpointData `json:"data"` Errors []*GraphQLError `json:"errors"` }
type GetCloudInput ¶
type GraphQLError ¶
type GraphQLError struct {
Message string
}
type MySelfData ¶
type MySelfData struct { PubKey string Pods []*Pod NetworkVolumes []*NetworkVolume }
type MySelfDataEndpoint ¶
type MySelfDataEndpoint struct {
Endpoints []*Endpoint
}
type NetworkVolume ¶
type NetworkVolume struct { Id string `json:"id"` DataCenterId string `json:"dataCenterId"` Name string `json:"name"` Size int `json:"size"` }
func GetNetworkVolumes ¶
func GetNetworkVolumes() (volumes []*NetworkVolume, err error)
type Pod ¶
type PodData ¶
type PodData struct {
Myself *MySelfData
}
type PodOut ¶
type PodOut struct { Data *PodData `json:"data"` Errors []*GraphQLError `json:"errors"` }
type SSHKey ¶
type SSHKey struct { Name string `json:"name"` Type string `json:"type"` Key string `json:"key"` Fingerprint string `json:"fingerprint"` }
func GetPublicSSHKeys ¶
type UserOut ¶
type UserOut struct { Data *PodData `json:"data"` Errors []*GraphQLError `json:"errors"` }
Click to show internal directories.
Click to hide internal directories.