grpcc_resolver

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DnsScheme       = "dns"
	K8sScheme       = "k8s"
	DirectScheme    = "direct"
	DiscoveryScheme = "discovery"
	EndpointSep     = ","
)

Variables

View Source
var Replica = 1

Functions

func BuildDirectTarget

func BuildDirectTarget(name string, endpoints ...string) string

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

func BuildDiscoveryTarget added in v0.2.12

func BuildDiscoveryTarget(service string) string

BuildDiscoveryTarget discovery://test-service:8080

func Interpret

func Interpret(ep string) (address, 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.

func NewDirectBuilder added in v0.2.12

func NewDirectBuilder() resolver.Builder

func NewDiscoveryBuilder added in v0.2.12

func NewDiscoveryBuilder(disco discovery.Discovery) resolver.Builder

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