diff --git a/internal/interceptor.go b/internal/interceptor.go index db110074c..c7848ad2b 100644 --- a/internal/interceptor.go +++ b/internal/interceptor.go @@ -249,6 +249,8 @@ type WorkflowOutboundInterceptor interface { NewTimer(ctx Context, d time.Duration) Future // NewTimer intercepts workflow.NewTimerWithOptions. + // + // NOTE: Experimental NewTimerWithOptions(ctx Context, d time.Duration, options TimerOptions) Future // Sleep intercepts workflow.Sleep. @@ -331,7 +333,8 @@ type WorkflowOutboundInterceptor interface { // // NOTE: Experimental ExecuteNexusOperation(ctx Context, input ExecuteNexusOperationInput) NexusOperationFuture - // RequestCancelNexusOperation intercepts Nexus Operation cancelation via context. + + // RequestCancelNexusOperation intercepts Nexus Operation cancellation via context. // // NOTE: Experimental RequestCancelNexusOperation(ctx Context, input RequestCancelNexusOperationInput) diff --git a/internal/interceptor_base.go b/internal/interceptor_base.go index c4465faf9..f99295707 100644 --- a/internal/interceptor_base.go +++ b/internal/interceptor_base.go @@ -259,6 +259,8 @@ func (w *WorkflowOutboundInterceptorBase) NewTimer(ctx Context, d time.Duration) } // NewTimerWithOptions implements WorkflowOutboundInterceptor.NewTimerWithOptions. +// +// NOTE: Experimental func (w *WorkflowOutboundInterceptorBase) NewTimerWithOptions( ctx Context, d time.Duration, diff --git a/internal/workflow.go b/internal/workflow.go index 0f3223f9e..55c27c543 100644 --- a/internal/workflow.go +++ b/internal/workflow.go @@ -448,6 +448,8 @@ type ( } // TimerOptions are options set when creating a timer. + // + // NOTE: Experimental TimerOptions struct { // Summary is a simple string identifying this timer. While it can be // normal text, it is best to treat as a timer ID. This value will be diff --git a/workflow/deterministic_wrappers.go b/workflow/deterministic_wrappers.go index 0a4c78d7e..dbe8dde3c 100644 --- a/workflow/deterministic_wrappers.go +++ b/workflow/deterministic_wrappers.go @@ -69,6 +69,8 @@ type ( Semaphore = internal.Semaphore // TimerOptions are options for [NewTimerWithOptions] + // + // NOTE: Experimental TimerOptions = internal.TimerOptions ) @@ -199,6 +201,8 @@ func NewTimer(ctx Context, d time.Duration) Future { // use this NewTimerWithOptions() to get the timer, instead of Go's timer.NewTimer(). You can cancel the pending timer // by canceling the Context (using the context from workflow.WithCancel(ctx)) and that will cancel the timer. After the // timer is canceled, the returned Future becomes ready, and Future.Get() will return *CanceledError. +// +// NOTE: Experimental func NewTimerWithOptions(ctx Context, d time.Duration, options TimerOptions) Future { return internal.NewTimerWithOptions(ctx, d, options) }