status

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cache = "cache"

	FileSrc   SDKSource = "file"
	RemoteSrc SDKSource = "remote"
	CacheSrc  SDKSource = "cache"

	Healthy      HealthStatus = "healthy"
	Degraded     HealthStatus = "degraded"
	Initializing HealthStatus = "initializing"
	Down         HealthStatus = "down"
	NA           HealthStatus = "n/a"

	Offline SDKMode = "offline"
	Online  SDKMode = "online"
)

Variables

This section is empty.

Functions

func InterceptSdk

func InterceptSdk(sdkId string, reporter Reporter, transport http.RoundTripper) http.RoundTripper

Types

type CacheStatus

type CacheStatus struct {
	Status  HealthStatus `json:"status"`
	Records []string     `json:"records"`
}

type HealthStatus

type HealthStatus string

type Reporter

type Reporter interface {
	RegisterSdk(sdkId string, conf *config.SDKConfig)
	ReportOk(component string, message string)
	ReportError(component string, message string)
	GetStatus() Status

	HttpHandler() http.HandlerFunc
}

func NewEmptyReporter added in v0.5.0

func NewEmptyReporter() Reporter

func NewReporter

func NewReporter(conf *config.CacheConfig) Reporter

type SDKMode

type SDKMode string

type SDKSource

type SDKSource string

type SdkSourceStatus

type SdkSourceStatus struct {
	Type    SDKSource    `json:"type"`
	Status  HealthStatus `json:"status"`
	Records []string     `json:"records"`
}

type SdkStatus

type SdkStatus struct {
	SdkKey string          `json:"key"`
	Mode   SDKMode         `json:"mode"`
	Source SdkSourceStatus `json:"source"`
}

type Status

type Status struct {
	Status HealthStatus          `json:"status"`
	SDKs   map[string]*SdkStatus `json:"sdks"`
	Cache  CacheStatus           `json:"cache"`
}

Jump to

Keyboard shortcuts

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