Documentation ¶
Index ¶
- type ConsulConfiguration
- type ServerDefinition
- func ConsulRegionRoutes(config *ConsulConfiguration) ([]*ServerDefinition, error)
- func ServerDefinitionFromCatalogService(entry *consul.CatalogService) *ServerDefinition
- func ServerDefinitionFromServiceEntry(entry *consul.ServiceEntry) *ServerDefinition
- func ServerDefinitionsFromServiceEntries(entries []*consul.ServiceEntry) []*ServerDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulConfiguration ¶
func NewConsulConfiguration ¶
func NewConsulConfiguration() *ConsulConfiguration
type ServerDefinition ¶
type ServerDefinition struct { // Constructed scheme://Host:port URL for region redirection - note that this excludes both the path specification // and query parameters, as these will be lazily inserted by the middleware URL url.URL // ISO 3166-1 alpha-2 country code - e.g. de CountryCode string // Is the server designated as the default handler for unmatched country codes? DefaultServer bool }
func ConsulRegionRoutes ¶
func ConsulRegionRoutes(config *ConsulConfiguration) ([]*ServerDefinition, error)
ConsulRegionRoutes returns a list of servers and regions for a specific service and tag
func ServerDefinitionFromCatalogService ¶
func ServerDefinitionFromCatalogService(entry *consul.CatalogService) *ServerDefinition
ServerDefinitionFromServiceEntry creates a routing definition for a region from a Consul Catalog Service
func ServerDefinitionFromServiceEntry ¶
func ServerDefinitionFromServiceEntry(entry *consul.ServiceEntry) *ServerDefinition
ServerDefinitionFromServiceEntry creates a routing definition for a region from a Consul Service entry
func ServerDefinitionsFromServiceEntries ¶
func ServerDefinitionsFromServiceEntries(entries []*consul.ServiceEntry) []*ServerDefinition
Click to show internal directories.
Click to hide internal directories.