relayprofile

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package relayprofile describes application relay selection and saved service credentials.

Index

Constants

View Source
const MaxAccessKeyBytes = senderrelay.MaxAccessKeyBytes
View Source
const MaximumEndpoints = relayset.MaximumEndpoints

Variables

View Source
var ErrCandidatesRequired = errors.New("relay intent excludes the built-in network but has no candidates")

Functions

func PublicURLs

func PublicURLs(candidates []Candidate) ([]string, error)

func RegistrationURLs

func RegistrationURLs(candidates []Registration) ([]string, error)

Types

type AuthorizationSource

type AuthorizationSource interface {
	RegistrationAuthorization() serviceauthority.RegistrationAuthorization
}

type Candidate

type Candidate struct {
	PublicURL       string
	ConsoleURL      string `json:"-"`
	OfferedFrontend string `json:"-"`
	AccessKey       string `json:"-"`
}

func (Candidate) Registration

func (candidate Candidate) Registration() Registration

func (Candidate) Validate

func (candidate Candidate) Validate() error

type Intent

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

Intent separates a user's complete explicit set from configured candidates supplemented by the application network. The zero value requests planning.

func OnlyConfigured

func OnlyConfigured(candidates []Candidate) Intent

func Plan

func Plan(candidates []Candidate) Intent

func UseExplicit

func UseExplicit(candidates []Candidate) Intent

func (Intent) Candidates

func (i Intent) Candidates() []Candidate

func (Intent) Mode

func (i Intent) Mode() IntentMode

func (Intent) Validate

func (i Intent) Validate() error

Validate distinguishes an impossible selection from unavailable infrastructure: retrying cannot supply candidates when the caller excludes the built-in network.

type IntentMode

type IntentMode uint8
const (
	Planned IntentMode = iota
	ConfiguredOnly
	Explicit
)

type Registration

type Registration struct {
	PublicURL     string
	Authorization AuthorizationSource `json:"-"`
}

func Registrations

func Registrations(profiles []Candidate) []Registration

type StaticKey

type StaticKey string

func (StaticKey) RegistrationAuthorization

func (key StaticKey) RegistrationAuthorization() serviceauthority.RegistrationAuthorization

Jump to

Keyboard shortcuts

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