hooks

package
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package hooks implements the Hook dispatcher. It subscribes to the Event Bus and delivers events to registered external hooks via HTTP webhook or Kafka — asynchronously and with retry logic.

Index

Constants

This section is empty.

Variables

View Source
var ErrHookTestUnsupported = errors.New("hooks: test delivery not supported for this hook type")

ErrHookTestUnsupported is returned when the hook type cannot receive a synthetic test delivery.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service subscribes to the event bus and dispatches events to registered hooks.

func New

func New(i do.Injector) (*Service, error)

New creates a Service and registers it with the DI injector.

func (*Service) DeliverTestEvent

func (s *Service) DeliverTestEvent(ctx context.Context, id domain.HookID) error

DeliverTestEvent sends a single synthetic event to the hook using the same path as live delivery.

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start subscribes to all domain events and begins dispatching. It blocks until ctx is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL