environment

package
v0.0.0-...-c9dffe9 Latest Latest
Warning

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

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

Documentation

Overview

Package environment provides controller for environment.

Package environment provides controller for environment.

Package environment provides controller for environment.

Index

Constants

View Source
const (
	EnvPrefix = "env-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentConfig

type EnvironmentConfig struct {
	ComputeUnit *string `json:"compute_unit,omitempty"`
	Image       *struct {
		Repository *string `json:"repository,omitempty"`
		Tag        *string `json:"tag,omitempty"`
	} `json:"image,omitempty"`
	Jupyter *struct {
		Enable *bool   `json:"enable,omitempty"`
		Token  *string `json:"token,omitempty"`
	} `json:"jupyter,omitempty"`
	Mounts *[]apigen.StorageMapping `json:"mounts,omitempty"`
	SSH    *struct {
		Enable *bool `json:"enable,omitempty"`
		//lint:ignore ST1003 keep same with apigen
		IdRsaPub *string `json:"id_rsa.pub,omitempty"`
	} `json:"ssh,omitempty"`
}

type EnvironmentImpl

type EnvironmentImpl struct {
	*helm.HelmClientImpl
}

func NewEnvironmentImpl

func NewEnvironmentImpl(kubeToken string, namespace string) (*EnvironmentImpl, error)

func (*EnvironmentImpl) Delete

func (e *EnvironmentImpl) Delete(name string) error

func (*EnvironmentImpl) DeleteWithKeepHistory

func (e *EnvironmentImpl) DeleteWithKeepHistory(name string) error

func (*EnvironmentImpl) GetInfo

func (e *EnvironmentImpl) GetInfo(name string) (*EnvironmentReleaseInfo, error)

func (*EnvironmentImpl) GetInfoList

func (e *EnvironmentImpl) GetInfoList(limit int, offset int) (*EnvironmentReleaseInfos, error)

type EnvironmentInfo

type EnvironmentInfo struct {
	*helm.PineappleInfo
	Image        models.ImageInfo
	ServerType   ServerType
	SSHKey       string
	JupyterToken string
	PvcClaimName string
	VolumeMounts models.VolumeMounts
	ResourceID   string
}

func (*EnvironmentInfo) CreateEnvValues

func (e *EnvironmentInfo) CreateEnvValues() (map[string]interface{}, error)

type EnvironmentPodInfo

type EnvironmentPodInfo struct {
	PodName *string
	State   *EnvironmentState
	Events  *[]apigen.ApplicationInstanceEvent
}

type EnvironmentReleaseInfo

type EnvironmentReleaseInfo struct {
	SSHInfo     *EnvironmentRuntimeSSHInfo         `json:"sshInfo,omitempty"`
	State       *EnvironmentState                  `json:"state,omitempty"`
	StaticInfo  *EnvironmentRuntimeStaticInfo      `json:"staticInfo,omitempty"`
	PodName     string                             `json:"pod_name,omitempty"`
	ReleaseName string                             `json:"-"`
	Type        string                             `json:"-"`
	Events      *[]apigen.ApplicationInstanceEvent `json:"events,omitempty"`
}

func (*EnvironmentReleaseInfo) GetReleaseName

func (e *EnvironmentReleaseInfo) GetReleaseName() (string, error)

func (*EnvironmentReleaseInfo) GetType

func (e *EnvironmentReleaseInfo) GetType() (string, error)

type EnvironmentReleaseInfos

type EnvironmentReleaseInfos struct {
	Item  *[]EnvironmentReleaseInfo `json:"item,omitempty"`
	Total *int                      `json:"total,omitempty"`
}

type EnvironmentRuntimeSSHInfo

type EnvironmentRuntimeSSHInfo struct {
	SSHIP   *string `json:"ssh_ip,omitempty"`
	SSHPort *string `json:"ssh_port,omitempty"`
}

type EnvironmentRuntimeStaticInfo

type EnvironmentRuntimeStaticInfo struct {
	Name              *string            `json:"name,omitempty"`
	CreateTm          *time.Time         `json:"create_tm,omitempty"`
	EnvironmentConfig *EnvironmentConfig `json:"environmentConfig,omitempty"`
	NotebookURL       *string            `json:"notebook_url,omitempty"`
	Description       *string            `json:"description,omitempty"`
}

type EnvironmentState

type EnvironmentState string
const (
	EnvironmentStateFailed    EnvironmentState = "Failed"
	EnvironmentStatePending   EnvironmentState = "Pending"
	EnvironmentStateRunning   EnvironmentState = "Running"
	EnvironmentStateSucceeded EnvironmentState = "Succeeded"
	EnvironmentStateUnknown   EnvironmentState = "Unknown"
	EnvironmentStateKilled    EnvironmentState = "Killed"
)

type ServerType

type ServerType struct {
	Jupyter string `json:"jupyter" structs:"jupyter"`
	SSH     string `json:"ssh" structs:"ssh"`
}

Jump to

Keyboard shortcuts

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