Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
View Source
var LiveOverview = &Overview{}
Functions ¶
func ConnectDatabase ¶
func ConnectDatabase()
Types ¶
type ConsistencyOverview ¶
type CreateServiceInput ¶
type CreateServiceInput struct { // Name specifies the name of service Name string `json:"name" binding:"required"` // Endpoint specifies the endpoint of service Endpoint string `json:"endpoint" binding:"required"` // UpCodes specifies the comma separated http codes that signify UP status UpCodes string `json:"upCodes" binding:"required"` // Tags specifies metadata for the service Metadata string `json:"metadata"` }
type DBService ¶
type DBService struct { // ID specifies the id of the service ID uint `json:"id" gorm:"primary_key"` // Name specifies the name of service Name string `json:"name"` // Endpoint specifies the endpoint of service Endpoint string `json:"endpoint"` // UpCodes specifies the comma separated http codes that signify UP status UpCodes string `json:"upCodes"` // Tags specifies metadata for the service Metadata string `json:"metadata"` // Status specifies the status of the endpoint (up/down) Status Status `json:"status"` // Metrics specifies json string of the last collected metrics Metrics string `json:"metrics"` // TimeSeriesMetrics json string of last few iteration metrics TimeSeriesMetrics string `json:"timeSeriesMetrics"` }
func FormatDBSvcMetrics ¶
type LatencyOverview ¶
type Metrics ¶
type Metrics struct { //Timestamp Timestamp string `json:"timeStamp"` // DNSTime ... DNSTime float64 `json:"dnsTime"` // ConnectTime ... ConnectTime float64 `json:"connectTime"` // TLSTime ... TLSTime float64 `json:"tlsTime"` // TotalTime ... TotalTime float64 `json:"totalTime"` }
Metrics represents a set of metrics
type Overview ¶
type Overview struct { StatusOverview StatusOverview `json:"status"` LatencyOverview LatencyOverview `json:"latency"` ConsistencyOverview ConsistencyOverview `json:"consistency"` }
type Service ¶
type Service struct { // ID specifies the id of the service ID uint `json:"id" gorm:"primary_key"` // Name specifies the name of service Name string `json:"name"` // Endpoint specifies the endpoint of service Endpoint string `json:"endpoint"` // UpCodes specifies the comma separated http codes that signify UP status UpCodes string `json:"upCodes"` // Tags specifies metadata for the service Metadata string `json:"metadata"` // Status specifies the status of the endpoint (up/down) Status Status `json:"status"` // Metrics specifies the last collected metrics Metrics Metrics `json:"metrics"` // TimeSeriesMetrics for last few iteration metrics TimeSeriesMetrics []Metrics `json:"timeSeriesMetrics"` }
func DBSvcToSvc ¶
type StatusOverview ¶
type UpdateServiceInput ¶
type UpdateServiceInput struct { // Name specifies the name of service Name string `json:"name"` // Endpoint specifies the endpoint of service Endpoint string `json:"endpoint"` // UpCodes specifies the comma separated http codes that signify UP status UpCodes string `json:"upCodes"` // Tags specifies metadata for the service Metadata string `json:"metadata"` }
Click to show internal directories.
Click to hide internal directories.