activity

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 22 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 activity owns durable activity observations independently of their views.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontendService

type FrontendService struct {
	Service *Service
	Realm   *invocation.Scope
	// contains filtered or unexported fields
}

FrontendService admits only native host-window calls. A subscription ID is also an unguessable producer-session capability, bound to its issuing native window. This keeps document reloads and different webviews from renewing each other's report-only work. The capability never grants plugin producer authority.

func (*FrontendService) Attach

func (f *FrontendService) Attach(ctx context.Context, id string) (sdk.Snapshot, error)

Attach arms publication under the same lock used to capture the snapshot. Clients install their subscription listener before calling this barrier.

func (*FrontendService) BeginTask

func (f *FrontendService) BeginTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)

func (*FrontendService) ClearHistory

func (f *FrontendService) ClearHistory(ctx context.Context) error

func (*FrontendService) FinishTask

func (f *FrontendService) FinishTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)

func (*FrontendService) Heartbeat

func (f *FrontendService) Heartbeat(ctx context.Context, id string) error

Heartbeat renews only the specified document's report-only producer lease.

func (*FrontendService) PublishMessage

func (f *FrontendService) PublishMessage(ctx context.Context, sessionID, encoded string) (sdk.Record, error)

func (*FrontendService) ReportTask

func (f *FrontendService) ReportTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)

func (*FrontendService) RequestCancellation

func (f *FrontendService) RequestCancellation(ctx context.Context, id string) (sdk.Record, error)

func (*FrontendService) ResolveAlert

func (f *FrontendService) ResolveAlert(ctx context.Context, sessionID string, request sdk.ResolveAlertRequest) (sdk.Record, error)

func (*FrontendService) ServiceShutdown

func (f *FrontendService) ServiceShutdown() error

func (*FrontendService) ServiceStartup

func (f *FrontendService) ServiceStartup(ctx context.Context, _ application.ServiceOptions) error

func (*FrontendService) SetPresentation

func (f *FrontendService) SetPresentation(ctx context.Context, request sdk.SetPresentationRequest) (sdk.Record, error)

func (*FrontendService) Snapshot

func (f *FrontendService) Snapshot(ctx context.Context) (sdk.Snapshot, error)

func (*FrontendService) StartResourceAction

func (f *FrontendService) StartResourceAction(ctx context.Context, encoded string) (sdk.Record, error)

func (*FrontendService) Subscribe

func (f *FrontendService) Subscribe(ctx context.Context) (sdk.Subscription, error)

func (*FrontendService) Unsubscribe

func (f *FrontendService) Unsubscribe(ctx context.Context, id string) error

Unsubscribe removes a view, never cancels work or immediately retires producers.

func (*FrontendService) UpsertAlert

func (f *FrontendService) UpsertAlert(ctx context.Context, sessionID, encoded string) (sdk.Record, error)

type Service

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

Service serializes persistence and publication. An event never precedes its durable commit.

func NewService

func NewService(root *appstate.ScopedRoot, emit func(string, sdk.Change)) (*Service, error)

func (*Service) ActivateProducer

func (s *Service) ActivateProducer(owner string) error

ActivateProducer admits a live identity. Retirement removes the identity rather than retaining an unbounded blacklist; old callbacks fail closed thereafter.

func (*Service) Attach

func (s *Service) Attach(owner, id string) (sdk.Snapshot, error)

func (*Service) BeginOwnedTask

func (s *Service) BeginOwnedTask(owner string, spec sdk.Spec, cancel func() error) (sdk.Record, error)

func (*Service) ClearHistory

func (s *Service) ClearHistory() error

func (*Service) DropSubscriptions

func (s *Service) DropSubscriptions(owner string)

func (*Service) FinishOwnedTask

func (s *Service) FinishOwnedTask(owner string, req sdk.FinishTaskRequest) (sdk.Record, error)

func (*Service) ReportOwnedTask

func (s *Service) ReportOwnedTask(owner string, req sdk.ReportTaskRequest) (sdk.Record, error)

func (*Service) Reporter

func (s *Service) Reporter(pluginID, generation string) sdk.Reporter

func (*Service) RequestCancellation

func (s *Service) RequestCancellation(id string) (sdk.Record, error)

func (*Service) RetireProducer

func (s *Service) RetireProducer(pluginID, generation string) error

RetireProducer fences late reports and records lost observations as unknown.

func (*Service) SetActionStarter

func (s *Service) SetActionStarter(fn func(context.Context, sdk.StartResourceActionRequest) (sdk.Record, error))

func (*Service) SetPresentation

func (s *Service) SetPresentation(req sdk.SetPresentationRequest) (sdk.Record, error)

func (*Service) Shutdown

func (s *Service) Shutdown() error

func (*Service) Snapshot

func (s *Service) Snapshot() sdk.Snapshot

func (*Service) StartResourceAction

func (s *Service) StartResourceAction(ctx context.Context, r sdk.StartResourceActionRequest) (sdk.Record, error)

func (*Service) Subscribe

func (s *Service) Subscribe(owner string) (sdk.Subscription, error)

func (*Service) Unsubscribe

func (s *Service) Unsubscribe(owner, id string) error

Jump to

Keyboard shortcuts

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