Documentation
¶
Index ¶
Constants ¶
View Source
const SignatureHeader = "X-Certmatic-Signature"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoryDispatcher ¶
type MemoryDispatcher struct {
// contains filtered or unexported fields
}
MemoryDispatcher is an in-memory webhook event dispatcher. Events are queued in a buffered channel and delivered by a background goroutine.
func NewMemoryDispatcher ¶
func NewMemoryDispatcher(endpoints []webhook.Endpoint, logger *zap.Logger) *MemoryDispatcher
NewMemoryDispatcher creates a dispatcher that delivers events to the given endpoints. A background goroutine processes the queue until Destruct is called.
func (*MemoryDispatcher) Destruct ¶
func (d *MemoryDispatcher) Destruct() error
Destruct stops the background delivery goroutine.
func (*MemoryDispatcher) Dispatch ¶
func (d *MemoryDispatcher) Dispatch(event webhook.Event)
Dispatch enqueues an event for asynchronous delivery. If the queue is full the event is dropped and a warning is logged.
Click to show internal directories.
Click to hide internal directories.