Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConnectZoneName = "connect.consul" ServiceZoneName = "service.consul" )
View Source
const FlightPathTag = "in-flightpath"
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
func Hash(l []ClusterInfo) string
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog interacts with consul and keeps a list of currently valid entities
func NewCatalog ¶
NewCatalog creates a new instance of Catalog
func (*Catalog) DiscoverClusters ¶
func (c *Catalog) DiscoverClusters(clusters chan<- ClusterInfo, cleanup chan<- string)
DiscoverClusters delivers the state-of-the-world list of clusters as available in the consul catalog.
type CertFinder ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func (*Cluster) IsConnectEnabled ¶
func (*Cluster) Settings ¶ added in v0.0.5
func (c *Cluster) Settings() (*ClusterSettings, error)
TODO: right now we don't care about new or old cluster
settings. If these settings change across deployments we'll just pick the latest one and work with that. An upcoming version will support creating multiple clusters per service e.g. canary, strand, etc which will stick with their own cluster settings.
type ClusterInfo ¶
type ClusterInfo interface { Name() string Endpoints() []Endpoint IsConnectEnabled() bool Hash() string Settings() (*ClusterSettings, error) }
ClusterInfo represents a collection of service instances registered in consul catalog. A cluster represents only one type of service.
type ClusterSettings ¶ added in v0.0.5
type ClusterSettings struct { ConnTimeout int64 `mapstructure:"flightpath-cluster-conn_timeout"` PerConnBufLimitBytes uint32 `mapstructure:"flightpath-cluster-per_conn_buf_limit_bytes"` MaxReqPerConn uint32 `mapstructure:"flightpath-cluster-max_req_per_conn"` TcpKeepaliveProbes uint32 `mapstructure:"flightpath-cluster-tcp_keepalive_probes"` TcpKeepaliveTime uint32 `mapstructure:"flightpath-cluster-tcp_keepalive_time"` TcpKeepaliveInterval uint32 `mapstructure:"flightpath-cluster-tcp_keepalive_interval"` RetryOn string `mapstructure:"flightpath-retry-on"` RetryAttempts uint32 `mapstructure:"flightpath-retry-attempts"` RetryAttemptTimeout int64 `mapstructure:"flightpath-retry-per_try_timeout"` RetryBackoffBase int64 `mapstructure:"flightpath-retry-backoff_base_interval"` RetryBackoffMax int64 `mapstructure:"flightpath-retry-backoff_max_interval"` }
func (*ClusterSettings) Canonicalize ¶ added in v0.0.5
func (cs *ClusterSettings) Canonicalize()
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is the network address and port of the service instance.
func (*Endpoint) RoutingInfo ¶
type RouteFinder ¶
type RouteStorage ¶
type RouteStorage struct {
// contains filtered or unexported fields
}
func NewRouteStorage ¶
func (*RouteStorage) WatchRoutes ¶
func (i *RouteStorage) WatchRoutes(routes chan<- []Route, errs chan<- error)
type ServiceFinder ¶
Click to show internal directories.
Click to hide internal directories.