alertapi

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package alertapi provides the HTTP API handlers for Vigil's alerting system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API holds dependencies for HTTP handlers.

func New

func New(logger log.Logger, svc TriageService) *API

New creates a new API handler.

func (*API) RegisterRoutes

func (a *API) RegisterRoutes(r chi.Router)

RegisterRoutes attaches API endpoints to the router.

type TriageService

type TriageService interface {
	Submit(ctx context.Context, al *alert.Alert) (*triage.SubmitResult, error)
	Get(ctx context.Context, id string) (*triage.Result, bool, error)
}

TriageService defines the business operations alertapi needs.

Jump to

Keyboard shortcuts

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