Documentation ¶
Index ¶
- Variables
- func Emit(id string, event string, payload interface{})
- func InitCache(pub services.MetricsEventsPublisher)
- func Refresh(id int64)
- func Remove(id string)
- func Set(id string, sock *ProbeSocket)
- func Shutdown()
- func UpdateProbe(probe *m.ProbeDTO)
- type Cache
- type ProbeSocket
- func (p *ProbeSocket) EmitReady() error
- func (p *ProbeSocket) LastRefresh() time.Time
- func (p *ProbeSocket) OnDisconnection()
- func (p *ProbeSocket) OnEvent(msg *schema.ProbeEvent)
- func (p *ProbeSocket) OnResults(results []*schemaV0.MetricData)
- func (p *ProbeSocket) Refresh()
- func (p *ProbeSocket) Remove() error
- func (p *ProbeSocket) Start()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProbesConnected = stats.NewGauge32("api.probes.connected") UpdatesSent = stats.NewCounter32("api.probes.updates-sent") CreatesSent = stats.NewCounter32("api.probes.creates-sent") RemovesSent = stats.NewCounter32("api.probes.removes-sent") )
View Source
var (
RefreshDuration = stats.NewMeter32("api.probes.refresh-duration", true)
)
Functions ¶
func InitCache ¶
func InitCache(pub services.MetricsEventsPublisher)
func Set ¶
func Set(id string, sock *ProbeSocket)
func UpdateProbe ¶
Types ¶
type Cache ¶
type Cache struct { sync.RWMutex Sockets map[string]*ProbeSocket // contains filtered or unexported fields }
func (*Cache) Set ¶
func (c *Cache) Set(id string, sock *ProbeSocket)
func (*Cache) UpdateProbe ¶
type ProbeSocket ¶
type ProbeSocket struct { sync.Mutex *auth.User Probe *m.ProbeDTO Socket socketio.Socket Session *m.ProbeSession // contains filtered or unexported fields }
func NewProbeSocket ¶
func (*ProbeSocket) EmitReady ¶
func (p *ProbeSocket) EmitReady() error
func (*ProbeSocket) LastRefresh ¶
func (p *ProbeSocket) LastRefresh() time.Time
func (*ProbeSocket) OnDisconnection ¶
func (p *ProbeSocket) OnDisconnection()
func (*ProbeSocket) OnEvent ¶
func (p *ProbeSocket) OnEvent(msg *schema.ProbeEvent)
func (*ProbeSocket) OnResults ¶
func (p *ProbeSocket) OnResults(results []*schemaV0.MetricData)
func (*ProbeSocket) Refresh ¶
func (p *ProbeSocket) Refresh()
func (*ProbeSocket) Remove ¶
func (p *ProbeSocket) Remove() error
func (*ProbeSocket) Start ¶
func (p *ProbeSocket) Start()
Click to show internal directories.
Click to hide internal directories.