Documentation ¶
Overview ¶
Package discover implements a gRPC discovery middleware.
Index ¶
- Variables
- func Address(role ttnpb.ClusterRole, host string) (string, error)
- func DefaultPort(target string, port int) (string, error)
- func DefaultURL(target string, port int, tls bool) (string, error)
- func NewBuilder(scheme string, opts ...Option) resolver.Builder
- func Scheme(role ttnpb.ClusterRole) (string, error)
- type DNS
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHTTPPorts = map[bool]int{ // contains filtered or unexported fields }
DefaultHTTPPorts is a map of the default HTTP ports, with/without TLS.
View Source
var DefaultPorts = map[bool]int{ // contains filtered or unexported fields }
DefaultPorts is a map of the default gRPC ports, with/without TLS.
View Source
var HTTPScheme = map[bool]string{ // contains filtered or unexported fields }
HTTPScheme is a map of the HTTP schemes, with/without TLS.
Functions ¶
func Address ¶ added in v3.8.5
func Address(role ttnpb.ClusterRole, host string) (string, error)
Address returns the host with service discovery gRPC scheme for the given role.
func DefaultPort ¶
DefaultPort appends port if target does not already have one.
func DefaultURL ¶
DefaultURL appends protocol and port if target does not already have one.
func NewBuilder ¶ added in v3.8.5
NewBuilder returns a new resolver builder for service discovery.
Types ¶
Click to show internal directories.
Click to hide internal directories.