httpproxy

package
v0.0.0-...-783a48b Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHttpProxyModule

func RegisterHttpProxyModule(name string, h HttpProxyCreateFunc)

func UnregisterHttpProxyModule

func UnregisterHttpProxyModule(name string)

Types

type CacheData

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

type HttpProxyCreateFunc

type HttpProxyCreateFunc func(p ILocalProxy) HttpProxyModule

type HttpProxyModule

type HttpProxyModule interface {
	ProxyHandler(addr string, w http.ResponseWriter, r *http.Request)
	Stop()
	GetProxyName() string
}

func CreateNsqLookupHttpProxy

func CreateNsqLookupHttpProxy(p ILocalProxy) HttpProxyModule

type ILocalProxy

type ILocalProxy interface {
	GetProxy(pid, protocol, remote, initData string) (string, error)
}

type LocalHttpProxy

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

func NewLocalHttpProxy

func NewLocalHttpProxy(addr string, module string, moduleConf string, grace *gracenet.Net, p ILocalProxy) *LocalHttpProxy

func (*LocalHttpProxy) ServeHTTP

func (self *LocalHttpProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*LocalHttpProxy) Start

func (self *LocalHttpProxy) Start()

func (*LocalHttpProxy) Stop

func (self *LocalHttpProxy) Stop()

type NsqLookupHttpProxy

type NsqLookupHttpProxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*NsqLookupHttpProxy) GetProxyName

func (self *NsqLookupHttpProxy) GetProxyName() string

func (*NsqLookupHttpProxy) HandleLookup

func (self *NsqLookupHttpProxy) HandleLookup(proxyaddr string, disableCache, disableConvert bool, w http.ResponseWriter, r *http.Request)

func (*NsqLookupHttpProxy) HandleNodes

func (self *NsqLookupHttpProxy) HandleNodes(proxyaddr string, disableCache, disableConvert bool, w http.ResponseWriter, r *http.Request)

func (*NsqLookupHttpProxy) ProxyHandler

func (self *NsqLookupHttpProxy) ProxyHandler(proxyaddr string, w http.ResponseWriter, r *http.Request)

func (*NsqLookupHttpProxy) Stop

func (self *NsqLookupHttpProxy) Stop()

type Producer

type Producer struct {
	RemoteAddress    string `json:"remote_address"`
	Hostname         string `json:"hostname"`
	BroadcastAddress string `json:"broadcast_address"`
	TCPPort          int    `json:"tcp_port"`
	HTTPPort         int    `json:"http_port"`
	Version          string `json:"version"`
}

Jump to

Keyboard shortcuts

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