service

package
v0.0.0-...-a0650b7 Latest Latest
Warning

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

Go to latest
Published: May 26, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sep         = config.Sep
	Wildcard    = config.Wildcard
	HTTPSPrefix = "https://"
	HTTPPrefix  = "http://"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Proxy []*Proxy
	// contains filtered or unexported fields
}

func NewApp

func NewApp(service *Service, cfg *config.AppConfig) (*App, error)

func (*App) Match

func (this *App) Match(req *http.Request) (*Proxy, bool)

func (*App) String

func (this *App) String() string

type Proxy

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

func NewProxy

func NewProxy(app *App, cfg *config.ProxyConfig) (*Proxy, error)

func (*Proxy) Match

func (this *Proxy) Match(req *http.Request) bool

func (*Proxy) ServeHTTP

func (this *Proxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*Proxy) String

func (this *Proxy) String() string

type Service

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

func NewService

func NewService() *Service

func NewServiceWithCfgFile

func NewServiceWithCfgFile(cfgFilePath string) (*Service, error)

func (*Service) Close

func (this *Service) Close()

func (*Service) Init

func (this *Service) Init(cfg config.ServerConfig) error

func (*Service) Reload

func (this *Service) Reload(cfg config.ServerConfig) error

func (*Service) ReloadConfigFile

func (this *Service) ReloadConfigFile() error

func (*Service) Run

func (this *Service) Run() error

func (*Service) ServeHTTP

func (this *Service) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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