route

package
v1.102.7 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package route addresses a node's HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alias

func Alias(address string) (string, bool)

Alias reads back what Chain writes: the alias in a chain address, and whether the address named a chain at all. Inverse of Chain, and the one place this module recognises the segment.

func Chain

func Chain(uri, alias string) string

Chain is where a chain answers, and the one place this module builds that address.

uri is a node's base URL, or empty for the path alone: Chain("", "P") is the P-Chain path, and Chain("http://localhost:9630", "C")+"/rpc" is that node's C-Chain RPC. The segment is constants.ChainAliasPrefix, named once, so every caller moves when it moves.

That is the point of routing them all through here. This module used to spell the address out at 112 sites; when the node renamed the segment, all 112 went on addressing a name the router had already left behind. Nothing failed to compile. They simply answered 404.

func Health added in v1.102.7

func Health(uri string) string

Health is the node's full health report: every registered check, and the verdict over all of them. What to read when the answer matters more than the status code.

uri is a node's base URL, or empty for the path alone.

func Liveness added in v1.102.7

func Liveness(uri string) string

Liveness is the probe that answers whether the process is up. Cheapest of the three, and the one to poll in a loop.

func Readiness added in v1.102.7

func Readiness(uri string) string

Readiness is the probe that answers whether the node will serve — up, and past bootstrap. What to wait on before calling a node started.

Types

This section is empty.

Jump to

Keyboard shortcuts

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