server

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package server provides capabilities to manage and process incoming HTTP requests. As this is the main driver for doc surfacing and interaction, special attention is paid to openly handling generated paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// Config contains the configuration data that helped start
	// this instance of the Server.
	Config *autodocs.Config

	// Engine holds the gin instance for handling HTTP.
	Engine *gin.Engine

	// Listen is the directive upon which the server will accept
	// connections and process requests.
	Listen string

	// Origins contains all CORS allowed origins.
	Origins []string
}

Server holds details around the executing HTTP server based on the provided configuration.

func New

func New(c *autodocs.Config) *Server

New is a short-hand to give a functional method for generating a new server.

func (*Server) Serve

func (s *Server) Serve()

Serve will begin to HTTP server execution.

func (*Server) Start

func (s *Server) Start()

Start will finish preparing and begin serving HTTP.

Jump to

Keyboard shortcuts

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