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

retirement

package
v0.3.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: 7 Imported by: 0

Documentation

Overview

Package retirement completes graceful seat retirement (§5.5). Platform sync marks a seat removed from the declaration as retiring and gives it a retirement notice turn; this loop retires it once that turn is done or its grace period ends, handing back what it still held and revoking the credentials delivered to its sandbox.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loop

type Loop struct {
	Store       Store
	Credentials Revoker
	Metrics     *metrics.Metrics
	Log         *slog.Logger
	Interval    time.Duration
}

Loop retires due seats every Interval.

func (*Loop) Run

func (l *Loop) Run(ctx context.Context)

Run loops until ctx is cancelled.

func (*Loop) Tick

func (l *Loop) Tick(ctx context.Context)

Tick retires every due seat.

type Revoker

type Revoker interface {
	RevokeSeat(ctx context.Context, org, seat string) []credentials.Revoked
}

Revoker revokes the credentials delivered to a seat.

type Store

type Store interface {
	DueRetirements(ctx context.Context, limit int) ([]store.DueRetirement, error)
	FinishRetirement(ctx context.Context, seatID string, release store.WorkRelease) (*store.Retirement, error)
}

Store is the persistence the loop needs.

Jump to

Keyboard shortcuts

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