Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

EventingSubscriberRegistrationContext

Handle
📦 Aspire.Hosting v17.0.0

Context passed to ATS-friendly eventing subscriber registrations.

type EventingSubscriberRegistrationContext interface{}

Properties

propertyCancellationToken*CancellationTokenget
The cancellation token associated with the subscriber registration.
CancellationToken() (*CancellationToken, error)
propertyExecutionContextDistributedApplicationExecutionContextget
The execution context for the AppHost invocation.
ExecutionContext() DistributedApplicationExecutionContext

Methods

Subscribes to the AfterPublish event from an eventing subscriber registration context.
OnAfterPublish(callback func(arg AfterPublishEvent)) DistributedApplicationEventSubscription
callbackfunc(arg AfterPublishEvent)callbackThe callback to invoke when the event fires.
DistributedApplicationEventSubscription

The event subscription.

Returns a handle; failures surface later via Err().

Subscribes to the AfterResourcesCreated event from an eventing subscriber registration context.
OnAfterResourcesCreated(callback func(arg AfterResourcesCreatedEvent)) DistributedApplicationEventSubscription
callbackfunc(arg AfterResourcesCreatedEvent)callbackThe callback to invoke when the event fires.
DistributedApplicationEventSubscription

The event subscription.

Returns a handle; failures surface later via Err().

Subscribes to the BeforePublish event from an eventing subscriber registration context.
OnBeforePublish(callback func(arg BeforePublishEvent)) DistributedApplicationEventSubscription
callbackfunc(arg BeforePublishEvent)callbackThe callback to invoke when the event fires.
DistributedApplicationEventSubscription

The event subscription.

Returns a handle; failures surface later via Err().

Subscribes to the BeforeStart event from an eventing subscriber registration context.
OnBeforeStart(callback func(arg BeforeStartEvent)) DistributedApplicationEventSubscription
callbackfunc(arg BeforeStartEvent)callbackThe callback to invoke when the event fires.
DistributedApplicationEventSubscription

The event subscription.

Returns a handle; failures surface later via Err().