api

package
v0.0.0-...-7c57c21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2016 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProbesConnected               met.Gauge
	ProbeSessionCreatedEventsSeen met.Count
	ProbeSessionDeletedEventsSeen met.Count
	UpdatesSent                   met.Count
	CreatesSent                   met.Count
	RemovesSent                   met.Count
	UpdatesRecv                   met.Count
	CreatesRecv                   met.Count
	RemovesRecv                   met.Count
	RefreshDuration               met.Timer
)

Functions

func EmitCheckEvent

func EmitCheckEvent(probeId int64, checkId int64, eventName string, event interface{}) error

func GetOrgQuotas

func GetOrgQuotas(c *middleware.Context) *rbody.ApiResponse

func GetQuotas

func GetQuotas(c *middleware.Context) *rbody.ApiResponse

func GetUsage

func GetUsage(c *middleware.Context) *rbody.ApiResponse

func HandleEndpointCreated

func HandleEndpointCreated(event *events.EndpointCreated) error

func HandleEndpointDeleted

func HandleEndpointDeleted(event *events.EndpointDeleted) error

func HandleEndpointUpdated

func HandleEndpointUpdated(event *events.EndpointUpdated) error

func HandleProbeSessionCreated

func HandleProbeSessionCreated(event *events.ProbeSessionCreated) error

func HandleProbeSessionDeleted

func HandleProbeSessionDeleted(event *events.ProbeSessionDeleted) error

func HandleProbeUpdated

func HandleProbeUpdated(event *events.ProbeUpdated) error

func Heartbeat

func Heartbeat(c *middleware.Context)

func InitCollectorController

func InitCollectorController(metrics met.Backend)

func NotFoundHandler

func NotFoundHandler(c *middleware.Context)

func Register

func Register(r *macaron.Macaron)

Register adds http routes

func ShutdownController

func ShutdownController()

func SocketIO

func SocketIO(c *middleware.Context)

func UpdateOrgQuota

func UpdateOrgQuota(c *middleware.Context) *rbody.ApiResponse

func V1AddCollector

func V1AddCollector(c *middleware.Context, probe m.ProbeDTO)

func V1AddEndpoint

func V1AddEndpoint(c *middleware.Context, cmd m.AddEndpointCommand)

func V1AddMonitor

func V1AddMonitor(c *middleware.Context, cmd m.AddMonitorCommand)

func V1DeleteCollector

func V1DeleteCollector(c *middleware.Context)

func V1DeleteEndpoint

func V1DeleteEndpoint(c *middleware.Context)

func V1DeleteMonitor

func V1DeleteMonitor(c *middleware.Context)

func V1DiscoverEndpoint

func V1DiscoverEndpoint(c *middleware.Context, cmd m.DiscoverEndpointCmd)

func V1ElasticsearchProxy

func V1ElasticsearchProxy(c *middleware.Context)

func V1GetCollectorById

func V1GetCollectorById(c *middleware.Context)

func V1GetCollectorLocations

func V1GetCollectorLocations(c *middleware.Context)

func V1GetCollectors

func V1GetCollectors(c *middleware.Context, query m.GetProbesQuery)

func V1GetEndpointById

func V1GetEndpointById(c *middleware.Context)

func V1GetEndpoints

func V1GetEndpoints(c *middleware.Context, query m.GetEndpointsQuery)

func V1GetMonitorTypes

func V1GetMonitorTypes(c *middleware.Context)

func V1GetMonitors

func V1GetMonitors(c *middleware.Context, query m.GetMonitorsQuery)

func V1GetOrgQuotas

func V1GetOrgQuotas(c *middleware.Context)

func V1GraphiteProxy

func V1GraphiteProxy(c *middleware.Context)

func V1UpdateCollector

func V1UpdateCollector(c *middleware.Context, probe m.ProbeDTO)

func V1UpdateEndpoint

func V1UpdateEndpoint(c *middleware.Context, cmd m.UpdateEndpointCommand)

func V1UpdateMonitor

func V1UpdateMonitor(c *middleware.Context, cmd m.UpdateMonitorCommand)

Types

type CollectorContext

type CollectorContext struct {
	*auth.SignedInUser
	Probe   *m.ProbeDTO
	Socket  socketio.Socket
	Session *m.ProbeSession

	LastRefresh time.Time
	// contains filtered or unexported fields
}

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

type ContextCache

type ContextCache struct {
	sync.RWMutex
	Contexts map[string]*CollectorContext
	// contains filtered or unexported fields
}

func NewContextCache

func NewContextCache() *ContextCache

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) RefreshQueue

func (c *ContextCache) RefreshQueue()

func (*ContextCache) Remove

func (s *ContextCache) Remove(id string)

func (*ContextCache) Set

func (s *ContextCache) Set(id string, context *CollectorContext)

func (*ContextCache) Shutdown

func (c *ContextCache) Shutdown()

type ReadyPayload

type ReadyPayload struct {
	Collector    *m.ProbeDTO        `json:"collector"`
	MonitorTypes []m.MonitorTypeDTO `json:"monitor_types"`
	SocketId     string             `json:"socket_id"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL