api

package
v0.17.15 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package api provides the HTTP server for the stackit-web application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the stackit-web HTTP server.

func NewServer

func NewServer(cfg ServerConfig, eng engine.Engine, gh github.Client) *Server

NewServer creates a new API server.

func (*Server) Broadcaster

func (s *Server) Broadcaster() *handlers.EventBroadcaster

Broadcaster returns the event broadcaster for triggering SSE updates.

func (*Server) Shutdown

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

Shutdown gracefully stops the server.

func (*Server) Start

func (s *Server) Start() error

Start begins serving HTTP requests. It blocks until the server is stopped.

type ServerConfig

type ServerConfig struct {
	Port        int
	CORSOrigins []string
	RepoRoot    string
	Remote      string
	APIPrefixes []string
	StaticFS    fs.FS
}

ServerConfig holds configuration for the API server.

Directories

Path Synopsis
Package watcher provides file system monitoring for git ref changes.
Package watcher provides file system monitoring for git ref changes.

Jump to

Keyboard shortcuts

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