api

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package api will implement the looperd HTTP surface and adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Config               config.Config
	Runtime              RuntimeState
	ProjectsService      projectService
	Now                  func() time.Time
	RecoverySummary      func() any
	StopLoop             func(context.Context, string, string) (any, error)
	StopAll              func(context.Context, string) (any, error)
	TriggerSchedulerTick func()
}

type Handler

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

func NewHandler

func NewHandler(context Context) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RuntimeState

type RuntimeState interface {
	Services() looperdruntime.Services
	StartedAt() (time.Time, bool)
}

type Server

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

func NewServer

func NewServer(cfg config.Config, handler http.Handler) *Server

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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