network

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package network provides network-related tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateListenAddr

func ValidateListenAddr(raw string) error

ValidateListenAddr validates a listen address in the format host:port or :port

Types

type Endpoint

type Endpoint struct {
	URL string
	TLS *tls.Config
}

Endpoint is a remote service address paired with its TLS settings. TLS is set for an https:// URL and nil for anything else, which dials plaintext.

func (Endpoint) GRPCTarget

func (e Endpoint) GRPCTarget() string

GRPCTarget returns URL as a gRPC target. An http(s):// URL becomes its host:port, with 443 or 80 when the port is omitted; anything else, such as host:port or dns:///host:port, is returned as written.

Jump to

Keyboard shortcuts

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