router

package
v0.0.0-...-37ca617 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDefault = Config{
	ForceSet:        nil,
	AppName:         "demo",
	Port:            "5000",
	CtxTimeout:      time.Second * 3,
	Concurrency:     fiber.DefaultConcurrency,
	ReleaseMode:     false,
	RWTimeout:       time.Second * 2,
	RequestLogger:   os.Stdout,
	ResponseLogger:  os.Stdout,
	UseLiveness:     conv.ToPtr(true),
	UseReadiness:    conv.ToPtr(false),
	UseCors:         conv.ToPtr(false),
	UseCacheControl: conv.ToPtr(false),
	UseAuth:         conv.ToPtr(true),
}

Functions

This section is empty.

Types

type Config

type Config struct {
	ForceSet *fiber.Config

	AppName        string
	Port           string
	CtxTimeout     time.Duration
	Concurrency    int
	ReleaseMode    bool
	RequestLogger  io.Writer
	ResponseLogger io.Writer
	RWTimeout      time.Duration

	// middlewares
	UseLiveness     *bool
	UseReadiness    *bool
	UseCors         *bool
	UseCacheControl *bool
	UseAuth         *bool

	RouteChart []routechart.Chart
}

type Router

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

func New

func New(config ...Config) (*Router, error)

func (*Router) Start

func (r *Router) Start() error

func (*Router) Stop

func (r *Router) Stop() error

Jump to

Keyboard shortcuts

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