Documentation ¶
Index ¶
Constants ¶
View Source
const RefreshInterval time.Duration = time.Second * 1
Variables ¶
This section is empty.
Functions ¶
func GenerateUUID ¶
Types ¶
type GenericVarz ¶
type GenericVarz struct { // These fields are from individual components Type string `json:"type"` Index uint `json:"index"` Host string `json:"host"` Credentials []string `json:"credentials"` // These fields are automatically generated UUID string `json:"uuid"` StartTime Time `json:"start"` // Static common metrics NumCores int `json:"num_cores"` // Dynamic common metrics MemStat int64 `json:"mem"` Cpu float64 `json:"cpu"` Uptime Duration `json:"uptime"` LogCounts *LogCounter `json:"log_counts"` }
type LogCounter ¶
func NewLogCounter ¶
func NewLogCounter() *LogCounter
func (*LogCounter) GetCount ¶
func (lc *LogCounter) GetCount(key string) int
func (*LogCounter) MarshalJSON ¶
func (lc *LogCounter) MarshalJSON() ([]byte, error)
type ProcessStatus ¶
type ProcessStatus struct { sync.RWMutex CpuUsage float64 MemRss int64 // contains filtered or unexported fields }
func NewProcessStatus ¶
func NewProcessStatus() *ProcessStatus
func (*ProcessStatus) StopUpdate ¶
func (p *ProcessStatus) StopUpdate()
func (*ProcessStatus) Update ¶
func (p *ProcessStatus) Update()
type RouterStart ¶
type Varz ¶
type Varz struct { sync.Mutex GenericVarz UniqueVarz interface{} // Every component's unique metrics }
func (*Varz) MarshalJSON ¶
type VcapComponent ¶
type VcapComponent struct { Config interface{} `json:"-"` Varz *Varz `json:"-"` Healthz *Healthz `json:"-"` InfoRoutes map[string]json.Marshaler `json:"-"` Logger lager.Logger `json:"-"` // contains filtered or unexported fields }
func (*VcapComponent) ListenAndServe ¶
func (c *VcapComponent) ListenAndServe()
func (*VcapComponent) Register ¶
func (c *VcapComponent) Register(mbusClient yagnats.NATSConn) error
func (*VcapComponent) Start ¶
func (c *VcapComponent) Start() error
func (*VcapComponent) Stop ¶
func (c *VcapComponent) Stop()
func (*VcapComponent) UpdateVarz ¶
func (c *VcapComponent) UpdateVarz()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.