muxy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Request        *http.Request
	Response       *http.Response
	ResponseWriter http.ResponseWriter
	Bytes          []byte
}

type Middleware

type Middleware interface {
	Setup()
	HandleEvent(event ProxyEvent, ctx *Context)
	Teardown()
}

type Muxy

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

func New

func New(config *MuxyConfig) *Muxy

func NewWithDefaultMuxyConfig

func NewWithDefaultMuxyConfig() *Muxy

func (*Muxy) LoadPlugins

func (m *Muxy) LoadPlugins()

func (*Muxy) Run

func (m *Muxy) Run()

type MuxyConfig

type MuxyConfig struct {
	RawConfig  *plugo.RawConfig
	ConfigFile string // Path to YAML Configuration File
}

type PluginConfig

type PluginConfig struct {
	Name        string
	Description string
	LogLevel    int `default:"2" required:"true" mapstructure:"loglevel"`
	Proxy       []plugo.PluginConfig
	Middleware  []plugo.PluginConfig
}

type Proxy

type Proxy interface {
	Setup([]Middleware)
	Proxy()
	Teardown()
}

type ProxyEvent

type ProxyEvent int
const (
	EVENT_PRE_DISPATCH ProxyEvent = iota
	EVENT_POST_DISPATCH
)

Jump to

Keyboard shortcuts

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