Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter struct { WebhooksClient *executorsclientv1.WebhooksClient Events chan testkube.WebhookEvent Responses chan WebhookResult Log *zap.SugaredLogger }
Emitter handles events emitting for webhooks
func NewEmitter ¶
func NewEmitter(webhooksClient *executorsclientv1.WebhooksClient) *Emitter
NewEmitter returns new emitter instance
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
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.