api

package
v0.0.0-...-56cbe5d Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddModelMetricsPayload

type AddModelMetricsPayload struct {
	StepName  string                 `json:"step_name"`
	StepValue uint32                 `json:"step_value"`
	Metrics   map[string]json.Number `json:"metrics"`
}

Incoming format is an array of these

type AddModelMetricsResponse

type AddModelMetricsResponse struct {
	Message        string `json:"message"`
	MetricsCreated uint32 `json:"metricsCreated"`
}

type Admin

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

func NewAdmin

func NewAdmin(app *App) *Admin

func (*Admin) Register

func (admin *Admin) Register(router *mux.Router)

type App

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

App is the main application struct.

func New

func New(
	listenAddress string,
	listenPort int,
	databaseAddress string,
	databaseType string,
	constTenant string,
	lokiAddress string,
	lokiTenant string,
	promlogConfig *promlog.Config) (*App, error)

func (*App) Run

func (a *App) Run() error

func (*App) Shutdown

func (a *App) Shutdown()

type DataFrame

type DataFrame []Field

type Field

type Field struct {
	Name   string        `json:"name"`
	Type   string        `json:"type"`
	Values []interface{} `json:"values"`
}

This is for return We want an array of objects that contain grafana dataframes For visualizing

type GetModelMetricsResponse

type GetModelMetricsResponse struct {
	Sections map[string][]Panel `json:"sections"`
}

type Panel

type Panel struct {
	Title  string    `json:"title"`
	Series DataFrame `json:"series"`
}

type Result

type Result struct {
	TenantID    string
	ProcessID   uuid.UUID
	MetricName  string
	StepName    string
	Step        uint32
	MetricValue *string // Pointer to allow for NULL values
}

Result struct to hold our query results

Jump to

Keyboard shortcuts

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