server

package
v0.0.0-...-f0d5876 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultShutdownTimeout = 15 * time.Second
)

Functions

func RegisterConfigurator

func RegisterConfigurator(path string, fn Configurator)

Types

type Configurator

type Configurator func(g lars.IRouteGroup)

type Configurators

type Configurators map[string]Configurator

func (Configurators) Configure

func (c Configurators) Configure(g lars.IRouteGroup)

type Context

type Context struct {
	*lars.Ctx
	*Globals
}

func (*Context) HandlePanic

func (c *Context) HandlePanic(p *cpanic.Panic)

func (*Context) Log

func (c *Context) Log() middleware.Logger

type Globals

type Globals struct {
	*pshgo.Environment
}

type Handler

type Handler = func(ctx *Context) error

type Server

type Server struct {
	*lars.LARS
}

func New

func New(g *Globals) *Server

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, l net.Listener) error

Jump to

Keyboard shortcuts

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