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>"
Index ¶
- func Encode(k ed25519.PrivateKey) string
- func Find(ctx context.Context, key, cached string) (string, error)
- func ID(k ed25519.PrivateKey, url func() string) http.Handler
- func Key(file string) (ed25519.PrivateKey, error)
- func Prove(ctx context.Context, key, url string) error
- func Publish(ctx context.Context, k ed25519.PrivateKey, url string) error
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 ¶
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) http.Handler
ID answers a proof for the harness with k, now reached at url().
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.
Types ¶
This section is empty.