server

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 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 Manager added in v0.1.8

type Manager interface {
	common.Service
	common.Initializable
	common.Daemon
	AddServer(name string, opts ...ServerOption)
	RegisterRouters(routers ...api.Router) error
	RegisterMiddlewares(middlewares ...api.Middleware)
	Routers() (map[string]*api.HandlerGroup, map[string]*api.Handler)
}

func New

func New(opts ...Option) Manager

New creates a new server instance with the given options

type Option

type Option func(*manager)

func WithLogger

func WithLogger(logger log.Logger) Option

type ServerOption added in v0.1.8

type ServerOption func(*server)

ServerOption configures a server (echo server instance)

func WithEndpoint

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

func WithTLS added in v0.1.8

func WithTLS(cert certutil.CertBundle) ServerOption

func WithThrottle

func WithThrottle(rps float64, burstSize int) ServerOption

Jump to

Keyboard shortcuts

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