dev

package
v0.0.0-...-243699b Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: BSD-3-Clause Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Booting = iota
	Running
	Dead
)
View Source
const DefaultAddress = ":9253"
View Source
const DefaultThreads = 5

Variables

View Source
var ErrUnexpectedExit = errors.New("unexpected exit")
View Source
var ErrUnknownApp = errors.New("unknown app")

Functions

func Cleanup

func Cleanup()

func ConfigureResolver

func ConfigureResolver(domains []string, port int) error

func InstallIntoSystem

func InstallIntoSystem(listenPort, tlsPort int, dir, domains, timeout string) error

func NewCertCache

func NewCertCache() *certCache

func Setup

func Setup() error

func SetupOurCert

func SetupOurCert() error

func Stop

func Stop() error

func TrustCert

func TrustCert(cert string) error

func Uninstall

func Uninstall(domains []string)

Types

type App

type App struct {
	Name    string
	Scheme  string
	Host    string
	Port    int
	Command *exec.Cmd
	Public  bool
	Events  *Events
	// contains filtered or unexported fields
}

func (*App) Address

func (a *App) Address() string

func (*App) Kill

func (a *App) Kill(reason string) error

func (*App) Log

func (a *App) Log() string

func (*App) SetAddress

func (a *App) SetAddress(scheme, host string, port int)

func (*App) Status

func (a *App) Status() int

func (*App) WaitTilReady

func (a *App) WaitTilReady() error

type AppPool

type AppPool struct {
	Dir      string
	IdleTime time.Duration
	Debug    bool
	Events   *Events

	AppClosed func(*App)
	// contains filtered or unexported fields
}

func (*AppPool) App

func (a *AppPool) App(name string) (*App, error)

func (*AppPool) ForApps

func (a *AppPool) ForApps(f func(*App))

func (*AppPool) LaunchApp

func (pool *AppPool) LaunchApp(name, dir string) (*App, error)

func (*AppPool) Purge

func (a *AppPool) Purge()

type DNSResponder

type DNSResponder struct {
	Address string
}

func (*DNSResponder) Serve

func (d *DNSResponder) Serve(domains []string) error

type Events

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

func (*Events) Add

func (e *Events) Add(name string, args ...interface{}) string

func (*Events) WriteTo

func (e *Events) WriteTo(w io.Writer) (int64, error)

type HTTPServer

type HTTPServer struct {
	Address    string
	TLSAddress string
	Pool       *AppPool
	Debug      bool
	Events     *Events
	// contains filtered or unexported fields
}

func (*HTTPServer) AppClosed

func (h *HTTPServer) AppClosed(app *App)

func (*HTTPServer) Serve

func (h *HTTPServer) Serve() error

func (*HTTPServer) ServeHTTP

func (h *HTTPServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*HTTPServer) ServeTLS

func (h *HTTPServer) ServeTLS() error

func (*HTTPServer) Setup

func (h *HTTPServer) Setup()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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