endpoint

package
v0.0.0-...-bcc2220 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

CredsRequirement indicates whether a certificate is needed.

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

func RequiresCredentials

func RequiresCredentials(ep string) CredsRequirement

RequiresCredentials returns whether given endpoint requires credentials/certificates for connection.

Jump to

Keyboard shortcuts

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