server

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Name      string              `json:"name"`
	Lock      bool                `json:"lock"`
	Token     []string            `json:"token,omitempty"`
	Generator generator.Generator `json:"generator,omitempty"`
}

API represents an API access point

type Instance

type Instance struct {
	Router *mux.Router
	API    []API
}

Instance is a structure that stores the router

func (*Instance) SetupAPI

func (i *Instance) SetupAPI(name string, lock bool, template string, separator rune) bool

SetupAPI sets up an API

func (*Instance) SetupRouter

func (i *Instance) SetupRouter()

SetupRouter uses mux to setup up routing paths for endpoints /health for health endpoints (liveness probe intended) /ready for readiness probes /reload for dynamic configuration reloads

func (*Instance) Start

func (i *Instance) Start(port int)

Start loads router configuration and starts the http listening

Jump to

Keyboard shortcuts

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