dev

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: BSD-3-Clause Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Booting = iota
	Running
	Dead
)
View Source
const DefaultThreads = 5
View Source
const SupportDir = "~/.puma-dev-ssl"

Variables

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

Functions

func ConfigureResolver

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

func GeneratePumaDevCertificateAuthority

func GeneratePumaDevCertificateAuthority(certPath string, keyPath string) error

func NewCertCache

func NewCertCache() *certCache

func SetupOurCert

func SetupOurCert() error

func Stop

func Stop() error

func TrustCert

func TrustCert(cert string) error

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) FindAppByDomainName

func (a *AppPool) FindAppByDomainName(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
	Domains []string
	// contains filtered or unexported fields
}

func NewDNSResponder

func NewDNSResponder(address string, domains []string) *DNSResponder

func (*DNSResponder) Serve

func (d *DNSResponder) Serve() 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
	IgnoredStaticPaths []string
	Domains            []string
	// 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