v1

package
v1.6.20 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigMapKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "ConfigMap",
	Scoped:  true,
}
View Source
var ConfigMapResource = resource.Type{
	Kind: ConfigMapKind,
	Name: "configmaps",
}
View Source
var EndpointsKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Endpoints",
	Scoped:  true,
}
View Source
var EndpointsResource = resource.Type{
	Kind: EndpointsKind,
	Name: "endpoints",
}
View Source
var NamespaceKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Namespace",
	Scoped:  false,
}
View Source
var NamespaceResource = resource.Type{
	Kind: NamespaceKind,
	Name: "namespaces",
}
View Source
var NodeKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Node",
	Scoped:  false,
}
View Source
var NodeResource = resource.Type{
	Kind: NodeKind,
	Name: "nodes",
}
View Source
var PersistentVolumeClaimKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "PersistentVolumeClaim",
	Scoped:  true,
}
View Source
var PersistentVolumeClaimResource = resource.Type{
	Kind: PersistentVolumeClaimKind,
	Name: "persistentvolumeclaims",
}
View Source
var PersistentVolumeKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "PersistentVolume",
	Scoped:  true,
}
View Source
var PersistentVolumeResource = resource.Type{
	Kind: PersistentVolumeKind,
	Name: "persistentvolumes",
}
View Source
var PodKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Pod",
	Scoped:  true,
}
View Source
var PodResource = resource.Type{
	Kind: PodKind,
	Name: "pods",
}
View Source
var PodTemplateKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "PodTemplate",
	Scoped:  true,
}
View Source
var PodTemplateResource = resource.Type{
	Kind: PodTemplateKind,
	Name: "podtemplates",
}
View Source
var SecretKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Secret",
	Scoped:  true,
}
View Source
var SecretResource = resource.Type{
	Kind: SecretKind,
	Name: "secrets",
}
View Source
var ServiceKind = resource.Kind{
	Group:   "",
	Version: "v1",
	Kind:    "Service",
	Scoped:  true,
}
View Source
var ServiceResource = resource.Type{
	Kind: ServiceKind,
	Name: "services",
}

Functions

This section is empty.

Types

type ConfigMap

type ConfigMap struct {
	*resource.Resource
	Object *corev1.ConfigMap
}

func NewConfigMap

func NewConfigMap(configMap *corev1.ConfigMap, client resource.Client) *ConfigMap

func (*ConfigMap) Delete

func (r *ConfigMap) Delete(ctx context.Context) error

type ConfigMapsClient

type ConfigMapsClient interface {
	ConfigMaps() ConfigMapsReader
}

func NewConfigMapsClient

func NewConfigMapsClient(resources resource.Client, filter resource.Filter) ConfigMapsClient

type ConfigMapsReader

type ConfigMapsReader interface {
	Get(ctx context.Context, name string) (*ConfigMap, error)
	List(ctx context.Context) ([]*ConfigMap, error)
}

func NewConfigMapsReader

func NewConfigMapsReader(client resource.Client, filter resource.Filter) ConfigMapsReader

type Container

type Container struct {
	resource.Client
	corev1.Container
	// contains filtered or unexported fields
}

Container is a Kubernetes container

func (*Container) Exec

func (c *Container) Exec(command ...string) (output []string, code int, err error)

Exec executes the given command in the container

type Endpoints

type Endpoints struct {
	*resource.Resource
	Object *corev1.Endpoints
}

func NewEndpoints

func NewEndpoints(endpoints *corev1.Endpoints, client resource.Client) *Endpoints

func (*Endpoints) Delete

func (r *Endpoints) Delete(ctx context.Context) error

type EndpointsClient

type EndpointsClient interface {
	Endpoints() EndpointsReader
}

func NewEndpointsClient

func NewEndpointsClient(resources resource.Client, filter resource.Filter) EndpointsClient

type EndpointsReader

type EndpointsReader interface {
	Get(ctx context.Context, name string) (*Endpoints, error)
	List(ctx context.Context) ([]*Endpoints, error)
}

func NewEndpointsReader

func NewEndpointsReader(client resource.Client, filter resource.Filter) EndpointsReader

