Documentation ¶
Index ¶
- Constants
- func DeleteCluster(clustername, namespace string, osclient *oclient.Client, ...) (string, error)
- func ErrorCode(err error) int
- type ClusterConfig
- type ClusterError
- type SparkCluster
- func CreateCluster(clustername, namespace, sparkimage string, config *ClusterConfig, ...) (SparkCluster, error)
- func FindClusters(namespace string, client *kclient.Client) ([]SparkCluster, error)
- func FindSingleCluster(name, namespace string, osclient *oclient.Client, client *kclient.Client) (SparkCluster, error)
- func UpdateCluster(name, namespace string, config *ClusterConfig, osclient *oclient.Client, ...) (SparkCluster, error)
- type SparkPod
Constants ¶
View Source
const ClientOperationCode = 101
View Source
const ClusterConfigCode = 100
View Source
const ClusterIncompleteCode = 102
View Source
const ComponentExistsCode = 104
View Source
const Defaultname = "default"
View Source
const ErrorWhileProcessing = "'%s', %s"
View Source
const MasterCountMustBeOne = "cluster configuration must have a masterCount of 1"
View Source
const NamedConfigDoesNotExist = "named config '%s' does not exist"
View Source
const NoCodeAvailable = 0
View Source
const NoSuchClusterCode = 103
View Source
const WorkerCountMustBeAtLeastOne = "cluster configuration may not have a workerCount less than 1"
Variables ¶
This section is empty.
Functions ¶
func DeleteCluster ¶
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { MasterCount int WorkerCount int Name string SparkMasterConfig string SparkWorkerConfig string SparkImage string }
func GetClusterConfig ¶
func GetClusterConfig(config *ClusterConfig, cm kclient.ConfigMapsInterface) (res ClusterConfig, err error)
func GetDefaultConfig ¶
func GetDefaultConfig() ClusterConfig
This function is meant to support testability
type ClusterError ¶
func NewClusterError ¶
func NewClusterError(msg string, code int) ClusterError
func (ClusterError) Error ¶
func (e ClusterError) Error() string
type SparkCluster ¶
type SparkCluster struct { Namespace string `json:"namespace,omitempty"` Name string `json:"name,omitempty"` Href string `json:"href"` Image string `json:"image"` MasterURL string `json:"masterUrl"` MasterWebURL string `json:"masterWebUrl"` Status string `json:"status"` WorkerCount int `json:"workerCount"` MasterCount int `json:"masterCount,omitempty"` Config ClusterConfig Pods []SparkPod }
func CreateCluster ¶
func CreateCluster(clustername, namespace, sparkimage string, config *ClusterConfig, osclient *oclient.Client, client *kclient.Client) (SparkCluster, error)
CreateClusterResponse create a cluster and return the representation
func FindClusters ¶
func FindClusters(namespace string, client *kclient.Client) ([]SparkCluster, error)
FindClusters find a cluster and return its representation
func FindSingleCluster ¶
func FindSingleCluster(name, namespace string, osclient *oclient.Client, client *kclient.Client) (SparkCluster, error)
FindSingleClusterResponse find a cluster and return its representation
func UpdateCluster ¶
func UpdateCluster(name, namespace string, config *ClusterConfig, osclient *oclient.Client, client *kclient.Client) (SparkCluster, error)
UpdateSingleClusterResponse update a cluster and return the new representation
Click to show internal directories.
Click to hide internal directories.