porthttp

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIHandler

func NewAPIHandler(
	logger *slog.Logger,
	reg prometheus.Registerer,
	versionSvc *app.VersionService,
	serverSvc *app.ServerService,
	tribeSvc *app.TribeService,
	playerSvc *app.PlayerService,
	villageSvc *app.VillageService,
	ennoblementSvc *app.EnnoblementService,
	tribeChangeSvc *app.TribeChangeService,
	serverSnapshotSvc *app.ServerSnapshotService,
	tribeSnapshotSvc *app.TribeSnapshotService,
	playerSnapshotSvc *app.PlayerSnapshotService,
	opts ...APIHTTPHandlerOption,
) http.Handler

func NewMetaHandler

func NewMetaHandler(h *health.Health, reg prometheus.Gatherer) http.Handler

Types

type APIHTTPHandlerOption

type APIHTTPHandlerOption func(cfg *apiHTTPHandlerConfig)

func WithAPITimeout

func WithAPITimeout(timeout time.Duration) APIHTTPHandlerOption

func WithOpenAPIConfig

func WithOpenAPIConfig(oapiCfg OpenAPIConfig) APIHTTPHandlerOption

type OpenAPIConfig

type OpenAPIConfig struct {
	Enabled        bool
	SwaggerEnabled bool
	BasePath       string
	Servers        []OpenAPIConfigServer
}

type OpenAPIConfigServer

type OpenAPIConfigServer struct {
	URL *url.URL
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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