webstatus

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlertDetailPath is the path of the alert details
	AlertDetailPath = "/alert/detail/"
)
View Source
const (
	// FilesPath is the path for files
	FilesPath = "/files/"
)
View Source
const (
	// IncidentDetailPath is the path of the incitedent details
	IncidentDetailPath = "/incident/detail/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonData added in v0.16.3

type CommonData struct {
	Title      string
	TitleImage string
	Baseurl    string
	Version    string
	Query      string
	AutoReload int
	Theme      string
	DatePicker datepicker
}

func (CommonData) Since added in v0.16.3

type Conn added in v0.17.1

type Conn struct {
	Cid                     int       `json:"cid"`
	Kind                    string    `json:"kind"`
	Type                    string    `json:"type"`
	IP                      string    `json:"ip"`
	Port                    int       `json:"port"`
	Start                   time.Time `json:"start"`
	LastActivity            time.Time `json:"last_activity"`
	Rtt                     string    `json:"rtt"`
	Uptime                  string    `json:"uptime"`
	Idle                    string    `json:"idle"`
	PendingBytes            int       `json:"pending_bytes"`
	InMsgs                  int       `json:"in_msgs"`
	OutMsgs                 int       `json:"out_msgs"`
	InBytes                 int       `json:"in_bytes"`
	OutBytes                int       `json:"out_bytes"`
	Subscriptions           int       `json:"subscriptions"`
	SubscriptionsListDetail []struct {
		Subject string `json:"subject"`
		Sid     string `json:"sid"`
		Msgs    int    `json:"msgs"`
		Cid     int    `json:"cid"`
	} `json:"subscriptions_list_detail"`
	Name    string `json:"name"`
	Lang    string `json:"lang"`
	Version string `json:"version"`
}

type Connz added in v0.17.1

type Connz struct {
	ServerID       string    `json:"server_id"`
	Now            time.Time `json:"now"`
	NumConnections int       `json:"num_connections"`
	Total          int       `json:"total"`
	Offset         int       `json:"offset"`
	Limit          int       `json:"limit"`
	Connections    []Conn    `json:"connections"`
}

type OverviewAPIResonse added in v0.16.3

type OverviewAPIResonse struct {
	*CommonData
	PromURL   string
	Szenarios []SzenarioAPIResponse
}

type SzenarioAPIResponse added in v0.16.3

type SzenarioAPIResponse struct {
	Name            string
	PromName        string
	Level           status.Level
	Img             string
	Status          string
	AvailabilityCur string
	AvailabilityAvg string
	LastTime        template.HTML
	AvgTime         template.HTML
	LastUpdate      string
	IncidentCount   int
	IncidentList    string
}

type WebStatus

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

WebStatus displays the current status on the web

func New

func New() *WebStatus

New registers a WebStatus on the event bus

func (*WebStatus) Ent

func (s *WebStatus) Ent() *db.Client

Ent returns the db.Access

func (*WebStatus) Error added in v0.10.3

func (s *WebStatus) Error(w http.ResponseWriter, r *http.Request,
	msg string, err error, status int)

Jump to

Keyboard shortcuts

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