dashboard

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleDashboardTemplate

func AssembleDashboardTemplate() (*template.Template, error)

AssembleDashboardTemplate concatenates the pieces in correct order to build the whole dashboard layout template

Types

type ChartJSData

type ChartJSData struct {
	Label           string        `json:"label"`
	Data            []interface{} `json:"data"`
	BackgroundColor RGBA          `json:"backgroundColor"`
	BorderColor     RGBA          `json:"borderColor"`
	BorderWidth     int           `json:"borderWidth"`
}

ChartJSData bundles input to ChartJS rendering tool

type GlobalStats

type GlobalStats struct {
	BackendTotalRequests   int64            `json:"backendTotalRequests"`
	RequestsOk             int64            `json:"requestsOk"`
	RequestsErrored        int64            `json:"requestsErrored"`
	BackendRequestsOk      int64            `json:"backendRequestsOk"`
	BackendRequestsErrored int64            `json:"backendRequestsErrored"`
	SdksTotalRequests      int64            `json:"sdksTotalRequests"`
	LoggedErrors           int64            `json:"loggedErrors"`
	LoggedMessages         []string         `json:"loggedMessages"`
	Splits                 []SplitSummary   `json:"splits"`
	Segments               []SegmentSummary `json:"segments"`
	Latencies              []ChartJSData    `json:"latencies"`
	BackendLatencies       []ChartJSData    `json:"backendLatencies"`
	ImpressionsQueueSize   int64            `json:"impressionsQueueSize"`
	ImpressionsLambda      float64          `json:"impressionsLambda"`
	EventsQueueSize        int64            `json:"eventsQueueSize"`
	EventsLambda           float64          `json:"eventsLambda"`
	Uptime                 int64            `json:"uptime"`
}

GlobalStats runtime stats used to render the dashboard

type RGBA

type RGBA struct {
	Red   int32
	Green int32
	Blue  int32
	Alpha float32
}

RGBA bundles input to CSS's rgba function

func MakeRGBA

func MakeRGBA(r int32, g int32, b int32, a float32) RGBA

MakeRGBA constructs an RGBA object from it's components

func (RGBA) MarshalJSON

func (r RGBA) MarshalJSON() ([]byte, error)

MarshalJSON encodes the RGBA struct into a CSS rgba call with the correct parameters

type RootObject

type RootObject struct {
	DashboardTitle string
	Version        string
	ProxyMode      bool
	RefreshTime    int64
	Stats          GlobalStats           `json:"stats"`
	Health         application.HealthDto `json:"health"`
	ServicesHealth services.HealthDto    `json:"servicesHealth"`
}

RootObject is the main/root object used to render the dashboard

type SegmentKeySummary

type SegmentKeySummary struct {
	Name         string `json:"name"`
	Removed      bool   `json:"removed"`
	ChangeNumber int64  `json:"cn"`
}

SegmentKeySummary encapsulates basic information associated to the key in proxy mode (fields other than name are empty when running as producer

type SegmentSummary

type SegmentSummary struct {
	Name         string `json:"name"`
	TotalKeys    int    `json:"totalKeys"`
	RemovedKeys  int    `json:"removedKeys"`
	ActiveKeys   int    `json:"activeKeys"`
	LastModified string `json:"cn"`
}

SegmentSummary encapsulates a minimalistic view of segment properties to be presented in the dashboard

type SplitSummary

type SplitSummary struct {
	Name             string   `json:"name"`
	Active           bool     `json:"active"`
	Killed           bool     `json:"killed"`
	DefaultTreatment string   `json:"defaultTreatment"`
	Treatments       []string `json:"treatments"`
	LastModified     string   `json:"cn"`
}

SplitSummary encapsulates a minimalistic view of split properties to be presented in the dashboard

Jump to

Keyboard shortcuts

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