porthttp

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 28 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 ...APIHandlerOption,
) http.Handler

func NewMetaHandler

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

Types

type APIHandlerOption added in v1.10.4

type APIHandlerOption func(cfg *apiHandlerConfig)

func WithAPITimeout

func WithAPITimeout(timeout time.Duration) APIHandlerOption

func WithOpenAPIConfig

func WithOpenAPIConfig(oapiCfg OpenAPIConfig) APIHandlerOption

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