server

package
v0.0.0-...-2ab7f6d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnforceHTTPS      bool
	Credentials       string
	HeartbeatDuration time.Duration
	StorageBaseURL    func(*http.Request) string
}

Config holds all the server options

type Server

type Server struct {
	*manners.GracefulServer
	*Config
}

Server is a launchable api listener

func NewServer

func NewServer(config *Config) *Server

NewServer creates a new server instance

func (*Server) Start

func (s *Server) Start(port string, shutdown <-chan struct{})

Start starts the server instance

Jump to

Keyboard shortcuts

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