router

package
v0.0.0-...-b61aaf9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DrainTimeout = errors.New("router: Drain timeout")

Functions

This section is empty.

Types

type RegistryMessage

type RegistryMessage struct {
	Host                    string            `json:"host"`
	Port                    uint16            `json:"port"`
	Uris                    []route.Uri       `json:"uris"`
	Tags                    map[string]string `json:"tags"`
	App                     string            `json:"app"`
	StaleThresholdInSeconds int               `json:"stale_threshold_in_seconds"`
	RouteServiceUrl         string            `json:"route_service_url"`
	PrivateInstanceId       string            `json:"private_instance_id"`
}

func (*RegistryMessage) ValidateMessage

func (rm *RegistryMessage) ValidateMessage() bool

type Router

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

func NewRouter

func NewRouter(logger lager.Logger, cfg *config.Config, p proxy.Proxy, mbusClient yagnats.NATSConn, r *registry.RouteRegistry,
	v varz.Varz, logCounter *vcap.LogCounter, errChan chan error) (*Router, error)

func (*Router) Drain

func (r *Router) Drain(drainWait, drainTimeout time.Duration) error

func (*Router) DrainAndStop

func (r *Router) DrainAndStop()

func (*Router) HandleConnState

func (r *Router) HandleConnState(conn net.Conn, state http.ConnState)

func (*Router) HandleGreetings

func (r *Router) HandleGreetings()

func (*Router) OnErrOrSignal

func (r *Router) OnErrOrSignal(signals <-chan os.Signal, errChan chan error)

func (*Router) RegisterComponent

func (r *Router) RegisterComponent()

func (*Router) Run

func (r *Router) Run(signals <-chan os.Signal, ready chan<- struct{}) error

func (*Router) ScheduleFlushApps

func (r *Router) ScheduleFlushApps()

func (*Router) SendStartMessage

func (r *Router) SendStartMessage()

func (*Router) Stop

func (r *Router) Stop()

func (*Router) SubscribeRegister

func (r *Router) SubscribeRegister()

func (*Router) SubscribeUnregister

func (r *Router) SubscribeUnregister()

Jump to

Keyboard shortcuts

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