eiffel

package module
v0.0.0-...-5201481 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MPL-2.0 Imports: 8 Imported by: 0

README

Eiffel

gateway to the fair

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Eiffel

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

Eiffel is a service Gateway for Hackform

func New

func New() *Eiffel

New creates a new Eiffel

func (*Eiffel) InitRoute

func (e *Eiffel) InitRoute(prefix string, routeConfig RouteConfig, m ...func(http.Handler) http.Handler)

InitRoute initializes Eiffel with the provided routes and middleware

func (*Eiffel) InitService

func (e *Eiffel) InitService(s ServiceConfig, order []string)

InitService initializes Eiffel with the provided services

func (*Eiffel) Shutdown

func (e *Eiffel) Shutdown()

Shutdown kills the server and kills any other running resources

func (*Eiffel) Start

func (e *Eiffel) Start(url string, shutdownDelay uint)

Start starts all the services and the server

type Route

type Route interface {
	Register(g chi.Router)
}

Route is an injectable interface for routes

type RouteConfig

type RouteConfig map[string]Route

RouteConfig is a map to simplify route initialization

type Service

type Service interface {
	Start() error
	Shutdown()
}

Service is an injectable interface for services

type ServiceConfig

type ServiceConfig map[string]Service

ServiceConfig is a map to simplify service initialization

Directories

Path Synopsis
model
route
service

Jump to

Keyboard shortcuts

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