type EndpointsReference

type EndpointsReference interface {
	Endpoints() EndpointsReader
}

func NewEndpointsReference

func NewEndpointsReference(resources resource.Client, filter resource.Filter) EndpointsReference

type Namespace

type Namespace struct {
	*resource.Resource
	Object *corev1.Namespace
}

func NewNamespace

func NewNamespace(namespace *corev1.Namespace, client resource.Client) *Namespace

func (*Namespace) Delete

func (r *Namespace) Delete(ctx context.Context) error

type NamespacesClient

type NamespacesClient interface {
	Namespaces() NamespacesReader
}

func NewNamespacesClient

func NewNamespacesClient(resources resource.Client, filter resource.Filter) NamespacesClient

type NamespacesReader

type NamespacesReader interface {
	Get(ctx context.Context, name string) (*Namespace, error)
	List(ctx context.Context) ([]*Namespace, error)
}

func NewNamespacesReader

func NewNamespacesReader(client resource.Client, filter resource.Filter) NamespacesReader

type Node

type Node struct {
	*resource.Resource
	Object *corev1.Node
}

func NewNode

func NewNode(node *corev1.Node, client resource.Client) *Node

func (*Node) Delete

func (r *Node) Delete(ctx context.Context) error

type NodesClient

type NodesClient interface {
	Nodes() NodesReader
}

func NewNodesClient

func NewNodesClient(resources resource.Client, filter resource.Filter) NodesClient

type NodesReader

type NodesReader interface {
	Get(ctx context.Context, name string) (*Node, error)
	List(ctx context.Context) ([]*Node, error)
}

func NewNodesReader

func NewNodesReader(client resource.Client, filter resource.Filter) NodesReader

type PersistentVolume

type PersistentVolume struct {
	*resource.Resource
	Object *corev1.PersistentVolume
}

func NewPersistentVolume

func NewPersistentVolume(persistentVolume *corev1.PersistentVolume, client resource.Client) *PersistentVolume

func (*PersistentVolume) Delete

func (r *PersistentVolume) Delete(ctx context.Context) error

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	*resource.Resource
	Object *corev1.PersistentVolumeClaim
}

func NewPersistentVolumeClaim

func NewPersistentVolumeClaim(persistentVolumeClaim *corev1.PersistentVolumeClaim, client resource.Client) *PersistentVolumeClaim

func (*PersistentVolumeClaim) Delete

func (r *PersistentVolumeClaim) Delete(ctx context.Context) error

type PersistentVolumeClaimsClient

type PersistentVolumeClaimsClient interface {
	PersistentVolumeClaims() PersistentVolumeClaimsReader
}

func NewPersistentVolumeClaimsClient

func NewPersistentVolumeClaimsClient(resources resource.Client, filter resource.Filter) PersistentVolumeClaimsClient

type PersistentVolumeClaimsReader

type PersistentVolumeClaimsReader interface {
	Get(ctx context.Context, name string) (*PersistentVolumeClaim, error)
	List(ctx context.Context) ([]*PersistentVolumeClaim, error)
}

func NewPersistentVolumeClaimsReader

func NewPersistentVolumeClaimsReader(client resource.Client, filter resource.Filter) PersistentVolumeClaimsReader

type PersistentVolumesClient

type PersistentVolumesClient interface {
	PersistentVolumes() PersistentVolumesReader
}

func NewPersistentVolumesClient

func NewPersistentVolumesClient(resources resource.Client, filter resource.Filter) PersistentVolumesClient

type PersistentVolumesReader

type PersistentVolumesReader interface {
	Get(ctx context.Context, name string) (*PersistentVolume, error)
	List(ctx context.Context) ([]*PersistentVolume, error)
}

func NewPersistentVolumesReader

func NewPersistentVolumesReader(client resource.Client, filter resource.Filter) PersistentVolumesReader

type Pod

type Pod struct {
	*resource.Resource
	Object *corev1.Pod
}

func NewPod

func NewPod(pod *corev1.Pod, client resource.Client) *Pod

func (*Pod) Container

func (p *Pod) Container(name string) *Container

