MCPcopy
hub / github.com/PatchMon/PatchMon / EmitEvent

Method EmitEvent

server-source-code/internal/notifications/emitter.go:79–84  ·  view source on GitHub ↗

EmitEvent dispatches a non-alert domain event (patch, compliance, host_recovered, etc.).

(ctx context.Context, d *database.DB, tenantHost string, ev Event)

Source from the content-addressed store, hash-verified

77
78// EmitEvent dispatches a non-alert domain event (patch, compliance, host_recovered, etc.).
79func (e *Emitter) EmitEvent(ctx context.Context, d *database.DB, tenantHost string, ev Event) {
80 if e == nil || e.qc == nil || d == nil {
81 return
82 }
83 e.emit(ctx, d, tenantHost, ev)
84}
85
86func (e *Emitter) emit(ctx context.Context, d *database.DB, tenantHost string, ev Event) {
87 routes, err := d.Queries.ListNotificationRoutesForEvent(ctx, ev.Type)

Callers 15

ProcessAgentUpdateFunction · 0.80
ProcessServerUpdateFunction · 0.80
ProcessHostStatusMonitorFunction · 0.80
OnDisconnectFunction · 0.80
OnConnectFunction · 0.80
CreateMethod · 0.80
UpdateMethod · 0.80
ServeCreateMethod · 0.80
LoginMethod · 0.80
completeLoginMethod · 0.80
CompleteOidcLoginMethod · 0.80

Calls 1

emitMethod · 0.95

Tested by

no test coverage detected