Documentation ¶
Index ¶
- Variables
- func ElasticsearchProxy(c *middleware.Context)
- func EmitAddMonitor(event *events.MonitorCreated) error
- func EmitDeleteMonitor(event *events.MonitorRemoved) error
- func EmitEvent(collectorId int64, eventName string, event interface{}) error
- func EmitUpdateMonitor(event *events.MonitorUpdated) error
- func GraphiteProxy(c *middleware.Context)
- func HandleCollectorConnected(event *events.CollectorConnected) error
- func HandleCollectorDisconnected(event *events.CollectorDisconnected) error
- func HandleCollectorUpdated(event *events.CollectorUpdated) error
- func Heartbeat(c *middleware.Context)
- func InitCollectorController(metrics met.Backend)
- func NotFoundHandler(c *middleware.Context)
- func Register(r *macaron.Macaron)
- func SocketIO(c *middleware.Context)
- type BinMessage
- type CollectorContext
- func (c *CollectorContext) EmitReady() error
- func (c *CollectorContext) OnDisconnection()
- func (c *CollectorContext) OnEvent(msg *schema.ProbeEvent)
- func (c *CollectorContext) OnEventOld(msg *probeEventOld)
- func (c *CollectorContext) OnResults(results []*schema.MetricData)
- func (c *CollectorContext) Refresh()
- func (c *CollectorContext) Remove() error
- func (c *CollectorContext) Save() error
- func (c *CollectorContext) Update() error
- type ContextCache
- func (c *ContextCache) AddMonitor(event *events.MonitorCreated)
- func (c *ContextCache) DeleteMonitor(event *events.MonitorRemoved)
- func (s *ContextCache) Emit(id string, event string, payload interface{})
- func (c *ContextCache) Refresh(collectorId int64)
- func (c *ContextCache) RefreshLoop()
- func (s *ContextCache) Remove(id string)
- func (s *ContextCache) Set(id string, context *CollectorContext)
- func (c *ContextCache) UpdateMonitor(event *events.MonitorUpdated)
- type NormalResponse
- type Response
- func AddCollector(c *middleware.Context, cmd m.AddCollectorCommand) Response
- func AddEndpoint(c *middleware.Context, cmd m.AddEndpointCommand) Response
- func AddMonitor(c *middleware.Context, cmd m.AddMonitorCommand) Response
- func DeleteCollector(c *middleware.Context) Response
- func DeleteEndpoint(c *middleware.Context) Response
- func DeleteMonitor(c *middleware.Context) Response
- func DiscoverEndpoint(c *middleware.Context, cmd m.EndpointDiscoveryCommand) Response
- func GetCollectorById(c *middleware.Context) Response
- func GetCollectors(c *middleware.Context, query m.GetCollectorsQuery) Response
- func GetEndpointById(c *middleware.Context) Response
- func GetEndpoints(c *middleware.Context, query m.GetEndpointsQuery) Response
- func GetEvents(c *middleware.Context, query m.GetEventsQuery) Response
- func GetMonitorById(c *middleware.Context) Response
- func GetMonitorTypes(c *middleware.Context) Response
- func GetMonitors(c *middleware.Context, query m.GetMonitorsQuery) Response
- func GetOrgQuotas(c *middleware.Context) Response
- func GetOwnOrgQuotas(c *middleware.Context) Response
- func UpdateCollector(c *middleware.Context, cmd m.UpdateCollectorCommand) Response
- func UpdateEndpoint(c *middleware.Context, cmd m.UpdateEndpointCommand) Response
- func UpdateMonitor(c *middleware.Context, cmd m.UpdateMonitorCommand) Response
- func UpdateOrgQuota(c *middleware.Context, cmd m.UpdateOrgQuotaCmd) Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotFound = ApiError(404, "Not found", nil) ServerError = ApiError(500, "Server error", nil) )
Functions ¶
func ElasticsearchProxy ¶
func ElasticsearchProxy(c *middleware.Context)
func EmitAddMonitor ¶
func EmitAddMonitor(event *events.MonitorCreated) error
func EmitDeleteMonitor ¶
func EmitDeleteMonitor(event *events.MonitorRemoved) error
func EmitUpdateMonitor ¶
func EmitUpdateMonitor(event *events.MonitorUpdated) error
func GraphiteProxy ¶
func GraphiteProxy(c *middleware.Context)
func HandleCollectorConnected ¶
func HandleCollectorConnected(event *events.CollectorConnected) error
func HandleCollectorDisconnected ¶
func HandleCollectorDisconnected(event *events.CollectorDisconnected) error
func HandleCollectorUpdated ¶
func HandleCollectorUpdated(event *events.CollectorUpdated) error
func Heartbeat ¶
func Heartbeat(c *middleware.Context)
func InitCollectorController ¶
func NotFoundHandler ¶
func NotFoundHandler(c *middleware.Context)
func SocketIO ¶
func SocketIO(c *middleware.Context)
Types ¶
type BinMessage ¶
type BinMessage struct {
Payload *socketio.Attachment
}
type CollectorContext ¶
type CollectorContext struct { *m.SignedInUser Collector *m.CollectorDTO Socket socketio.Socket SocketId string MonitorsIndex map[int64]*m.MonitorDTO // index of monitors by Id VersionMajor int64 VersionMinor float64 }
func (*CollectorContext) EmitReady ¶
func (c *CollectorContext) EmitReady() error
func (*CollectorContext) OnDisconnection ¶
func (c *CollectorContext) OnDisconnection()
func (*CollectorContext) OnEvent ¶
func (c *CollectorContext) OnEvent(msg *schema.ProbeEvent)
func (*CollectorContext) OnEventOld ¶
func (c *CollectorContext) OnEventOld(msg *probeEventOld)
func (*CollectorContext) OnResults ¶
func (c *CollectorContext) OnResults(results []*schema.MetricData)
func (*CollectorContext) Refresh ¶
func (c *CollectorContext) Refresh()
func (*CollectorContext) Remove ¶
func (c *CollectorContext) Remove() error
func (*CollectorContext) Save ¶
func (c *CollectorContext) Save() error
func (*CollectorContext) Update ¶
func (c *CollectorContext) Update() error
type ContextCache ¶
type ContextCache struct { sync.RWMutex Contexts map[string]*CollectorContext // contains filtered or unexported fields }
func NewContextCache ¶
func NewContextCache() *ContextCache
func (*ContextCache) AddMonitor ¶
func (c *ContextCache) AddMonitor(event *events.MonitorCreated)
func (*ContextCache) DeleteMonitor ¶
func (c *ContextCache) DeleteMonitor(event *events.MonitorRemoved)
func (*ContextCache) Emit ¶
func (s *ContextCache) Emit(id string, event string, payload interface{})
func (*ContextCache) Refresh ¶
func (c *ContextCache) Refresh(collectorId int64)
func (*ContextCache) RefreshLoop ¶
func (c *ContextCache) RefreshLoop()
func (*ContextCache) Remove ¶
func (s *ContextCache) Remove(id string)
func (*ContextCache) Set ¶
func (s *ContextCache) Set(id string, context *CollectorContext)
func (*ContextCache) UpdateMonitor ¶
func (c *ContextCache) UpdateMonitor(event *events.MonitorUpdated)
type NormalResponse ¶
type NormalResponse struct {
// contains filtered or unexported fields
}
func ApiSuccess ¶
func ApiSuccess(message string) *NormalResponse
func Empty ¶
func Empty(status int) *NormalResponse
func Json ¶
func Json(status int, body interface{}) *NormalResponse
func Respond ¶
func Respond(status int, body interface{}) *NormalResponse
func (*NormalResponse) Cache ¶
func (r *NormalResponse) Cache(ttl string) *NormalResponse
func (*NormalResponse) Header ¶
func (r *NormalResponse) Header(key, value string) *NormalResponse
func (*NormalResponse) WriteTo ¶
func (r *NormalResponse) WriteTo(out http.ResponseWriter)
type Response ¶
type Response interface {
WriteTo(out http.ResponseWriter)
}
func AddCollector ¶
func AddCollector(c *middleware.Context, cmd m.AddCollectorCommand) Response
func AddEndpoint ¶
func AddEndpoint(c *middleware.Context, cmd m.AddEndpointCommand) Response
func AddMonitor ¶
func AddMonitor(c *middleware.Context, cmd m.AddMonitorCommand) Response
func DeleteCollector ¶
func DeleteCollector(c *middleware.Context) Response
func DeleteEndpoint ¶
func DeleteEndpoint(c *middleware.Context) Response
func DeleteMonitor ¶
func DeleteMonitor(c *middleware.Context) Response
func DiscoverEndpoint ¶
func DiscoverEndpoint(c *middleware.Context, cmd m.EndpointDiscoveryCommand) Response
func GetCollectorById ¶
func GetCollectorById(c *middleware.Context) Response
func GetCollectors ¶
func GetCollectors(c *middleware.Context, query m.GetCollectorsQuery) Response
func GetEndpointById ¶
func GetEndpointById(c *middleware.Context) Response
func GetEndpoints ¶
func GetEndpoints(c *middleware.Context, query m.GetEndpointsQuery) Response
func GetEvents ¶
func GetEvents(c *middleware.Context, query m.GetEventsQuery) Response
func GetMonitorById ¶
func GetMonitorById(c *middleware.Context) Response
func GetMonitorTypes ¶
func GetMonitorTypes(c *middleware.Context) Response
func GetMonitors ¶
func GetMonitors(c *middleware.Context, query m.GetMonitorsQuery) Response
func GetOrgQuotas ¶
func GetOrgQuotas(c *middleware.Context) Response
func GetOwnOrgQuotas ¶
func GetOwnOrgQuotas(c *middleware.Context) Response
func UpdateCollector ¶
func UpdateCollector(c *middleware.Context, cmd m.UpdateCollectorCommand) Response
func UpdateEndpoint ¶
func UpdateEndpoint(c *middleware.Context, cmd m.UpdateEndpointCommand) Response
func UpdateMonitor ¶
func UpdateMonitor(c *middleware.Context, cmd m.UpdateMonitorCommand) Response
func UpdateOrgQuota ¶
func UpdateOrgQuota(c *middleware.Context, cmd m.UpdateOrgQuotaCmd) Response
Source Files ¶
Click to show internal directories.
Click to hide internal directories.