Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter struct { Events chan testkube.WebhookEvent Responses chan WebhookResult Log *zap.SugaredLogger }
Emitter handles events emitting for webhooks
func (*Emitter) Listen ¶
func (s *Emitter) Listen(events chan testkube.WebhookEvent)
Listen listens for webhook events
func (*Emitter) Notify ¶
func (s *Emitter) Notify(event testkube.WebhookEvent)
Notify notifies emitter with webhook
func (*Emitter) RunWorkers ¶
func (s *Emitter) RunWorkers()
RunWorkers runs emitter workers responsible for sending HTTP requests
func (*Emitter) Send ¶
func (s *Emitter) Send(event testkube.WebhookEvent)
Send sends new webhook event - should be used when some event occurs
type WebhookHttpResponse ¶
WebhookHttpResponse hold body and result of webhook response
type WebhookResult ¶
type WebhookResult struct { Event testkube.WebhookEvent Error error Response WebhookHttpResponse }
WebhookResult is a wrapper for results from HTTP client for given webhook
Click to show internal directories.
Click to hide internal directories.