router

package
v0.0.0-...-fa30892 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware(handler http.Handler, config artifacts.CORSConfig) http.Handler

CORSMiddleware applies CORS headers based on the provided configuration using rs/cors package

Types

type RouterService

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

RouterService manages API routing and server lifecycle

func NewRouterService

func NewRouterService(port string, hostname string) *RouterService

NewRouterService creates a new router service with the given port and hostname

func (*RouterService) RegisterAPI

func (rs *RouterService) RegisterAPI(ctx context.Context, api artifacts.API) error

RegisterAPI registers a new API with the router service

func (*RouterService) StartServer

func (rs *RouterService) StartServer(ctx context.Context)

startServer starts the HTTP server

func (*RouterService) StopServer

func (rs *RouterService) StopServer()

func (*RouterService) UpdateLogger

func (rs *RouterService) UpdateLogger()

Jump to

Keyboard shortcuts

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