server

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*server)

func WithCert

func WithCert(cert certutil.CertBundle) Option

func WithEndpoint

func WithEndpoint(host string, port uint, prefix string) Option

func WithLogger

func WithLogger(logger log.Logger) Option

func WithThrottle

func WithThrottle(rps float64, burstSize int) Option

type Server

type Server interface {
	common.Service
	common.Initializable
	common.Daemon
	Endpoint() *api.Endpoint
	RegisterRouters(routers ...api.Router) error
	RegisterMiddlewares(middlewares ...api.Middleware)
}

func New

func New(opts ...Option) Server

New creates a new server instance with the given options

Jump to

Keyboard shortcuts

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