rendered

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BusType

type BusType struct {
	util.Singleton[VersionManager]
}
var Bus BusType

func (*BusType) Initialize

func (b *BusType) Initialize(ctx context.Context,
	kvStore kvstore.KVStore,
	provider queues.Provider,
	renderedWaitTimeout time.Duration,
	log logrus.FieldLogger) error

type Notification added in v1.3.0

type Notification struct {
	Type            NotificationType
	RenderedVersion string // only populated for NotificationTypeSpecUpdated
}

Notification is the internal signal sent over the pub/sub channel to unblock a waiting GetRenderedDevice long-poll on the API server.

type NotificationType added in v1.3.0

type NotificationType string

NotificationType distinguishes between different kinds of notifications that wake a device agent's long-poll. It is intentionally decoupled from the persisted auditing Event system (api/core/v1beta1).

const (
	NotificationTypeSpecUpdated NotificationType = "spec-updated"
	NotificationTypeConsole     NotificationType = "console"
)

type Publisher

type Publisher interface {
	Publish(ctx context.Context, orgId uuid.UUID, name string, n Notification) error
}

func NewBroadcaster

func NewBroadcaster(ctx context.Context, queuesProvider queues.Provider) (Publisher, error)

type Subscriber

type Subscriber interface {
	Subscribe(ctx context.Context, handler func(ctx context.Context, orgId uuid.UUID, name string, n Notification) error) error
}

func NewSubscriber

func NewSubscriber(ctx context.Context, queuesProvider queues.Provider) (Subscriber, error)

type VersionManager

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

func (*VersionManager) ClearConsoleNotification added in v1.3.0

func (m *VersionManager) ClearConsoleNotification(ctx context.Context, orgId uuid.UUID, name string) error

ClearConsoleNotification removes the console-pending KV flag after the agent has been woken.

func (*VersionManager) NotifyConsole added in v1.3.0

func (m *VersionManager) NotifyConsole(ctx context.Context, orgId uuid.UUID, name string) error

NotifyConsole sets the console-pending KV flag and publishes a console notification so that a waiting GetRenderedDevice long-poll is unblocked immediately.

func (*VersionManager) Start

func (m *VersionManager) Start(ctx context.Context) error

func (*VersionManager) StoreAndNotify

func (m *VersionManager) StoreAndNotify(ctx context.Context, orgId uuid.UUID, name string, renderedVersion string) error

func (*VersionManager) WaitForNotification added in v1.3.0

func (m *VersionManager) WaitForNotification(ctx context.Context, orgId uuid.UUID, name string, knownRenderedVersion string) (Notification, bool, error)

WaitForNotification blocks until a Notification occurs, then returns it. Returns (Notification{}, false, nil) on timeout — caller should return 204.

Jump to

Keyboard shortcuts

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