Documentation ¶
Index ¶
- type BaseValues
- type Entities
- type EntitiesGroup
- type Entity
- type Group
- type Info
- type Response
- func (res *Response) Send() error
- func (res *Response) SendData(data []byte) error
- func (res *Response) SetError(err error) *Response
- func (res *Response) SetErrorWithText(errText string) *Response
- func (res *Response) SetHttpCode(value int) *Response
- func (res *Response) SetResponseBody(data interface{}) *Response
- func (res *Response) Unmarshal(v interface{}) error
- type Snapshot
- type Status
- type System
- func (s *System) Calc() *System
- func (s *System) SetCPUUtilization(lastUptime, lastCpuSeconds float64) *System
- func (s *System) SetGoRoutines(value int64) *System
- func (s *System) SetOSThreads(value int64) *System
- func (s *System) SetProcessMemory(value float64) *System
- func (s *System) SetProcessMemoryAllocation(value float64) *System
- func (s *System) SetStartTime(value float64) *System
- func (s *System) SetTotalCPUSeconds(value float64) *System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseValues ¶
type BaseValues struct { Messages int64 `json:"messages"` Volume int64 `json:"volume"` Errors int64 `json:"errors,omitempty"` Waiting int64 `json:"waiting,omitempty"` }
func NewBaseValues ¶
func NewBaseValues() *BaseValues
func (*BaseValues) SetErrors ¶
func (b *BaseValues) SetErrors(value int64) *BaseValues
func (*BaseValues) SetMessages ¶
func (b *BaseValues) SetMessages(value int64) *BaseValues
func (*BaseValues) SetVolume ¶
func (b *BaseValues) SetVolume(value int64) *BaseValues
func (*BaseValues) SetWaiting ¶
func (b *BaseValues) SetWaiting(value int64) *BaseValues
type Entities ¶
func NewEntities ¶
func NewEntities() Entities
type EntitiesGroup ¶
func NewEntitiesGroup ¶
func NewEntitiesGroup() EntitiesGroup
func (EntitiesGroup) GroupEntities ¶
func (eg EntitiesGroup) GroupEntities(family string, entities map[string]*Entity) EntitiesGroup
type Entity ¶
type Entity struct { Name string `json:"name"` In *BaseValues `json:"in"` Out *BaseValues `json:"out"` }
func (*Entity) SetIn ¶
func (e *Entity) SetIn(value *BaseValues) *Entity
func (*Entity) SetOut ¶
func (e *Entity) SetOut(value *BaseValues) *Entity
type Group ¶
type Group struct { Total int `json:"total"` Active int `json:"active"` In *BaseValues `json:"in"` Out *BaseValues `json:"out"` }
func (*Group) SetIn ¶
func (g *Group) SetIn(value *BaseValues) *Group
func (*Group) SetOut ¶
func (g *Group) SetOut(value *BaseValues) *Group
func (*Group) SetValues ¶
func (g *Group) SetValues(side string, value *BaseValues)
type Info ¶
type Info struct { Host string `json:"host"` Version string `json:"version"` Mode string `json:"mode"` IsHealthy bool `json:"is_healthy"` IsReady bool `json:"is_ready"` LeadershipRole string `json:"leadership_role"` }
func (*Info) SetIsHealthy ¶
func (*Info) SetIsReady ¶
func (*Info) SetLeadershipRole ¶
func (*Info) SetVersion ¶
type Response ¶
type Response struct { Error bool `json:"error"` ErrorString string `json:"error_string"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
func NewResponse ¶
func NewResponse(c echo.Context) *Response
func (*Response) SetErrorWithText ¶
func (*Response) SetHttpCode ¶
func (*Response) SetResponseBody ¶
type Snapshot ¶
type Snapshot struct { Pk int `json:"-" storm:"id,increment"` Time int64 `json:"time"` Status *Status `json:"status"` Entities Entities `json:"entities"` }
func NewSnapshot ¶
func NewSnapshot() *Snapshot
func (*Snapshot) SetEntities ¶
type Status ¶
type Status struct { Host string `json:"host"` System *System `json:"system"` Entities EntitiesGroup `json:"entities"` }
func (*Status) SetEntities ¶
func (s *Status) SetEntities(value EntitiesGroup) *Status
type System ¶
type System struct { ProcessMemory float64 `json:"process_memory"` ProcessMemoryAllocation float64 `json:"process_memory_allocation"` GoRoutines int64 `json:"go_routines"` OSThreads int64 `json:"os_threads"` TotalCPUSeconds float64 `json:"total_cpu_seconds"` TotalCPUs int `json:"total_cpus"` StartTime float64 `json:"start_time"` Uptime float64 `json:"uptime"` CPUUtilization float64 `json:"cpu_utilization"` MemoryUtilization float64 `json:"memory_utilization"` }
func (*System) SetCPUUtilization ¶
func (*System) SetGoRoutines ¶
func (*System) SetOSThreads ¶
func (*System) SetProcessMemory ¶
func (*System) SetProcessMemoryAllocation ¶
func (*System) SetStartTime ¶
func (*System) SetTotalCPUSeconds ¶
Click to show internal directories.
Click to hide internal directories.