Documentation ¶
Index ¶
- type CDSResp
- type CORs
- type CircuitBreakers
- type Cluster
- type ConsulKeys
- type HTTP2Settings
- type HealthCheck
- type Host
- type OutlierDetection
- type RDSResp
- type RateLimit
- type Route
- type SDSResp
- type SSLContext
- type Server
- func (s *Server) GetClusters(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetConsulKeys()
- func (s *Server) GetRoutes(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetService(w http.ResponseWriter, r *http.Request)
- func (s *Server) Start()
- func (s *Server) Stop()
- func (s *Server) ToRoutes(services map[string][]string) RDSResp
- type Tags
- type VirtualCluster
- type VirtualHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreakers ¶
type CircuitBreakers struct { }
type Cluster ¶
type Cluster struct { Name string `json:"name"` //required Type string `json:"type"` //required ConnectTimeoutMS int `json:"connect_timeout_ms"` //required PerConnectionBufferLimitBytes int `json:"per_connection_buffer_limit_bytes,omitempty"` //optional LBType string `json:"lb_type"` //required ServiceName string `json:"service_name"` //required HealthCheck *HealthCheck `json:"health_check,omitempty"` //optional MaxRequestsPerConnection int `json:"max_requests_per_connection,omitempty"` //optional CircuitBreakers *CircuitBreakers `json:"circuit_breakers,omitempty"` //optional SSLContext *SSLContext `json:"ssl_context,omitempty"` //optional Features string `json:"features,omitempty"` //optional HTTP2Settings *HTTP2Settings `json:"http2_settings,omitempty"` //optional CleanupIntervalMS int `json:"cleanup_interval_ms,omitempty"` //optional DNSRefreshRateMS int `json:"dns_refresh_rate_ms,omitempty"` //optional DNSLookupFamily string `json:"dns_lookup_family,omitempty"` //optional DNSResolvers []string `json:"dns_resolvers,omitempty"` //optional OutlierDetection *OutlierDetection `json:"outlier_detection,omitempty"` //optional }
type HTTP2Settings ¶
type HTTP2Settings struct { }
type HealthCheck ¶
type HealthCheck struct {
Type string `json:"type,omitempty""`
}
type OutlierDetection ¶
type OutlierDetection struct { }
type RDSResp ¶
type RDSResp struct { ValidateClusters bool `json:"valide_clusters,omitempty"` VirtualHosts []VirtualHost `json:"virtual_hosts"` InternalOnlyHeaders []string `json:"internal_only_headers,omitempty"` ResponseHeadersToAdd []map[string]string `json:"response_headers_to_add,omitempty"` ResponseHeadersToRemove []string `json:"response_headers_to_remove,omitempty"` RequestHeadersToAdd []map[string]string `json:"request_headers_to_add,omitempty"` }
type SDSResp ¶
type SDSResp struct {
Hosts []Host `json:"hosts"`
}
func ToHosts ¶
func ToHosts(services []*consulapi.CatalogService) SDSResp
type SSLContext ¶
type SSLContext struct { }
type Server ¶
type Server struct { Port int ConsulAPI *consulapi.Client QueryOptions consulapi.QueryOptions ConsulKeys ConsulKeys // contains filtered or unexported fields }
Server is the convoy server, a shim between Envoy and Consul
func (*Server) GetClusters ¶
func (s *Server) GetClusters(w http.ResponseWriter, r *http.Request)
func (*Server) GetConsulKeys ¶
func (s *Server) GetConsulKeys()
func (*Server) GetService ¶
func (s *Server) GetService(w http.ResponseWriter, r *http.Request)
type Tags ¶
type VirtualCluster ¶
type VirtualCluster struct { }
type VirtualHost ¶
type VirtualHost struct { Name string `json:"name"` Domains []string `json:"domains"` Routes []Route `json:"routes"` CORs *CORs `json:"cors,omitempty"` RequireSSL string `json:"require_ssl,omitempty"` VirtualClusters []VirtualCluster `json:"virtual_clusters,omitempty"` RateLimits []RateLimit `json:"rate_limits,omitempty"` RequestHeadersToAdd []map[string]string `json:"request_headers_to_add,omitempty"` }
Click to show internal directories.
Click to hide internal directories.