eventhandler

package
v1.0.0-beta.225 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserSendAttemptsExhausted       = errors.New("user error: multiple failed to send event due to errors from the recipient. retry will NOT be attempted")
	ErrSystemDispatchAttemptsExhausted = errors.New("system error: multiple dispatch attempts failed. retry will NOT be attempted")
	ErrSystemRecoverableError          = errors.New("system error: unexpected error happened during sending event. retry will be attempted")
	ErrSystemUnrecoverableError        = errors.New("system error: unrecoverable error happened during sending event. retry will NOT be attempted")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Repository        notification.Repository
	Webhook           webhook.Handler
	Logger            *slog.Logger
	Tracer            trace.Tracer
	ReconcileInterval time.Duration
	SendingTimeout    time.Duration
	PendingTimeout    time.Duration
}

func (*Config) Validate

func (c *Config) Validate() error

type Handler

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

func New

func New(config Config) (*Handler, error)

func (*Handler) Close

func (h *Handler) Close() error

func (*Handler) Dispatch

func (h *Handler) Dispatch(ctx context.Context, event *notification.Event) error

func (*Handler) Reconcile

func (h *Handler) Reconcile(ctx context.Context) error

func (*Handler) Start

func (h *Handler) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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