kubernetes

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceAll = "-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMap

type ConfigMap struct {
	ListMetadata
	ListSpec
}

type DaemonSetList

type DaemonSetList struct {
	ListMetadata
	ListSpec
}

type Endpoints

type Endpoints struct {
	Bundle    *bundle.Bundle
	ClientSet map[string]kubernetes.Interface
}

func New

func New(bdl *bundle.Bundle, ops ...Option) *Endpoints

func (*Endpoints) ConfigMapRouters

func (ep *Endpoints) ConfigMapRouters() []httpserver.Endpoint

func (*Endpoints) CreateConfigMap

func (ep *Endpoints) CreateConfigMap(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateDaemonSet

func (ep *Endpoints) CreateDaemonSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateNamespace

func (ep *Endpoints) CreateNamespace(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreatePod

func (ep *Endpoints) CreatePod(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateSecret

func (ep *Endpoints) CreateSecret(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) CreateService

func (ep *Endpoints) CreateService(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) CreateStatefulSet

func (ep *Endpoints) CreateStatefulSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DaemonSetRouters

func (ep *Endpoints) DaemonSetRouters() []httpserver.Endpoint

func (*Endpoints) DeleteConfigMap

func (ep *Endpoints) DeleteConfigMap(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeleteDaemonSet

func (ep *Endpoints) DeleteDaemonSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeleteNamespace

func (ep *Endpoints) DeleteNamespace(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeletePod

func (ep *Endpoints) DeletePod(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeleteSecret

func (ep *Endpoints) DeleteSecret(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) DeleteService

func (ep *Endpoints) DeleteService(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DeleteStatefulSet

func (ep *Endpoints) DeleteStatefulSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) DrainNode

func (ep *Endpoints) DrainNode(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) GetClient

func (ep *Endpoints) GetClient(clusterName string) (client kubernetes.Interface, err error)

func (*Endpoints) GetConfigMap

func (ep *Endpoints) GetConfigMap(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) GetDaemonSet

func (ep *Endpoints) GetDaemonSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) GetFilterSlice

func (ep *Endpoints) GetFilterSlice(r *http.Request, list interface{}) ([]interface{}, error)

func (*Endpoints) GetLimitSlice

func (ep *Endpoints) GetLimitSlice(r *http.Request, list interface{}) ([]interface{}, error)

func (*Endpoints) GetNamespace

func (ep *Endpoints) GetNamespace(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) GetPod

func (ep *Endpoints) GetPod(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) GetSecret

func (ep *Endpoints) GetSecret(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) GetService

func (ep *Endpoints) GetService(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) GetStatefulSet

func (ep *Endpoints) GetStatefulSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ListConfigMap

func (ep *Endpoints) ListConfigMap(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) ListDaemonSet

func (ep *Endpoints) ListDaemonSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ListNamespace

func (ep *Endpoints) ListNamespace(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) ListPod

func (ep *Endpoints) ListPod(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) ListSecret

func (ep *Endpoints) ListSecret(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) ListService

func (ep *Endpoints) ListService(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) ListStatefulSet

func (ep *Endpoints) ListStatefulSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) NamespaceRouters

func (ep *Endpoints) NamespaceRouters() []httpserver.Endpoint

func (*Endpoints) NodeRouters

func (ep *Endpoints) NodeRouters() []httpserver.Endpoint

func (*Endpoints) PodRouters

func (ep *Endpoints) PodRouters() []httpserver.Endpoint

func (*Endpoints) Routers

func (ep *Endpoints) Routers() (slice []httpserver.Endpoint)

func (*Endpoints) SecretRouters

func (ep *Endpoints) SecretRouters() []httpserver.Endpoint

func (*Endpoints) ServiceRouters

func (ep *Endpoints) ServiceRouters() []httpserver.Endpoint

func (*Endpoints) StatefulSetRouters

func (ep *Endpoints) StatefulSetRouters() []httpserver.Endpoint

func (*Endpoints) UpdateConfigMap

func (ep *Endpoints) UpdateConfigMap(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdateDaemonSet

func (ep *Endpoints) UpdateDaemonSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdateNamespace

func (ep *Endpoints) UpdateNamespace(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdateNodeTaints

func (ep *Endpoints) UpdateNodeTaints(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdatePod

func (ep *Endpoints) UpdatePod(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdateSecret

func (ep *Endpoints) UpdateSecret(ctx context.Context, r *http.Request, vars map[string]string) (resp httpserver.Responser, err error)

func (*Endpoints) UpdateService

func (ep *Endpoints) UpdateService(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

func (*Endpoints) UpdateStatefulSet

func (ep *Endpoints) UpdateStatefulSet(ctx context.Context, r *http.Request, vars map[string]string) (httpserver.Responser, error)

type ListMetadata

type ListMetadata struct {
	Total int `json:"total"`
}

type ListSpec

type ListSpec struct {
	List interface{} `json:"list"`
}

type NamespaceList

type NamespaceList struct {
	ListMetadata
	ListSpec
}

type Node

type Node struct {
	NodeMeta
	NodeSpec
}

type NodeMeta

type NodeMeta struct {
	Name string `json:"name"`
}

type NodeSpec

type NodeSpec struct {
	IP string `json:"IP"`
}

type Option

type Option func(endpoints *Endpoints)

type PageInfo

type PageInfo struct {
	PageSize int
	PageNo   int
}

func GetPageInfo

func GetPageInfo(r *http.Request) (page PageInfo, err error)

type Pod

type Pod struct {
	ListMetadata
	ListSpec
}

type SecretList

type SecretList struct {
	ListMetadata
	ListSpec
}

type Service

type Service struct {
	ListMetadata
	ListSpec
}

type StatefulSetList

type StatefulSetList struct {
	ListMetadata
	ListSpec
}

type UpdateNodeTagsRequest

type UpdateNodeTagsRequest struct {
	Taints []corev1.Taint `json:"taints"`
	Nodes  []Node         `json:"nodes"`
}

Jump to

Keyboard shortcuts

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