events

package
v0.0.0-...-e5d423c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package events provides stub event publishing for backwards compatibility. NATS has been removed - all event publishing is now a no-op. Agents communicate directly via WebSocket instead of via message broker.

Index

Constants

View Source
const (
	PlatformKubernetes = "kubernetes"
	PlatformDocker     = "docker"
)

Platform constants (preserved for backwards compatibility)

View Source
const (
	InstallStatusPending = "pending"
)

Install status constants

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInstallEvent

type AppInstallEvent struct {
	InstallID         string
	CatalogTemplateID int
	TemplateName      string
	DisplayName       string
	Description       string
	Category          string
	IconURL           string
	Manifest          string
	InstalledBy       string
	Platform          string
}

type AppUninstallEvent

type AppUninstallEvent struct {
	InstallID    string
	TemplateName string
	Platform     string
}

type Config

type Config struct {
	URL      string
	User     string
	Password string
}

Config is a stub config struct

type Publisher

type Publisher struct{}

Publisher is a no-op stub that replaces the NATS event publisher

func NewPublisher

func NewPublisher(cfg Config) (*Publisher, error)

NewPublisher creates a no-op publisher

func (*Publisher) Close

func (p *Publisher) Close() error

Close is a no-op

func (*Publisher) PublishAppInstall

func (p *Publisher) PublishAppInstall(ctx context.Context, event *AppInstallEvent) error

func (*Publisher) PublishAppUninstall

func (p *Publisher) PublishAppUninstall(ctx context.Context, event *AppUninstallEvent) error

func (*Publisher) PublishSessionCreate

func (p *Publisher) PublishSessionCreate(ctx context.Context, event *SessionCreateEvent) error

func (*Publisher) PublishSessionDelete

func (p *Publisher) PublishSessionDelete(ctx context.Context, event *SessionDeleteEvent) error

func (*Publisher) PublishSessionHibernate

func (p *Publisher) PublishSessionHibernate(ctx context.Context, event *SessionHibernateEvent) error

func (*Publisher) PublishSessionWake

func (p *Publisher) PublishSessionWake(ctx context.Context, event *SessionWakeEvent) error

func (*Publisher) PublishTemplateCreate

func (p *Publisher) PublishTemplateCreate(ctx context.Context, event *TemplateCreateEvent) error

func (*Publisher) PublishTemplateDelete

func (p *Publisher) PublishTemplateDelete(ctx context.Context, event *TemplateDeleteEvent) error

type ResourceSpec

type ResourceSpec struct {
	Memory string
	CPU    string
}

type SessionCreateEvent

type SessionCreateEvent struct {
	SessionID      string
	UserID         string
	TemplateID     string
	Platform       string
	Resources      ResourceSpec
	PersistentHome bool
	IdleTimeout    string
	TemplateConfig *TemplateConfig
}

type SessionDeleteEvent

type SessionDeleteEvent struct {
	SessionID string
	UserID    string
	Platform  string
}

type SessionHibernateEvent

type SessionHibernateEvent struct {
	SessionID string
	UserID    string
	Platform  string
}

type SessionWakeEvent

type SessionWakeEvent struct {
	SessionID string
	UserID    string
	Platform  string
}

type TemplateConfig

type TemplateConfig struct {
	Image         string
	StreamingPort int
	DisplayName   string
	Env           map[string]string
}

type TemplateCreateEvent

type TemplateCreateEvent struct {
	TemplateName string
	TemplateID   string // Alias for TemplateName
	Platform     string
	DisplayName  string
	Category     string
	BaseImage    string
}

type TemplateDeleteEvent

type TemplateDeleteEvent struct {
	TemplateName string
	Platform     string
}

Jump to

Keyboard shortcuts

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