Help us shape the future of Go! Take the 2026 Go Developer Survey

network

package
v0.2.41 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDestination = errors.New("connection destination is not permitted")
View Source
var ErrRequest = errors.New("request is outside the connection boundary")

Functions

func IsPublicIP

func IsPublicIP(ip netip.Addr) bool

func NewClient

func NewClient(endpoint string, options Options) (*http.Client, error)

func ValidateEndpoint

func ValidateEndpoint(endpoint string, options Options) (*url.URL, error)

func WithTimeout

func WithTimeout(client *http.Client, timeout time.Duration) (*http.Client, error)

Types

type Options

type Options struct {
	RunnerID     string
	PrivateRoute *PrivateRoute
	CAPEM        []byte
	Development  bool
}

type PrivateRoute

type PrivateRoute struct {
	OrgID        string   `json:"org_id"`
	ConnectionID string   `json:"connection_id"`
	RunnerID     string   `json:"runner_id"`
	Host         string   `json:"host"`
	CIDRs        []string `json:"cidrs"`
}

Jump to

Keyboard shortcuts

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