grpcc_resolver

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DnsScheme    = "dns"
	K8sScheme    = "k8s"
	DirectScheme = "direct"
	DiscovScheme = "discov"
	EndpointSep  = ","
)

Variables

View Source
var (
	Replica = 1
)

Functions

func BuildDirectTarget

func BuildDirectTarget(endpoints ...string) string

BuildDirectTarget direct://localhost:8080,localhost:8081

func BuildDiscovTarget

func BuildDiscovTarget(service string, registry string) string

BuildDiscovTarget discov://test-service

func BuildTarget

func BuildTarget(service string, registry ...string) string

func Interpret

func Interpret(ep string) (address string, serverName string)

Interpret endpoint parses an endpoint of the form (http|https)://<host>*|(unix|unixs)://<path>) and returns low-level address (supported by 'net') to connect to, and a server name used for x509 certificate matching.

Types

type CredsRequirement

type CredsRequirement int
const (
	// CREDS_REQUIRE - Credentials/certificate required for thi type of connection.
	CREDS_REQUIRE CredsRequirement = iota
	// CREDS_DROP - Credentials/certificate not needed and should get ignored.
	CREDS_DROP
	// CREDS_OPTIONAL - Credentials/certificate might be used if supplied
	CREDS_OPTIONAL
)

Jump to

Keyboard shortcuts

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