api

package
Version: v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements the api server. The api server is used to serve the rest api for kobs.

func New

func New(clustersClient clusters.Client, pluginsRouter chi.Router, isDevelopment bool) (*Server, error)

New return a new api server. It creates the underlying http server, with the defined address from the api.address flag. When the development flag is set we also set some cors option, so we do not have to care about cors for development. We exclude the health check from all middlewares, because the health check just returns 200. Therefore we do not need our defined middlewares like request id, metrics, auth or loggin. This also makes it easier to analyze the logs in a Kubernetes cluster where the health check is called every x seconds, because we generate less logs.

func (*Server) Start

func (s *Server) Start()

Start starts serving the api server.

func (*Server) Stop

func (s *Server) Stop()

Stop terminates the api server gracefully.

Source Files

Directories

Path Synopsis
apis
clients
application/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
application/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
application/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
application/clientset/versioned/typed/application/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
application/clientset/versioned/typed/application/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
dashboard/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
dashboard/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
dashboard/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
dashboard/clientset/versioned/typed/dashboard/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
dashboard/clientset/versioned/typed/dashboard/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
team/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
team/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
team/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
team/clientset/versioned/typed/team/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
team/clientset/versioned/typed/team/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
user/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
user/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
user/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
user/clientset/versioned/typed/user/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
user/clientset/versioned/typed/user/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
cluster/terminal
Package terminal implements the functions for all terminal interactions in the frontend.
Package terminal implements the functions for all terminal interactions in the frontend.
middleware
errresponse
Package errresponse implements a custom error renderer for the kobs api as it is described in the chi rest api example, which can be found here: https://github.com/go-chi/chi/blob/master/_examples/rest/main.go
Package errresponse implements a custom error renderer for the kobs api as it is described in the chi rest api example, which can be found here: https://github.com/go-chi/chi/blob/master/_examples/rest/main.go
httplog
Package httplog implements our custom http logger middleware for kobs based on zap.
Package httplog implements our custom http logger middleware for kobs based on zap.
plugins

Jump to

Keyboard shortcuts

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