rds

package
v0.0.0-...-1ccba7b Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type string `json:"type,omitempty"`
}

Action ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/rate_limits#actions

type Header struct {
	Name  string `json:"name"`
	Value string `json:"value,omitempty"`
	Regex string `json:"regex,omitempty"`
}

Header ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/route#config-http-conn-man-route-table-route-headers

type RateLimit

type RateLimit struct {
	Stage      int      `json:"stage,omitempty"`
	DisableKey string   `json:"disable_key,omitempty"`
	Actions    []Action `json:"actions"`
}

RateLimit ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/rate_limits#config-http-conn-man-route-table-rate-limit-config

type Response

type Response struct {
	ValidateClusters        bool          `json:"validate_clusters,omitempty"`
	VirtualHosts            []VirtualHost `json:"virtual_hosts"`
	InternalOnlyHeaders     []string      `json:"internal_only_headers,omitempty"`
	ResponseHeadersToRemove []string      `json:"response_headers_to_remove,omitempty"`
}

Response ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/route_config.html?highlight=virtual_hosts

type RetryPolicy

type RetryPolicy struct {
	RetryOn         string        `json:"retry_on"`
	NumRetries      int           `json:"num_retries,omitempty"`
	PerTryTimeoutMS time.Duration `json:"per_try_timeout_ms,omitempty"`
}

RetryPolicy ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/route#config-http-conn-man-route-table-route-retry

type Route

type Route struct {
	Prefix              string        `json:"prefix,omitempty"`
	Path                string        `json:"path,omitempty"`
	Regex               string        `json:"regex,omitempty"`
	Cluster             string        `json:"cluster"`
	HostRedirect        string        `json:"host_redirect,omitempty"`
	PathRedirect        string        `json:"path_redirect,omitempty"`
	PrefixRewrite       string        `json:"prefix_rewrite,omitempty"`
	HostRewrite         string        `json:"host_rewrite,omitempty"`
	AutoHostRewrite     bool          `json:"auto_host_rewrite,omitempty"`
	CaseSensitive       bool          `json:"case_sensitive,omitempty"`
	UseWebsocket        bool          `json:"use_websocket,omitempty"`
	TimeoutMS           time.Duration `json:"timeout_ms,omitempty"`
	RetryPolicy         *RetryPolicy  `json:"retry_policy,omitempty"`
	Shadow              *Shadow       `json:"shadow,omitempty"`
	Priority            string        `json:"priority,omitempty"`
	Headers             []Header      `json:"headers,omitempty"`
	RateLimits          []RateLimit   `json:"rate_limits,omitempty"`
	IncludeVhRateLimits bool          `json:"include_vh_rate_limits,omitempty"`
	HashPolicy          *HashPolicy   `json:"hash_policy,omitempty"`
	Decorator           *Decorator    `json:"decorator,omitempty"`
}

Route ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/route#config-http-conn-man-route-table-route

type Shadow

type Shadow struct {
	Cluster    string `json:"cluster"`
	RuntimeKey string `json:"runtime_key,omitempty"`
}

Shadow ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/route#config-http-conn-man-route-table-route-shadow

type VirtualCluster

type VirtualCluster struct {
	Pattern string `json:"pattern"`
	Name    string `json:"name"`
	Method  string `json:"method"`
}

VirtualCluster ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/vcluster#config-http-conn-man-route-table-vcluster

type VirtualHost

type VirtualHost struct {
	Name            string           `json:"name"`
	Domains         []string         `json:"domains"`
	Routes          []Route          `json:"routes"`
	RequireSSL      string           `json:"require_ssl,omitempty"`
	VirtualClusters []VirtualCluster `json:"virtual_clusters,omitempty"`
	RateLimits      []RateLimit      `json:"rate_limits,omitempty"`
}

VirtualHost ... https://www.envoyproxy.io/docs/envoy/v1.6.0/api-v1/route_config/vhost

type Worker

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

Worker for RDS (Route Discovery Service)

func NewWorker

func NewWorker(consul *api.Client, consulDomain string, serviceCh chan map[string][]string) *Worker

NewWorker will return the struct for a RDS worker

func (*Worker) Response

func (w *Worker) Response() Response

Response will return the pre-computed RDS response

func (*Worker) Start

func (w *Worker) Start()

Start will start the RDS worker, listening for service channel changes and pre-build RDS HTTP response

func (*Worker) Stop

func (w *Worker) Stop()

Stop the RDS worker

Jump to

Keyboard shortcuts

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