Documentation
¶
Overview ¶
Package activity owns durable activity observations independently of their views.
Index ¶
- type FrontendService
- func (f *FrontendService) Attach(ctx context.Context, id string) (sdk.Snapshot, error)
- func (f *FrontendService) BeginTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)
- func (f *FrontendService) ClearHistory(ctx context.Context) error
- func (f *FrontendService) FinishTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)
- func (f *FrontendService) Heartbeat(ctx context.Context, id string) error
- func (f *FrontendService) PublishMessage(ctx context.Context, sessionID, encoded string) (sdk.Record, error)
- func (f *FrontendService) ReportTask(ctx context.Context, sessionID, encoded string) (sdk.Record, error)
- func (f *FrontendService) RequestCancellation(ctx context.Context, id string) (sdk.Record, error)
- func (f *FrontendService) ResolveAlert(ctx context.Context, sessionID string, request sdk.ResolveAlertRequest) (sdk.Record, error)
- func (f *FrontendService) ServiceShutdown() error
- func (f *FrontendService) ServiceStartup(ctx context.Context, _ application.ServiceOptions) error
- func (f *FrontendService) SetPresentation(ctx context.Context, request sdk.SetPresentationRequest) (sdk.Record, error)
- func (f *FrontendService) Snapshot(ctx context.Context) (sdk.Snapshot, error)
- func (f *FrontendService) StartResourceAction(ctx context.Context, encoded string) (sdk.Record, error)
- func (f *FrontendService) Subscribe(ctx context.Context) (sdk.Subscription, error)
- func (f *FrontendService) Unsubscribe(ctx context.Context, id string) error
- func (f *FrontendService) UpsertAlert(ctx context.Context, sessionID, encoded string) (sdk.Record, error)
- type Service
- func (s *Service) ActivateProducer(owner string) error
- func (s *Service) Attach(owner, id string) (sdk.Snapshot, error)
- func (s *Service) BeginOwnedTask(owner string, spec sdk.Spec, cancel func() error) (sdk.Record, error)
- func (s *Service) ClearHistory() error
- func (s *Service) DropSubscriptions(owner string)
- func (s *Service) FinishOwnedTask(owner string, req sdk.FinishTaskRequest) (sdk.Record, error)
- func (s *Service) ReportOwnedTask(owner string, req sdk.ReportTaskRequest) (sdk.Record, error)
- func (s *Service) Reporter(pluginID, generation string) sdk.Reporter
- func (s *Service) RequestCancellation(id string) (sdk.Record, error)
- func (s *Service) RetireProducer(pluginID, generation string) error
- func (s *Service) SetActionStarter(fn func(context.Context, sdk.StartResourceActionRequest) (sdk.Record, error))
- func (s *Service) SetPresentation(req sdk.SetPresentationRequest) (sdk.Record, error)
- func (s *Service) Shutdown() error
- func (s *Service) Snapshot() sdk.Snapshot
- func (s *Service) StartResourceAction(ctx context.Context, r sdk.StartResourceActionRequest) (sdk.Record, error)
- func (s *Service) Subscribe(owner string) (sdk.Subscription, error)
- func (s *Service) Unsubscribe(owner, id string) error
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.ContextScope
// 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 ¶
Attach arms publication under the same lock used to capture the snapshot. Clients install their subscription listener before calling this barrier.
func (*FrontendService) ClearHistory ¶
func (f *FrontendService) ClearHistory(ctx context.Context) error
func (*FrontendService) FinishTask ¶
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 (*FrontendService) ReportTask ¶
func (*FrontendService) RequestCancellation ¶
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) StartResourceAction ¶
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 ¶
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 (*Service) ActivateProducer ¶
ActivateProducer admits a live identity. Retirement removes the identity rather than retaining an unbounded blacklist; old callbacks fail closed thereafter.
func (*Service) BeginOwnedTask ¶
func (*Service) ClearHistory ¶
func (*Service) DropSubscriptions ¶
func (*Service) FinishOwnedTask ¶
func (*Service) ReportOwnedTask ¶
func (*Service) RequestCancellation ¶
func (*Service) RetireProducer ¶
RetireProducer fences late reports and records lost observations as unknown.