status

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentDocker     = "docker"
	EnvironmentKubernetes = "kubernetes"
	EnvironmentBareMetal  = "bare_metal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	Hostname          string           `json:"hostname"`
	DocumentationURL  string           `json:"documentationUrl"`
	Login             settingsTY.Login `json:"login"`
	StartTime         time.Time        `json:"startTime"`
	ServerTime        time.Time        `json:"serverTime"`
	Uptime            uint64           `json:"uptime"` // in milliseconds
	MetricsDBDisabled bool             `json:"metricsDBDisabled"`
	Language          string           `json:"language"`
}

type StatusAPI

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

func New

func New(ctx context.Context, logger *zap.Logger, storage storageTY.Plugin, enc *encryptionAPI.Encryption, bus busTY.Plugin) *StatusAPI

func (*StatusAPI) Get

func (s *StatusAPI) Get() Status

Get returns status with all fields

func (*StatusAPI) GetMinimal

func (s *StatusAPI) GetMinimal() Status

GetMinimal returns limited fields, can be used under status rest api (login not required)

func (*StatusAPI) RunningIn

func (s *StatusAPI) RunningIn() string

docker creates a .dockerenv file at the root of the directory tree inside the container. if this file exists then the viewer is running from inside a container so return true With the default configuration, Kubernetes will mount the serviceaccount secrets into pods.

Jump to

Keyboard shortcuts

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