server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = "4000"

Variables

This section is empty.

Functions

func RunServer

func RunServer(ctx context.Context, deps Deps)

RunServer starts an HTTP server with graceful shutdown support. The server will shut down gracefully when the context is cancelled (e.g., on SIGINT/SIGTERM).

func SetupRouter

func SetupRouter(deps Deps) *http.ServeMux

SetupRouter initializes the router and registers all endpoints

Types

type Deps added in v0.5.0

type Deps struct {
	Federator QueryFederator
	// Authenticate rejects requests without a valid consumer token and otherwise
	// adds the consumer's identity to the request context (internal/authn's
	// RequireAuthMiddleware). Required.
	Authenticate func(http.Handler) http.Handler
}

Deps are what the HTTP server serves. cmd/oe/main.go builds them.

type QueryFederator added in v0.5.0

type QueryFederator interface {
	FederateQuery(ctx context.Context, request graphql.Request, consumerInfo *auth.ConsumerAssertion) graphql.Response
}

QueryFederator federates consumer GraphQL queries across providers.

type Response

type Response struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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