badge

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Blue   = color.RGBA{13, 173, 234, 255}  // #0dadea
	Green  = color.RGBA{24, 190, 82, 255}   // #18be52
	Purple = color.RGBA{178, 102, 255, 255} // #b266ff
	Orange = color.RGBA{244, 192, 48, 255}  // #f4c030
	Red    = color.RGBA{233, 109, 118, 255} // #e96d76
	Grey   = color.RGBA{204, 214, 221, 255} // #ccd6dd

	HealthStatusColors = map[appv1.HealthStatusCode]color.RGBA{
		appv1.HealthStatusDegraded:    Red,
		appv1.HealthStatusHealthy:     Green,
		appv1.HealthStatusMissing:     Purple,
		appv1.HealthStatusProgressing: Blue,
		appv1.HealthStatusSuspended:   Grey,
		appv1.HealthStatusUnknown:     Purple,
	}

	SyncStatusColors = map[appv1.SyncStatusCode]color.RGBA{
		appv1.SyncStatusCodeSynced:    Green,
		appv1.SyncStatusCodeOutOfSync: Orange,
		appv1.SyncStatusCodeUnknown:   Purple,
	}
)

Functions

func NewHandler

func NewHandler(appClientset versioned.Interface, settingsMrg *settings.SettingsManager, namespace string) http.Handler

NewHandler creates handler serving to do api/badge endpoint

Types

type Handler

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

Handler used to get application in order to access health/sync

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP returns badge with health and sync status for application (or an error badge if wrong query or application name is given)

Jump to

Keyboard shortcuts

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