api

package
v0.1.0-beta.69 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

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

func NewServer

func NewServer(apiToken string, db *storage.DB, logBroker logging.StreamPublisher, logLevel slog.Level) *APIServer

func (*APIServer) ListenAndServe

func (s *APIServer) ListenAndServe(addr string) error

func (*APIServer) SetProxyStatusFunc

func (s *APIServer) SetProxyStatusFunc(fn func(context.Context) (*proxywire.Status, error))

SetProxyStatusFunc wires the haloy-proxy status lookup used by the version endpoint. It is optional; when unset or failing, proxy fields are omitted.

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(r rate.Limit, b int) *RateLimiter

func (*RateLimiter) Middleware

func (rl *RateLimiter) Middleware(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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