Container returns a container by name

func (*Pod) Containers

func (p *Pod) Containers() []*Container

Containers returns a list of containers in the pod

func (*Pod) Delete

func (r *Pod) Delete(ctx context.Context) error

func (*Pod) Wait

func (p *Pod) Wait(ctx context.Context, timeout time.Duration) error

Wait waits for the Pod to be ready

type PodTemplate

type PodTemplate struct {
	*resource.Resource
	Object *corev1.PodTemplate
}

func NewPodTemplate

func NewPodTemplate(podTemplate *corev1.PodTemplate, client resource.Client) *PodTemplate

func (*PodTemplate) Delete

func (r *PodTemplate) Delete(ctx context.Context) error

type PodTemplatesClient

type PodTemplatesClient interface {
	PodTemplates() PodTemplatesReader
}

func NewPodTemplatesClient

func NewPodTemplatesClient(resources resource.Client, filter resource.Filter) PodTemplatesClient

type PodTemplatesReader

type PodTemplatesReader interface {
	Get(ctx context.Context, name string) (*PodTemplate, error)
	List(ctx context.Context) ([]*PodTemplate, error)
}

func NewPodTemplatesReader

func NewPodTemplatesReader(client resource.Client, filter resource.Filter) PodTemplatesReader

type PodsClient

type PodsClient interface {
	Pods() PodsReader
}

func NewPodsClient

func NewPodsClient(resources resource.Client, filter resource.Filter) PodsClient

type PodsReader

type PodsReader interface {
	Get(ctx context.Context, name string) (*Pod, error)
	List(ctx context.Context) ([]*Pod, error)
}

func NewPodsReader

func NewPodsReader(client resource.Client, filter resource.Filter) PodsReader

type PodsReference

type PodsReference interface {
	Pods() PodsReader
}

func NewPodsReference

func NewPodsReference(resources resource.Client, filter resource.Filter) PodsReference

type Secret

type Secret struct {
	*resource.Resource
	Object *corev1.Secret
}

func NewSecret

func NewSecret(secret *corev1.Secret, client resource.Client) *Secret

func (*Secret) Delete

func (r *Secret) Delete(ctx context.Context) error

type SecretsClient

type SecretsClient interface {
	Secrets() SecretsReader
}

func NewSecretsClient

func NewSecretsClient(resources resource.Client, filter resource.Filter) SecretsClient

type SecretsReader

type SecretsReader interface {
	Get(ctx context.Context, name string) (*Secret, error)
	List(ctx context.Context) ([]*Secret, error)
}

func NewSecretsReader

func NewSecretsReader(client resource.Client, filter resource.Filter) SecretsReader

type Service

type Service struct {
	*resource.Resource
	Object *corev1.Service
	EndpointsReference
}

func NewService

func NewService(service *corev1.Service, client resource.Client) *Service

func (*Service) Delete

func (r *Service) Delete(ctx context.Context) error

func (*Service) Hostname

func (s *Service) Hostname(qualified bool) string

Hostname returns the service hostname

func (*Service) Port

func (s *Service) Port(name string) *ServicePort

Port returns a service port by name

func (*Service) Ports

func (s *Service) Ports() []*ServicePort

Ports returns a list of service ports

func (*Service) Wait

func (s *Service) Wait(ctx context.Context, timeout time.Duration) error

Wait waits for the Service to be ready

type ServicePort

type ServicePort struct {
	resource.Client
	corev1.ServicePort
	// contains filtered or unexported fields
}

ServicePort is a service port

func (*ServicePort) Address

func (p *ServicePort) Address(qualified bool) string

Address returns the address of the port

type ServicesClient

type ServicesClient interface {
	Services() ServicesReader
}

func NewServicesClient

func NewServicesClient(resources resource.Client, filter resource.Filter) ServicesClient

type ServicesReader

type ServicesReader interface {
	Get(ctx context.Context, name string) (*Service, error)
	List(ctx context.Context) ([]*Service, error)
}

func NewServicesReader

func NewServicesReader(client resource.Client, filter resource.Filter) ServicesReader

Jump to

Keyboard shortcuts

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