route

package
v0.0.0-...-ba35583 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	ApplicationId string

	Tags              map[string]string
	PrivateInstanceId string

	RouteServiceUrl string
	ModificationTag models.ModificationTag
	// contains filtered or unexported fields
}

func NewEndpoint

func NewEndpoint(appId, host string, port uint16, privateInstanceId string,
	tags map[string]string, staleThresholdInSeconds int, routeServiceUrl string, modificationTag models.ModificationTag) *Endpoint

func (*Endpoint) CanonicalAddr

func (e *Endpoint) CanonicalAddr() string

func (*Endpoint) Component

func (rm *Endpoint) Component() string

func (*Endpoint) MarshalJSON

func (e *Endpoint) MarshalJSON() ([]byte, error)

func (*Endpoint) ToLogData

func (e *Endpoint) ToLogData() interface{}

type EndpointIterator

type EndpointIterator interface {
	Next() *Endpoint
	EndpointFailed()
}

type Pool

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

func NewPool

func NewPool(retryAfterFailure time.Duration, contextPath string) *Pool

func (*Pool) ContextPath

func (p *Pool) ContextPath() string

func (*Pool) Each

func (p *Pool) Each(f func(endpoint *Endpoint))

func (*Pool) Endpoints

func (p *Pool) Endpoints(initial string) EndpointIterator

func (*Pool) IsEmpty

func (p *Pool) IsEmpty() bool

func (*Pool) MarkUpdated

func (p *Pool) MarkUpdated(t time.Time)

func (*Pool) MarshalJSON

func (p *Pool) MarshalJSON() ([]byte, error)

func (*Pool) PruneEndpoints

func (p *Pool) PruneEndpoints(defaultThreshold time.Duration) []*Endpoint

func (*Pool) Put

func (p *Pool) Put(endpoint *Endpoint) bool

Returns true if endpoint was added or updated, false otherwise

func (*Pool) Remove

func (p *Pool) Remove(endpoint *Endpoint) bool

Returns true if the endpoint was removed from the Pool, false otherwise.

func (*Pool) RouteServiceUrl

func (p *Pool) RouteServiceUrl() string

type Uri

type Uri string

func (Uri) NextWildcard

func (u Uri) NextWildcard() (Uri, error)

func (Uri) RouteKey

func (u Uri) RouteKey() Uri

func (Uri) String

func (u Uri) String() string

func (Uri) ToLower

func (u Uri) ToLower() Uri

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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