app

package
v0.0.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName = "fetch-api"

AppName is the name of the application.

Functions

func CreateGRPCServer

func CreateGRPCServer(logger *zerolog.Logger, settings *config.Settings) (*grpc.Server, error)

CreateGRPCServer creates a new gRPC server with the given logger and settings.

func LoggerMiddleware added in v0.0.17

func LoggerMiddleware(next http.Handler) http.Handler

LoggerMiddleware adds method, path, and source IP to the request context logger.

func PanicRecoveryMiddleware added in v0.0.17

func PanicRecoveryMiddleware(next http.Handler) http.Handler

PanicRecoveryMiddleware recovers from panics and logs them.

Types

type App added in v0.0.17

type App struct {
	Handler http.Handler
	// contains filtered or unexported fields
}

App is the main application (GraphQL over net/http). gRPC is created separately via CreateGRPCServer.

func New added in v0.0.17

func New(settings config.Settings) (*App, error)

New creates a new application with GraphQL handler and middleware.

func (*App) Cleanup added in v0.0.17

func (a *App) Cleanup()

Cleanup runs any cleanup logic (e.g. closing connections).

Jump to

Keyboard shortcuts

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