patron

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

README

patron Build Status codecov Go Report Card GoDoc

Documentation

Overview

Package patron framework

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Ctx    context.Context
	Cancel context.CancelFunc
	// contains filtered or unexported fields
}

Server definition of a server hosting service

func New

func New(name string, services ...Service) (*Server, error)

New creates a new server

func (*Server) Run

func (s *Server) Run() error

Run starts up the server, listens and serves requests

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown performs a shutdown on all services with the setup timeout

type Service

type Service interface {
	Run(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

Service interface for implementing services

Directories

Path Synopsis
env
log
sync

Jump to

Keyboard shortcuts

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