Documentation
¶
Overview ¶
Package route addresses a node's HTTP API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alias ¶
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 ¶
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.
Types ¶
This section is empty.