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

platform

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package platform assembles the trusted platform service: the runtime API, connection manager with ingress loops, outbox dispatcher and background scheduler (§3, §13).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Store     *store.Store
	Auth      auth.Authenticator
	Factories connections.Factories
	Secrets   connectors.Secrets
	Registry  *prometheus.Registry
	Log       *slog.Logger
	// Interval is the period of the scheduler and outbox loops.
	Interval time.Duration
	// RetryBackoff is the first delay before retrying a retryable connector call.
	RetryBackoff time.Duration
	// Console serves the read-only console API; Auth must accept the console
	// identity.
	Console bool
	// Credential refresh policy; zero values take the connections defaults.
	CredentialRefresh  time.Duration
	CredentialGrace    time.Duration
	CredentialMaxStale time.Duration
	// RetirementGrace bounds the wind-down of a seat removed from the
	// declaration; zero takes store.DefaultRetirementGrace. Negative retires
	// removed seats at once (still handing back what they held).
	RetirementGrace time.Duration
}

Options configure a Platform.

type Platform

type Platform struct {
	Handler     http.Handler
	Connections *connections.Manager
	Credentials *credentials.Registry
	// contains filtered or unexported fields
}

Platform is a running platform service.

func New

func New(ctx context.Context, o Options) *Platform

New wires the platform. Background work starts with Start and stops when ctx is cancelled.

func (*Platform) Start

func (p *Platform) Start(ctx context.Context) error

Start restores the adapters of every active organisation (so ingress resumes after a restart, A20) and starts the background loops.

func (*Platform) Wait

func (p *Platform) Wait()

Wait blocks until the background loops and ingress loops have stopped.

Jump to

Keyboard shortcuts

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