server

package
v0.0.0-...-2b84898 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

func NewRouter

func NewRouter(rs RouterSettings, handler *handler.Handler) *Router

func (*Router) Register

func (r *Router) Register(basePath string, middlewares []echo.MiddlewareFunc, h *handler.Handler)

Register

@title Telemetry @version 1.0 @description telemetry example project

@contact.name @FINOPS @contact.email @FINOPS

@host @BasePath /api/v1

func (*Router) Start

func (r *Router) Start() error

func (*Router) Stop

func (r *Router) Stop() error

func (*Router) StopWithContext

func (r *Router) StopWithContext(ctx context.Context, wg *sync.WaitGroup)

type RouterSettings

type RouterSettings struct {
	// Addr like 0.0.0.0:8080
	Addr string
	// BasePath for serving
	BasePath string
	// ShutdownTimeout using in shutdown server default is 5 second.
	ShutdownTimeout time.Duration
}

func (RouterSettings) SetDefaults

func (rs RouterSettings) SetDefaults() RouterSettings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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