kube

package
v0.0.0-...-03fcf09 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenClient

func GenClient() (*kubernetes.Clientset, error)

func ListNamespaces

func ListNamespaces(ctx context.Context, client *kubernetes.Clientset) ([]string, error)

func ReqListContainers

func ReqListContainers(w http.ResponseWriter, r *http.Request)

func ReqListNamespaces

func ReqListNamespaces(w http.ResponseWriter, r *http.Request)

func ReqWatchLogs

func ReqWatchLogs(w http.ResponseWriter, r *http.Request)

func StreamLogs

func StreamLogs(ctx context.Context, client *kubernetes.Clientset, ns string, pod string, callback LogCallback) error

Types

type LogCallback

type LogCallback func(ns string, pod string, data []byte)

LogCallback is a function type that handles log data chunks.

type PodContainerInfo

type PodContainerInfo map[string]map[string][]string // Namespace -> Pod -> Containers

func ListAllContainers

func ListAllContainers(ctx context.Context, client *kubernetes.Clientset) (PodContainerInfo, error)

func ListContainers

func ListContainers(ctx context.Context, client *kubernetes.Clientset, ns string) (PodContainerInfo, error)

Jump to

Keyboard shortcuts

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