server

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package server wires HTTP server, GraphQL transports, routes, and middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(handler http.Handler) http.Handler

Middleware represents an HTTP middleware function.

type Server

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

Server aggregates the GraphQL resolvers, router, middlewares and ws init logic.

func NewServer

func NewServer(resolvers generated.ResolverRoot, middlewares []graphql.HandlerExtension, wsInitFunc transport.WebsocketInitFunc) *Server

NewServer creates the HTTP server wiring resolvers, middlewares, and websocket init.

func (*Server) InitV2Api

func (s *Server) InitV2Api()

InitV2Api configures GraphQL transports, cache, middlewares, and routes.

func (*Server) Run

func (s *Server) Run() error

Run starts the HTTP server.

Jump to

Keyboard shortcuts

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