server

package
v0.0.0-...-e8a7617 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package server holds the main Server that serves HTTP requests to clients, as well as the code that constructs the routes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Emailer *comms.Emailer
	Storer  *storage.Storer
	Logger  *log.Logger
	Host    string
	Port    int
	Cert    string
	Key     string
}

Options for New.

type Server

type Server struct {
	Emailer *comms.Emailer
	Storer  *storage.Storer
	// contains filtered or unexported fields
}

Server takes requests and responds. 😎

func New

func New(options Options) *Server

New creates a new Server.

func (*Server) Start

func (s *Server) Start() error

Start the server, set up listening for HTTP, and notify systemd of readiness.

Jump to

Keyboard shortcuts

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