router

package
v0.0.0-...-0ddd045 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package router provides the top-level router

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
}

Router is the top-level router instance wrapping it's dependencies TODO <2020/12/09>: Think about a better way to pass in the broadcatser hub

func New

func New(c *config.Config, l *log.Logger) *Router

New creates a new router instance and returns it

func (*Router) AddRoutes

func (r *Router) AddRoutes(handle *handlers.Handler)

AddRoutes adds all routes to the router instance and registers the handlers

func (*Router) Run

func (r *Router) Run()

Run starts the HTTP Server or returns an error

func (*Router) Stop

func (r *Router) Stop(ctx context.Context) error

Stop gracefully stops the router

Directories

Path Synopsis
Package handlers provides HTTP handlers
Package handlers provides HTTP handlers

Jump to

Keyboard shortcuts

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