Documentation ¶
Index ¶
- func HandleRuntimeStats() http.Handler
- func ServeRuntimeStats(pattern string)
- type Director
- type Endpoint
- func (endpoint *Endpoint) Active() bool
- func (endpoint *Endpoint) CheckConnection() error
- func (endpoint *Endpoint) ConfigureUrl(u *url.URL)
- func (endpoint *Endpoint) Errors() int
- func (endpoint *Endpoint) Load() int
- func (endpoint *Endpoint) LocalPort() (string, error)
- func (endpoint *Endpoint) Name() string
- func (endpoint *Endpoint) Overloaded() bool
- func (endpoint *Endpoint) Reqs() uint
- func (endpoint *Endpoint) RoundTrip(roundTripper func() error)
- func (endpoint *Endpoint) String() string
- func (endpoint *Endpoint) TestActive()
- func (endpoint *Endpoint) WaitActive() <-chan *Endpoint
- type EndpointCollection
- type EndpointStats
- type IsolationProxy
- type LocalRegistry
- type ProxyStats
- type Registry
- type RuntimeStats
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleRuntimeStats ¶
func ServeRuntimeStats ¶
func ServeRuntimeStats(pattern string)
Types ¶
type Endpoint ¶
func (*Endpoint) CheckConnection ¶
func (*Endpoint) ConfigureUrl ¶
func (*Endpoint) Overloaded ¶
func (*Endpoint) TestActive ¶
func (endpoint *Endpoint) TestActive()
func (*Endpoint) WaitActive ¶
type EndpointCollection ¶
type EndpointCollection []*Endpoint
func (EndpointCollection) EmergencyGet ¶
func (col EndpointCollection) EmergencyGet() *Endpoint
func (EndpointCollection) Get ¶
func (col EndpointCollection) Get() *Endpoint
type EndpointStats ¶
type IsolationProxy ¶
type IsolationProxy struct { Registry Registry // contains filtered or unexported fields }
func NewIsolationProxy ¶
func NewIsolationProxy(registry Registry, dialTimeout time.Duration) *IsolationProxy
func (*IsolationProxy) Handle ¶
func (proxy *IsolationProxy) Handle(serviceName, localEndpoint string) error
func (*IsolationProxy) HandleStats ¶
func (proxy *IsolationProxy) HandleStats() http.Handler
func (*IsolationProxy) ServeStats ¶
func (proxy *IsolationProxy) ServeStats(pattern string)
func (*IsolationProxy) Stats ¶
func (proxy *IsolationProxy) Stats() ProxyStats
type LocalRegistry ¶
type LocalRegistry map[string]EndpointCollection
Alternative implementation would use a centralized registry server
func (LocalRegistry) Add ¶
func (reg LocalRegistry) Add(serviceName string, endpoint *Endpoint)
func (LocalRegistry) Endpoints ¶
func (reg LocalRegistry) Endpoints(serviceName string) (endpoints EndpointCollection, err error)
func (LocalRegistry) Services ¶
func (reg LocalRegistry) Services() []string
type ProxyStats ¶
type ProxyStats map[string]*EndpointStats
type Registry ¶
type Registry interface { Endpoints(serviceName string) (endpoints EndpointCollection, err error) Services() []string }
type RuntimeStats ¶
type RuntimeStats struct {
Goroutines int
}
func GetRuntimeStats ¶
func GetRuntimeStats() (result RuntimeStats)
Click to show internal directories.
Click to hide internal directories.