Documentation ¶
Index ¶
Constants ¶
View Source
const CtxSecretTokenKey = "secret_token"
View Source
const (
SignatureHeader = "X-VS-Signature"
)
Variables ¶
View Source
var ( EventStartCount = stats.Int64( "webhooks/event/start/total", "Number of events started", stats.UnitDimensionless, ) EventStartCountView = &view.View{ Name: "webhooks/event/start/total", Description: "Number of events started", TagKeys: []tag.Key{eventSource, eventType}, Measure: EventStartCount, Aggregation: view.Count(), } // Counts all end events // Timings may not be available due to what some EventSources expose through // their APIs, and/or start event may not be present in the span store. // Because of this keep track of all event end requests. EventEndCount = stats.Int64( "webhooks/event/end/total", "Number of events ended", stats.UnitDimensionless, ) EventEndCountView = &view.View{ Name: "webhooks/event/end/total", Description: "Number of events started", TagKeys: []tag.Key{eventSource, eventType, eventErr}, Measure: EventEndCount, Aggregation: view.Count(), } EventLatencyMs = stats.Float64( "webhooks/event/duration", "The latency in milliseconds", "ms", ) EventLatencyView = &view.View{ Name: "webhooks/event/duration", Description: "Duration of events", TagKeys: []tag.Key{eventSource, eventType, eventErr}, Measure: EventLatencyMs, Aggregation: view.Distribution( 0, 1.8e+6, 3.6e+6, 1.08e+7, 2.16e+7, 4.32e+7, 8.64e+7, 2.592e+8, 6.048e+8, 1.21e+9, 1.814e+9, 2.628e+9, ), } )
Functions ¶
This section is empty.
Types ¶
type Tracers ¶
type Tracers interface {
RequestScoped(r *http.Request, es eventsources.EventSource) (opentracing.Tracer, io.Closer, error)
}
type Webhook ¶
type Webhook struct { EventSource eventsources.EventSource Tracers Tracers Spans traces.SpanStore }
func New ¶
func New( es eventsources.EventSource, tracers Tracers, spans traces.SpanStore, ) (*Webhook, error)
Click to show internal directories.
Click to hide internal directories.