http

package
v0.0.0-...-d4c9315 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 19 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) *Router

func (*Router) Register

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

Register

@title Telemetry @version 1.0 @description telemetry example project

@contact.name DeepCore Team @contact.email @FINOPS @DEEPCORE

@host @BasePath /api/v1

func (*Router) Start

func (r *Router) Start() error

func (*Router) Stop

func (r *Router) Stop() error

type RouterSettings

type RouterSettings struct {
	// Host like 0.0.0.0:8080
	Host 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