kubernetes

package
v0.0.0-...-e2f90f4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// response status
	ResponseStatusOk    Status = "OK"
	ResponseStatusError Status = "ERROR"

	// response codes
	ResponseCodeOk    Code = 200
	ResponseCodeError Code = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int

type Component

type Component interface {
	CheckStatus() map[string]*ComponentProbe
}

type ComponentProbe

type ComponentProbe struct {
	Status       Status  `json:"status"`
	Code         Code    `json:"code"`
	Message      string  `json:"message"`
	TimeConsumed float64 `json:"timeConsumed"` // in milliseconds
	IsRequired   bool    `json:"isRequired"`
}

type Probe

type Probe struct {
	Status     Status                     `json:"status"`
	Code       Code                       `json:"code"`
	Components map[string]*ComponentProbe `json:"components"`
}

type Server

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

func New

func New(component Component) *Server

func (*Server) Shutdown

func (s *Server) Shutdown(timeout time.Duration)

func (*Server) Start

func (s *Server) Start()

type Status

type Status string

Jump to

Keyboard shortcuts

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