registration

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package registration provides a gRPC client for agent and operator registration with nstance-server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides access to the RegistrationService

func NewClient

func NewClient(cfg Config) (*Client, error)

NewClient constructs a registration gRPC client wrapper

func (*Client) Close

func (c *Client) Close() error

Close closes the underlying gRPC connection

func (*Client) RegisterAgent

func (c *Client) RegisterAgent(ctx context.Context, ident *identity.Identity, nonce, ipv4, ipv6, hostname string) error

RegisterAgent registers an agent using its nonce and public key, and stores the returned client cert. ipv4 and ipv6 are the agent's private IP addresses to report to the server. hostname is the agent's reported hostname.

func (*Client) RegisterOperator

func (c *Client) RegisterOperator(ctx context.Context, nonce string, publicKey ed25519.PublicKey) ([]byte, error)

RegisterOperator registers an operator using its nonce and public key, and returns the client cert

type Config

type Config struct {
	ServerAddress string
	ServerCACert  x509.Certificate
}

Config holds connection settings for the registration gRPC client

Jump to

Keyboard shortcuts

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