Repository navigation
v0.5.0
v0.5.0: the package layout release
The module is now split by audience, and every import arrow points from the more specific package to the more general one (#47):
durableis the handler contract and nothing else:Invocation,Failure,Fail,AwaitRun/AwaitAll/AwaitAny,HandlerandMiddlewarewith their result classifiers, the step references, theScheduleoptions a step uses to fan out children, and aliases of the shared vocabulary. Handler files import only this package.engineis the wiring side:engine.New, theWith*options,Start/Stop/Stats,Bind,Pipeline,Run,Result,Status.pipelinedefis the type-erased definition generated code builds andEngine.Bindvalidates.kernelis the shared leaf (identities, phases, outcomes, parks, failure records);storedriverandobserveno longer depend on the root.durabletest.NewInvocationis a fakeInvocationfor unit-testing handlers without an engine or a store.
Breaking changes and migration
durable.NewEngineisengine.New;Engine, theWith*options,Pipeline,Run,Result,Status,RunState,Clock,RetryPolicy,RetentionPolicy,ScheduleAnnotatorare inengine.ErrEngineNotStarted/ErrEngineStartedareengine.ErrNotStarted/engine.ErrStarted.InvocationandReduceVieware interfaces. Handler and middleware signatures takedurable.Invocationby value, not*durable.Invocation.NewDefinition,DefinitionConfig,StepConfigarepipelinedef.New,pipelinedef.Config,pipelinedef.Step;def.Bind(engine)isengine.Bind(def), which now validates and returns an error instead of the constructor panicking.StepRefandStateStepRefhave exported fields (Step,New);NewStepRef/NewStateStepRefarepipelinedef.StepRef/pipelinedef.StateStepRef.- Generated code must be regenerated with this version's
protoc-gen-durable(buf generate). - Middleware classifiers gained
AwaitTimeout,FailureCause, andFailureReasonbesideAwaitRequestandFailureInfo.
contrib/durableotel v0.5.0 is released in lockstep. The specification is at Draft 1.3.
Modules
github.com/dangra/durable@v0.5.0github.com/dangra/durable/contrib/durableotel@v0.5.0
What's Changed
- Spec Draft 1.2: parks, cancellation, drain, observability, API surface by @dangra in #46
- Extract the shared vocabulary: durable/kernel by @dangra in #48
- Invocation and ReduceView become interfaces by @dangra in #49
- Move the engine to its own package: durable/engine by @dangra in #50
- Extract the codegen adapter surface: durable/pipelinedef by @dangra in #51
- Docs: describe the v0.5 package layout (spec Draft 1.3) by @dangra in #52
- Schedule options and child-run errors belong to the handler contract by @dangra in #53
- Release v0.5.0 by @dangra in #54
Full Changelog: v0.4.0...v0.5.0