api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNameRequired = errors.New("name is required")
View Source
var ErrNamespaceRequired = errors.New("namespace is required")
View Source
var ErrStillHaveCHIs = errors.New("cannot delete the last clickhouse-operator while CHI resources still exist")
View Source
var ErrYAMLMustBeCHI = errors.New("YAML document must contain a single ClickhouseInstallation definition")
View Source
var ErrorsToConsole bool

Functions

This section is empty.

Types

type CHClusterPod

type CHClusterPod struct {
	Pod
	ClusterName string `json:"cluster_name" description:"name of the ClickHouse cluster"`
}

type Chi

type Chi struct {
	Name          string         `json:"name" description:"name of the ClickHouse installation"`
	Namespace     string         `json:"namespace" description:"namespace the installation is in"`
	Status        string         `json:"status" description:"status of the installation"`
	Clusters      int            `json:"clusters" description:"number of clusters in the installation"`
	Hosts         int            `json:"hosts" description:"number of hosts in the installation"`
	ExternalURL   string         `json:"external_url" description:"external URL of the loadbalancer service"`
	ResourceYAML  string         `json:"resource_yaml" description:"Kubernetes YAML spec of the CHI resource"`
	CHClusterPods []CHClusterPod `json:"ch_cluster_pods" description:"ClickHouse cluster pods"`
}

type ChiPutParams

type ChiPutParams struct {
	YAML string `json:"yaml" description:"YAML of the CHI custom resource"`
}

ChiPutParams is the object for parameters to a CHI PUT request

type ChiResource

type ChiResource struct {
}

ChiResource is the REST layer to ClickHouse Installations

func (*ChiResource) Name

func (c *ChiResource) Name() string

Name returns the name of the web service

func (*ChiResource) WebService

func (c *ChiResource) WebService(_ *WebServiceInfo) (*restful.WebService, error)

WebService creates a new service that can handle REST requests

type Container

type Container struct {
	Name  string `json:"name" description:"name of the container"`
	State string `json:"state" description:"status of the container"`
	Image string `json:"image" description:"image used by the container"`
}

type Dashboard

type Dashboard struct {
	KubeCluster        string `json:"kube_cluster" description:"kubernetes cluster name"`
	KubeVersion        string `json:"kube_version" description:"kubernetes cluster version"`
	ChopCount          int    `json:"chop_count" description:"number of clickhouse-operators deployed"`
	ChopCountAvailable int    `json:"chop_count_available" description:"number of clickhouse-operators available"`
	ChiCount           int    `json:"chi_count" description:"number of ClickHouse Installations deployed"`
	ChiCountComplete   int    `json:"chi_count_complete" description:"number of ClickHouse Installations completed"`
}

type DashboardResource

type DashboardResource struct {
}

DashboardResource is the REST layer to the dashboard

func (*DashboardResource) Name

func (d *DashboardResource) Name() string

Name returns the name of the web service

func (*DashboardResource) WebService

WebService creates a new service that can handle REST requests

type Namespace

type Namespace struct {
	Name string `json:"name" description:"name of the namespace"`
}

type NamespaceResource

type NamespaceResource struct {
}

NamespaceResource is the REST layer to Namespaces

func (*NamespaceResource) Name

func (n *NamespaceResource) Name() string

Name returns the name of the web service

func (*NamespaceResource) WebService

WebService creates a new service that can handle REST requests

type Operator

type Operator struct {
	Name       string        `json:"name" description:"name of the operator"`
	Namespace  string        `json:"namespace" description:"namespace the operator is in"`
	Conditions string        `json:"conditions" description:"conditions of the operator"`
	Version    string        `json:"version" description:"version of the operator"`
	ConfigYaml string        `json:"config_yaml" description:"operator config as a YAML string"`
	Pods       []OperatorPod `json:"pods" description:"pods managed by the operator"`
}

type OperatorPod

type OperatorPod struct {
	Pod
	Version string `json:"version" description:"version of the pod"`
}

type OperatorPutParams

type OperatorPutParams struct {
	Version string `json:"version" description:"version of clickhouse-operator to deploy"`
}

OperatorPutParams is the object for parameters to an operator PUT request

type OperatorResource

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

OperatorResource is the REST layer to Pods

func (*OperatorResource) Name

func (o *OperatorResource) Name() string

Name returns the name of the web service

func (*OperatorResource) WebService

func (o *OperatorResource) WebService(wsi *WebServiceInfo) (*restful.WebService, error)

WebService creates a new service that can handle REST requests

type PersistentVolume

type PersistentVolume struct {
	Name          string `json:"name" description:"name of the PV"`
	Phase         string `json:"phase" description:"status of the PV"`
	StorageClass  string `json:"storage_class" description:"storage class name of the PV"`
	Capacity      int64  `json:"capacity" description:"capacity of the PV"`
	ReclaimPolicy string `json:"reclaim_policy" description:"reclaim policy of the PV"`
}

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	Name         string            `json:"name" description:"name of the PVC"`
	Namespace    string            `json:"namespace" description:"namespace the PVC is in"`
	Phase        string            `json:"phase" description:"phase of the PVC"`
	StorageClass string            `json:"storage_class" description:"requested storage class name of the PVC"`
	Capacity     int64             `json:"capacity" description:"requested capacity of the PVC"`
	BoundPV      *PersistentVolume `json:"bound_pv,omitempty" description:"PV bound to this PVC"`
}

type Pod

type Pod struct {
	Name       string                  `json:"name" description:"name of the pod"`
	Node       string                  `json:"node" description:"node the pod is nominated to run on"`
	Status     string                  `json:"status" description:"status of the pod"`
	Containers []Container             `json:"containers" description:"containers in the pod"`
	PVCs       []PersistentVolumeClaim `json:"pvcs" description:"persistent volume claims of this pod"`
}

type ResourceSpec

type ResourceSpec struct {
	APIVersion string               `json:"apiVersion"`
	Kind       string               `json:"kind"`
	Metadata   ResourceSpecMetadata `json:"metadata"`
	Spec       interface{}          `json:"spec"`
}

type ResourceSpecMetadata

type ResourceSpecMetadata struct {
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	ResourceVersion string `json:"resourceVersion"`
}

type WebService

type WebService interface {
	Name() string
	WebService(*WebServiceInfo) (*restful.WebService, error)
}

type WebServiceInfo

type WebServiceInfo struct {
	Version     string
	ChopRelease string
	Embed       *embed.FS
}

Jump to

Keyboard shortcuts

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