Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

hostname

v1.85.0
google.golang.org/grpc/experimental/balancer/hostname

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

4 matches

Top ↑

Package hostname contains utilities for the endpoint hostname attribute (used for per-endpoint :authority / SNI override).

Experimental

Notice: All APIs in this package are EXPERIMENTAL and may be changed or removed in a later release.

Functions

FromEndpoint

func FromEndpoint(endpoint resolver.Endpoint) string

FromEndpoint returns the hostname attribute of endpoint. If this attribute is not set, it returns the empty string.

Set

func Set(endpoint resolver.Endpoint, hostname string) resolver.Endpoint

Set returns a copy of the given endpoint with the hostname attribute set. If hostname is empty the endpoint is returned unmodified.

Dependency graph