cluster

package
v0.0.0-...-2b7e141 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ProductionEnvironment = "prod"
View Source
const ProductionHCPNamespacePrefix = "ocm-production-"
View Source
const ProductionOcmUrl = "https://api.openshift.com"
View Source
const StagingEnvironment = "stage"
View Source
const StagingHCPNamespacePrefix = "ocm-staging-"
View Source
const StagingOcmUrl = "https://api.stage.openshift.com"

Variables

This section is empty.

Functions

func Initialize

func Initialize(baseDir string) error

func RecordElevation

func RecordElevation(baseDir string, clusterId string, source string, reason string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clusterSearchPattern string) *Client

func (*Client) CollectNormalizedClusterData

func (c *Client) CollectNormalizedClusterData() (*NormalizedClusterData, error)

type Elevation

type Elevation struct {
	gorm.Model
	RecordedClusterID string `json:"-"`
	RecordedCluster   RecordedCluster
	Source            string
	Reason            string
}

func FindElevationsSince

func FindElevationsSince(baseDir, timeAgo string) (elevations []Elevation, err error)

type NormalizedClusterData

type NormalizedClusterData struct {
	Name              string
	InternalID        string
	ExternalID        string
	InfraID           string
	HiveShard         string
	ManagementCluster string
	ServiceCluster    string
}

func NewNormalizedCluster

func NewNormalizedCluster(searchPattern string) (*NormalizedClusterData, error)

type RecordedCluster

type RecordedCluster struct {
	gorm.Model
	Environment       string
	Name              string
	ID                string
	ExternalID        string
	InfraID           string
	HiveShard         string
	ManagementCluster string
	ServiceCluster    string
	Elevations        []Elevation `json:",omitempty"`
}

func FindRecordedClustersSince

func FindRecordedClustersSince(baseDir, timeAgo string) (clusters []RecordedCluster, err error)

func NewRecordedCluster

func NewRecordedCluster(environment string, ncd *NormalizedClusterData) *RecordedCluster

func (*RecordedCluster) RecordAccess

func (cluster *RecordedCluster) RecordAccess(baseDir string) error

type WorkConfig

type WorkConfig struct {
	ClusterBase         string
	Environment         string
	OcmUrl              string
	HCPNamespacePrefix  string
	UseDirenv           bool
	OcmConfigFile       string
	BackplaneConfigFile string
	ClusterData         *NormalizedClusterData
}

func (*WorkConfig) Build

func (w *WorkConfig) Build() (string, error)

func (*WorkConfig) Validate

func (w *WorkConfig) Validate() error

Jump to

Keyboard shortcuts

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