kubernetes

package
v0.0.0-...-e3d380c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KubeProbesStatusOk    = "OK"
	KubeProbesStatusError = "ERROR"

	KubeProbesCodeOk    = 200
	KubeProbesCodeError = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RestPort        int
	ShutdownTimeout int
}

Config -

func (*Config) IsValid

func (c *Config) IsValid() bool

IsValid -

type GrpcInterface

type GrpcInterface interface {
	CheckState() (int, string, string)
}

GrpcInterface -

type GrpcReadyness

type GrpcReadyness struct {
	Code    int    `json:"code"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type KubeProbes

type KubeProbes struct {
	GrpcInterface GrpcInterface
}

type KubeProbesServer

type KubeProbesServer struct {
	Config     *Config
	Router     *mux.Router
	HttpServer *http.Server
}

KubeProbesServer - Kubernetes REST server

func NewKubeProbesServer

func NewKubeProbesServer(probes KubeProbes) (*KubeProbesServer, error)

NewKubeProbesServer - Create new Kubernetes REST server

func (*KubeProbesServer) Shutdown

func (s *KubeProbesServer) Shutdown()

Shutdown - Shutdown Kubernetes REST server

func (*KubeProbesServer) Start

func (s *KubeProbesServer) Start()

Start - Start Kubernetes REST server

type Liveness

type Liveness struct {
	Code   int    `json:"code"`
	Status string `json:"status"`
}

type Readyness

type Readyness struct {
	Code   int           `json:"code"`
	Status string        `json:"status"`
	Grpc   GrpcReadyness `json:"grpc"`
}

Jump to

Keyboard shortcuts

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