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

endpoint

package
v0.1.32 Latest Latest
Warning

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

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

Documentation

Overview

Package endpoint finds the daemon a config's clients talk to: the socket the config names, or, when another daemon already serves the same store on another socket, that one. Every client resolves through it before it connects (the TUI, --call, --print-endpoint), so two configs that share a store attach to one daemon instead of spawning into its lease.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Holder

func Holder(ctx context.Context, storePath, fallback string) string

Holder is the address of the daemon serving the store at storePath, as its lease-info names it and a probe confirms, or fallback.

func Resolve

func Resolve(ctx context.Context, cfg *config.Config) (addr, configured string, err error)

Resolve is the address a client of cfg connects to, and the one cfg names (where a spawned daemon binds). The store's lease-info is believed only when the address it names answers as this store's daemon (store_id) and as the process that wrote the record (instance); a missing, stale or mismatched record leaves the configured socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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