registration

package
v0.1.12-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefreshAccessToken

func RefreshAccessToken(ctx context.Context, opts RefreshOptions) (string, time.Time, error)

RefreshAccessToken renews the node's access token and persists it, so a process that has been running for days reconnects with a live token rather than the one it was handed at startup.

Types

type LoginOptions

type LoginOptions struct {
	DataDir        string
	CoordinatorURL string
	InviteToken    string
	HTTPClient     *http.Client
	Now            func() time.Time
}

type RefreshOptions

type RefreshOptions struct {
	CoordinatorURL string
	NodeID         string
	PrivateKey     ed25519.PrivateKey
	DataDir        string
	HTTPClient     *http.Client
	Now            func() time.Time
}

RefreshOptions carries what a long-running agent needs to renew its own access token without going through the full login path.

type Result

type Result struct {
	Credentials identity.Credentials
	Registered  bool
	Refreshed   bool
}

func Login

func Login(ctx context.Context, opts LoginOptions) (Result, error)

Jump to

Keyboard shortcuts

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