server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package server provides HTTP server setup and graceful shutdown for the router.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, cfg Config, graphqlHandler, healthHandler http.Handler) error

Serve starts the GraphQL and health servers and blocks until ctx is cancelled, then shuts both down gracefully within ShutdownTimeout.

Types

type Config

type Config struct {
	GraphQLAddr     string
	GraphQLPath     string
	HealthAddr      string
	HealthPath      string
	ShutdownTimeout time.Duration
}

Config holds addresses and timing for the GraphQL and health check servers.

Jump to

Keyboard shortcuts

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