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

pointer

package
v0.5.2-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package pointer is how a worker or connector finds its harness from the key its token carries. pointer.mainplane.ai maps the key to the harness's current URL, signed by the key. Neither the pointer nor the URL is trusted: the harness at the URL proves the key before any secret goes there.

PUT pointer.mainplane.ai/<key>  {url, seq, sig}  sig over "<key> <url> <seq>"
GET <url>/id?nonce=<n>          {url, sig,       sig over "id <url> <n>"
                                 noise}          noise over "noise <coordinator's Noise key>"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(k ed25519.PrivateKey) string

Encode is k's public half as tokens and the pointer carry it.

func Find

func Find(ctx context.Context, key, cached string) (string, error)

Find is where the harness with key is: cached, when it proves the key there, else the URL on the pointer, once it proves the key there.

func ID

func ID(k ed25519.PrivateKey, url func() string, noise string) http.Handler

ID answers a proof for the harness with k, now reached at url(), whose coordinator has the Noise key noise.

func Key

func Key(file string) (ed25519.PrivateKey, error)

Key is the harness key kept in file, made there the first time. Only its owner may read it: whoever has it can move the harness's workers.

func Prove

func Prove(ctx context.Context, key, url string) error

Prove is nil when the harness at url holds key. It signs a fresh nonce with the URL it knows itself by, which must be url: a host that relays another harness's answer fails.

func ProveNoise added in v0.3.0

func ProveNoise(ctx context.Context, key, url, noise string) error

ProveNoise is nil when the harness at url holds key and vouches for noise as its coordinator's Noise key.

func Publish

func Publish(ctx context.Context, k ed25519.PrivateKey, url string) error

Publish puts url on the pointer as the URL of k's harness. seq is the time, so the harness keeps no counter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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