router

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecretHeaderName = "X-App-Secret"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulHandler

type ConsulHandler interface {
	Service(consulAddr, serviceName string) (srv *api.CatalogService, err error)
}

func NewConsulHandler

func NewConsulHandler() ConsulHandler

type DummyConsulHandler

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

func (*DummyConsulHandler) Service

func (d *DummyConsulHandler) Service(consulAddr, serviceName string) (*api.CatalogService, error)

type DummyTrader

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

func (*DummyTrader) TradeName added in v0.0.2

func (t *DummyTrader) TradeName(name string) (profile *Profile, err error)

func (*DummyTrader) TradeSecret added in v0.0.2

func (t *DummyTrader) TradeSecret(secret string) (profile *Profile, err error)

func (*DummyTrader) Url

func (t *DummyTrader) Url() string

type KafkaPixy added in v0.1.1

type KafkaPixy interface {
	GrpcConn() *grpc.ClientConn
	KafkaPixyClient() pb.KafkaPixyClient
	Consume() (message []byte, err error)
}

func NewKafkaPixy added in v0.1.1

func NewKafkaPixy(addr string, topic string, group string) KafkaPixy

type Profile

type Profile struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Consul string `json:"consul"`
}

func NewProfileFromBytes

func NewProfileFromBytes(b []byte) (*Profile, error)

type Proxy added in v0.0.2

type Proxy interface {
	ReverseProxy() *reverseproxy.ReverseProxy
	ReverseProxyHandler() *ReverseProxyHandler
}

func NewProxy added in v0.0.2

func NewProxy(source string, target string) Proxy

type ReverseProxyHandler added in v0.0.2

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

func (ReverseProxyHandler) Director added in v0.0.2

func (h ReverseProxyHandler) Director(req *http.Request)

func (ReverseProxyHandler) ModifyResponse added in v0.0.2

func (h ReverseProxyHandler) ModifyResponse(res *http.Response) error

type Router

type Router interface {
	Server() *http.Server
	Address() string
	Trader() Trader
	ProduceHandler(w http.ResponseWriter, req *http.Request)
	KibanaHandler(w http.ResponseWriter, req *http.Request)
	XtailHandler(w http.ResponseWriter, req *http.Request)
}

Router

func NewKibanaRouter added in v0.0.2

func NewKibanaRouter(addr string, trader Trader, consul ConsulHandler) Router

NewKibanaRouter

func NewProduceRouter added in v0.0.2

func NewProduceRouter(addr string, trader Trader, consul ConsulHandler) Router

NewProduceRouter

func NewXtailRouter added in v0.1.1

func NewXtailRouter(addr string, trader Trader, consul ConsulHandler) Router

NewXtailRouter

type Trader

type Trader interface {
	TradeSecret(secret string) (profile *Profile, err error)
	TradeName(name string) (profile *Profile, err error)
	Url() string
}

func NewTrader

func NewTrader(url string) Trader

NewHttpTrader

Jump to

Keyboard shortcuts

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