Documentation ¶
Index ¶
- func MakeRequest(request Request) (body []byte, statusCode int, err error)
- func PrepareAuthHeaders(header map[string]string) string
- type ClusterConfig
- type ClusterManager
- type ClusterManagerFactory
- type ClusterState
- type IAMConfig
- type InfrastructureConfig
- type InfrastructureManager
- type InfrastructureManagerFactory
- type InfrastructureState
- type NodeConfig
- type NodeLabel
- type NodeNetwork
- type NodeRole
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRequest ¶
MakeRequest function based on inputs
func PrepareAuthHeaders ¶
PrepareAuthHeaders ..
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { }
ClusterConfig the configuration structure for k8s clusters
func LoadClusterConfig ¶
func LoadClusterConfig(configPath string) (ClusterConfig, error)
LoadClusterConfig : load configuration file for K8s cluster
type ClusterManager ¶
type ClusterManager interface { // Create : Create() (ClusterState, error) // Update : Update() error // Scale : Scale(num int) // Destroy : Destroy() error // Status: Status() (string, error) // Describe Describe() (string, error) }
ClusterManager is the interface for managing K8s clusters
type ClusterManagerFactory ¶
type ClusterManagerFactory interface { // Init : initialize a ClusterManager interface Init() (*ClusterManager, error) }
ClusterManagerFactory : factory method for the Cluster Manager
type IAMConfig ¶
type IAMConfig interface { Init() error RefreshAccessToken() (string, error) GetAccessToken() (string, error) }
IAMConfig : interface for generic IAM manager
type InfrastructureConfig ¶
type InfrastructureConfig struct {
Nodes []NodeConfig `yaml:"nodes"`
}
InfrastructureConfig the configuration for an infrastructure creation
type InfrastructureManager ¶
type InfrastructureManager interface { // Create : Create() error // Update : Update() error // Scale : Scale(nodeLabel NodeLabel, num int) error // Destroy : Destroy() error // Status: Status() error // Describe Describe() error }
InfrastructureManager is the interface for any plugin for cluster creation
type InfrastructureManagerFactory ¶
type InfrastructureManagerFactory interface { // Init : initialize factory Init() (*InfrastructureManager, error) }
InfrastructureManagerFactory :
type InfrastructureState ¶
type InfrastructureState struct {
// contains filtered or unexported fields
}
InfrastructureState descriptor
type NodeConfig ¶
type NodeConfig struct { Image string `yaml:"host"` CPUs string `yaml:"CPUs,omitempty"` RAM string `yaml:"RAM,omitempty"` Flavor string `yaml:"flavor,omitempty"` Network NodeNetwork `yaml:"network"` Roles []NodeRole `yaml:"roles"` Labels []NodeLabel `yaml:"labels,omitempty"` Count int `yaml:"count,omitempty"` }
NodeConfig :
type NodeNetwork ¶
type NodeNetwork struct { Ports []int `yaml:"ports"` IsPublic bool `yaml:"is_public"` NetworkID string `yaml:"network_id,omitempty"` NetworkName string `yaml:"network_name,omitempty"` }
NodeNetwork : describe network configuration for the node
Click to show internal directories.
Click to hide internal directories.