models

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8SCluster

type K8SCluster struct {
	ID                 primitive.ObjectID      `json:"id,omitempty"              bson:"_id,omitempty"`
	Name               string                  `json:"name"                      bson:"name"`
	Tags               []string                `json:"tags"                      bson:"tags"`
	Description        string                  `json:"description"               bson:"description"`
	Info               *K8SClusterInfo         `json:"info,omitempty"            bson:"info,omitempty"`
	Status             config.K8SClusterStatus `json:"status"                    bson:"status"`
	Error              string                  `json:"error"                     bson:"error"`
	Yaml               string                  `json:"yaml"                      bson:"yaml"`
	Production         bool                    `json:"production"                bson:"production"`
	CreatedAt          int64                   `json:"createdAt"                 bson:"createdAt"`
	CreatedBy          string                  `json:"createdBy"                 bson:"createdBy"`
	Disconnected       bool                    `json:"-"                         bson:"disconnected"`
	Token              string                  `json:"token"                     bson:"-"`
	Local              bool                    `json:"local"                     bson:"local"`
	LastConnectionTime int64                   `json:"last_connection_time"      bson:"last_connection_time"`

	// new field in 1.14, intended to enable kubeconfig for cluster management
	Type       string `json:"type"           bson:"type"` // either agent or kubeconfig supported
	KubeConfig string `json:"kube_config"    bson:"kube_config"`

	// Deprecated field, it should be deleted in version 1.15 since no more namespace settings is used
	Namespace string `json:"namespace"                 bson:"namespace"`
}

func (K8SCluster) TableName

func (K8SCluster) TableName() string

type K8SClusterInfo

type K8SClusterInfo struct {
	Nodes   int    `json:"nodes"    bson:"nodes"`
	Version string `json:"version"  bson:"version"`
	CPU     string `json:"cpu"      bson:"cpu"`
	Memory  string `json:"memory"   bson:"memory"`
}

Jump to

Keyboard shortcuts

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