kubernetes

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kubernetes provides a low level client for small footprint consideration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *http.Client

GetClient returns a default client

func KubernetesValidatorFunc

func KubernetesValidatorFunc() expr.Option

KubernetesValidatorFunc returns a expr for checking the generic Kubernetes resources

func PodValidatorFunc

func PodValidatorFunc() expr.Option

PodValidatorFunc returns a expr for checking pod existing

Types

type Reader

type Reader interface {
	GetResource(group, kind, version, namespace, name string) (map[string]interface{}, error)
}

Reader represents a reader interface

func NewDefaultReader

func NewDefaultReader(server, token string) Reader

NewDefaultReader returns a reader implement

type ResourceValidator

type ResourceValidator interface {
	Exist() bool
	Count() int
	ExpectCount(int) bool
	ExpectField(value interface{}, fields ...string) bool
}

ResourceValidator represents a generic resource validator

Jump to

Keyboard shortcuts

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