zap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config   *HostConfig
	LastUsed time.Time
	// contains filtered or unexported fields
}

App holds the state of a running Application

func NewApp

func NewApp(config *HostConfig) (*App, error)

NewApp creates a new App for the given host

func (*App) ServeHTTP

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*App) Start

func (a *App) Start() error

Start starts an application and monitors activity

func (*App) Stop

func (a *App) Stop(reason string, e error) error

Stop stops an application

func (*App) WriteLog

func (a *App) WriteLog(w io.Writer)

WriteLog writes out the application log to the given writer

type HostConfig

type HostConfig struct {
	Host    string
	Path    string
	Dir     string
	Content string
	Key     string
}

HostConfig holds the configuration for a given host host

type Server

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

Server holds the state for the HTTP and HTTPS servers

func NewServer

func NewServer() *Server

NewServer starts the HTTP and HTTPS proxy servers

func (*Server) Serve

func (s *Server) Serve(bind string)

Serve starts the HTTP server

func (*Server) ServeTLS

func (s *Server) ServeTLS(bind string)

ServeTLS starts the HTTPS server

Jump to

Keyboard shortcuts

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