server

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Trace

Trace is a middleware for tracing using opentelemetry

Types

type Runner

type Runner interface {
	// Run and pass mandatory middlewares when running each server
	Run(middlewares ...router.MiddlewareFunc) error
	Shutdown(ctx context.Context) error
}

Runner server interface

type Server

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

Server configuration

func New

func New(adminServerAddress string, runners ...Runner) (*Server, error)

New server

func (*Server) Metrics

func (s *Server) Metrics(next router.HandlerFunc) router.HandlerFunc

Metrics is a middleware for metrics monitoring

func (*Server) Run

func (s *Server) Run() chan error

Run the server

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown the server TODO: check whether one of the runners return error when shutting down

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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