service

package
v0.0.0-...-5234b9d Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tracer *go2sky.Tracer

Tracer Golbal Variable

Functions

func GetQuotes

func GetQuotes(w http.ResponseWriter, r *http.Request)

GetQuotes sleeps 3 seconds and return a fixed quote object.

func NewRouter

func NewRouter() *mux.Router

NewRouter returns a pointer to a mux.Router we can use as a handler.

func StartWebServer

func StartWebServer()

StartWebServer starts the default http web server on the given port

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Route defines a single route, e.g. a human readable name, HTTP method and the pattern the function that will execute when the route is called.

type Routes

type Routes []Route

Routes defines the type Routes which is just an array (slice) of Route struts.

Jump to

Keyboard shortcuts

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