api

package
v0.0.0-...-e83616f Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API exposes client and broker and various methods to interact with backend api-servers

func NewAPI

func NewAPI(c *kubernetes.Clientset) (*API, error)

NewAPI returns an initialized API instance

func (*API) GetNamespace

func (a *API) GetNamespace(w http.ResponseWriter, r *http.Request)

GetNamespace returns a Namespace in a cluster

func (*API) GetNamespaces

func (a *API) GetNamespaces(w http.ResponseWriter, r *http.Request)

GetNamespaces returns NamespaceList in a cluster

func (*API) GetPod

func (a *API) GetPod(w http.ResponseWriter, r *http.Request)

GetPod will return a Pod in a namespace

func (*API) GetPodLog

func (a *API) GetPodLog(w http.ResponseWriter, r *http.Request)

GetPodLog returns container log of a container in a pod

func (*API) GetPods

func (a *API) GetPods(w http.ResponseWriter, r *http.Request)

GetPods will return PodList in a namespace

func (*API) StreamPodLog

func (a *API) StreamPodLog(w http.ResponseWriter, r *http.Request)

StreamPodLog will start streaming logs of a container running in a pod

type Broker

type Broker struct {
	// Events are pushed to this channel by the main events-gathering routine
	Notifier chan []byte
	// contains filtered or unexported fields
}

Broker type implements some functions in order for clients to make use of SSE (Server Sent Events)

func NewBroker

func NewBroker() *Broker

NewBroker returns an initialized Broker instance

Jump to

Keyboard shortcuts

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