discovery

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByIPPort

type ByIPPort []Host

ByIPPort ip and port based sorting for hosts.

func (ByIPPort) Len

func (s ByIPPort) Len() int

Len length.

func (ByIPPort) Less

func (s ByIPPort) Less(i, j int) bool

Less compare elements.

func (ByIPPort) Swap

func (s ByIPPort) Swap(i, j int)

Swap elements.

type Clusters

type Clusters struct {
	Clusters []envoy.Cluster `json:"clusters"`
}

Clusters is the array of clusters returned by GET clusters

type Config

type Config struct {
	HTTPAddressSpec string
	Discovery       api.ServiceDiscovery
	Rules           api.RulesService
	TLSConfig       *envoy.SSLContext
}

Config encapsulates REST server configuration parameters

type Discovery

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

Discovery handles discovery API calls

func NewDiscovery

func NewDiscovery(discovery api.ServiceDiscovery, rules api.RulesService, tlsConfig *envoy.SSLContext) *Discovery

NewDiscovery creates struct

func (*Discovery) Routes

func (d *Discovery) Routes(middlewares ...rest.Middleware) []*rest.Route

Routes for discovery API

type Host

type Host struct {
	IPAddr string            `json:"ip_address"`
	Port   uint16            `json:"port"`
	Tags   map[string]string `json:"tags"`
}

Host is the endpoint and tag data for a service instance

type Hosts

type Hosts struct {
	Hosts []Host `json:"hosts"`
}

Hosts is the array of hosts returned by the GET registration

type Server

type Server interface {
	Start() error
	Stop()
}

Server defines an interface for controlling server lifecycle

func NewDiscoveryServer

func NewDiscoveryServer(conf *Config) (Server, error)

NewDiscoveryServer creates a new server based on the provided configuration options. Returns a valid Server interface on success or an error on failure

type VirtualHosts

type VirtualHosts struct {
	VirtualHosts []envoy.VirtualHost `json:"virtual_hosts"`
}

VirtualHosts is the array of route info returned by GET routes

Jump to

Keyboard shortcuts

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