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

host

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Overview

Package host groups database connections that share a MySQL server endpoint. Host-level work (load monitoring, capacity budgets and index restoration) must not treat separate schemas on the same endpoint as separate machines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Host    Host
	Indices []int
}

Group contains indices into the original connection list, in input order.

func GroupConfigs

func GroupConfigs(configs []*mysql.Config) []Group

GroupConfigs groups normalized, non-nil connection configurations. Groups retain first-seen order so their representative connection is deterministic.

type Host

type Host struct {
	Network string
	Address string
}

Host identifies an endpoint independently of schema and credentials. Ports and transports remain distinct. DNS aliases and proxies cannot be resolved to physical servers here; callers must use consistent direct endpoints.

func (Host) String

func (h Host) String() string

Jump to

Keyboard shortcuts

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