Documentation ¶
Overview ¶
Package region provides region context functionalities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentStatus ¶
type DeploymentStatus string
DeploymentStatus holds the region deployment status
const ( Success DeploymentStatus = "Success" Failed DeploymentStatus = "Failed" )
Possible deployment statuses
type Manager ¶
type Manager interface { // ListRegionContexts lists all the regions in tkg config file ListRegionContexts() ([]RegionContext, error) // SaveRegionContext saves a new region object into the tkg config file, // Errors will be returned if a region with same name and context already exists SaveRegionContext(region RegionContext) error // UpsertRegionContext updates region context object if already exists, // else saves the new region object into the tkg config file UpsertRegionContext(region RegionContext) error // DeleteRegionContext deletes all region info with the given cluster name, regardless of context DeleteRegionContext(clusterName string) error // SetCurrentContext sets current regional context into tkg config file SetCurrentContext(clusterName string, contextName string) error // GetCurrentContext gets current regional context from tkg config file GetCurrentContext() (RegionContext, error) }
Manager manages tkg regions
type ManagerFactory ¶
ManagerFactory provides interface for region manager factory
type RegionContext ¶
type RegionContext struct { ClusterName string `yaml:"name" json:"name"` ContextName string `yaml:"context" json:"context"` SourceFilePath string `yaml:"file" json:"file"` Status DeploymentStatus `yaml:"status" json:"status"` IsCurrentContext bool `yaml:"isCurrentContext" json:"isCurrentContext"` }
RegionContext holds the region context
Click to show internal directories.
Click to hide internal directories.