Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure alternate backend for Dapr workflow #7283

Merged
merged 118 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
a268941
Configurable workflow backend
ASHIQUEMD Dec 7, 2023
6ac2446
Configurable workflow backend
ASHIQUEMD Dec 7, 2023
5ec0c99
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
bbfcf0a
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
a3f1a46
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
b5bae45
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
a714240
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
db59558
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
e82245d
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
0e1c879
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
dc0398e
Configurable workflow backend
ASHIQUEMD Dec 8, 2023
f52a14e
Configurable workflow backend
ASHIQUEMD Dec 11, 2023
02b3d2f
Configurable workflow backend
ASHIQUEMD Dec 11, 2023
ae83dd9
Configurable workflow backend
ASHIQUEMD Dec 11, 2023
cea5dec
Configurable workflow backend
ASHIQUEMD Dec 12, 2023
49f9689
Configurable workflow backend
ASHIQUEMD Dec 12, 2023
deb8e77
Configurable workflow backend
ASHIQUEMD Dec 12, 2023
a0720aa
Configurable workflow backend
ASHIQUEMD Dec 13, 2023
7e651aa
Configurable workflow backend
ASHIQUEMD Dec 13, 2023
57f4aa4
Configurable workflow backend
ASHIQUEMD Dec 13, 2023
3821c30
Update pkg/runtime/runtime.go
ASHIQUEMD Dec 14, 2023
c21daf6
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
f91308c
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Dec 14, 2023
893311c
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
a7bc093
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
c47ff93
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
2cdb961
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
b74b305
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
fe06f2c
Configurable workflow backend
ASHIQUEMD Dec 14, 2023
7dc066c
Configurable workflow backend
ASHIQUEMD Dec 15, 2023
32678ed
Configurable workflow backend
ASHIQUEMD Dec 15, 2023
8167ee5
Adding e2e tests for sqlite
ASHIQUEMD Dec 15, 2023
4a66764
Create workflow backend component
ASHIQUEMD Dec 18, 2023
ef6b391
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Dec 18, 2023
e0e76b9
fix unit tests
ASHIQUEMD Dec 18, 2023
2a8a920
fix unit tests
ASHIQUEMD Dec 18, 2023
0ad09af
fix unit tests
ASHIQUEMD Dec 18, 2023
0790ddc
fix unit tests
ASHIQUEMD Dec 18, 2023
f23fe64
fix unit tests
ASHIQUEMD Dec 18, 2023
40df24e
fix unit tests
ASHIQUEMD Dec 18, 2023
e93a05a
fix unit tests
ASHIQUEMD Dec 18, 2023
843d979
perf test build issue
ASHIQUEMD Dec 18, 2023
28bd9b8
Add perf test for sqlite backend
ASHIQUEMD Dec 18, 2023
f8ae3dc
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Dec 19, 2023
e7eaf09
Moving component-contrib changes to dapr/dapr
ASHIQUEMD Dec 19, 2023
18a4f51
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Dec 19, 2023
38ae34d
Moving component-contrib changes to dapr/dapr
ASHIQUEMD Dec 20, 2023
98a431c
fix merge conflicts
ASHIQUEMD Dec 20, 2023
099caaf
Initialize dtf-go backen in the dtf-go library
ASHIQUEMD Dec 20, 2023
60190ea
Initialize dtf-go backen in the dtf-go library
ASHIQUEMD Dec 20, 2023
918bfb6
Initialize dtf-go backen in the dtf-go library
ASHIQUEMD Dec 20, 2023
6b48eff
Initialize dtf-go backend in dapr itself
ASHIQUEMD Dec 22, 2023
39f6aa2
remove visual studio solution file
ASHIQUEMD Dec 22, 2023
341fb5a
remove visual studio solution file
ASHIQUEMD Dec 22, 2023
e30503e
rename wbe to wfbe
ASHIQUEMD Dec 22, 2023
7f77985
fix merge conflict
ASHIQUEMD Dec 22, 2023
ff873dc
renaming backend file to actor_backend
ASHIQUEMD Dec 22, 2023
437c32f
fix link error
ASHIQUEMD Dec 22, 2023
8d476d1
Update pkg/runtime/wfengine/wfengine_backend_test.go
ASHIQUEMD Dec 26, 2023
9ff3dd8
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Dec 26, 2023
09e53e4
Add workflow backend
ASHIQUEMD Dec 26, 2023
af156c5
Fixed workflow backend ready issue
ASHIQUEMD Dec 27, 2023
fa5d46b
modifying perf test to run only for one backed at a time, by default …
ASHIQUEMD Dec 27, 2023
979e06c
modifying perf test to run only for one backed at a time, by default …
ASHIQUEMD Dec 27, 2023
2bca99b
Added unit test
ASHIQUEMD Dec 28, 2023
d3eb01a
Added unit test
ASHIQUEMD Dec 28, 2023
fc74a43
Added unit test
ASHIQUEMD Dec 28, 2023
f06b2b8
Added unit test
ASHIQUEMD Dec 28, 2023
501099a
moving sqlite to its own component file
ASHIQUEMD Dec 29, 2023
e9ea0b6
add map structure for sqlite options
ASHIQUEMD Dec 29, 2023
5c9a180
add map structure for sqlite options
ASHIQUEMD Dec 29, 2023
22c3e12
Implemented workflow backend drop in
ASHIQUEMD Dec 29, 2023
b895d10
fixed lint error
ASHIQUEMD Dec 29, 2023
acc8d59
Update cmd/daprd/components/wfbackend_actor.go
ASHIQUEMD Jan 2, 2024
6e267cf
Update pkg/runtime/wfengine/sqlite_backend.go
ASHIQUEMD Jan 2, 2024
ceed13b
Update pkg/runtime/wfengine/sqlite_backend.go
ASHIQUEMD Jan 2, 2024
8735a1d
fixed review comments
ASHIQUEMD Jan 2, 2024
fb71505
fixed review comments
ASHIQUEMD Jan 2, 2024
2ebf186
fixed review comments
ASHIQUEMD Jan 2, 2024
5872e74
fixed unit tests
ASHIQUEMD Jan 2, 2024
b9b7b7c
Update pkg/components/wfbackend/metadata.go
ASHIQUEMD Jan 2, 2024
0dc095e
Update pkg/components/wfbackend/registry.go
ASHIQUEMD Jan 2, 2024
45d07d9
Remove space from log messsages
ASHIQUEMD Jan 2, 2024
1375825
return error on backend component parsing failure
ASHIQUEMD Jan 2, 2024
59b1b9a
WIP: Ensure backends can be loaded via drop-in
ItalyPaleAle Jan 2, 2024
18e5e87
Various fixes
ItalyPaleAle Jan 2, 2024
cc9c44d
Various fixes
ItalyPaleAle Jan 3, 2024
95963e3
Merge branch 'master' of https://github.com/dapr/dapr into dapr-workf…
ItalyPaleAle Jan 3, 2024
b4b4fab
removing duplicate actors variable
ASHIQUEMD Jan 5, 2024
a35821a
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 5, 2024
e0877fe
fix merge conflict
ASHIQUEMD Jan 9, 2024
2821ff7
fix merge conflict
ASHIQUEMD Jan 9, 2024
47ced82
fix merge conflict
ASHIQUEMD Jan 9, 2024
765d2b4
commenting monitor test to check if thats creating issue with e2e test
ASHIQUEMD Jan 9, 2024
2c99e0e
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 9, 2024
8d37f1b
commenting monitor test to check if thats creating issue with e2e test
ASHIQUEMD Jan 9, 2024
7a052d4
Merge branch 'dapr-workflow-backend' of https://github.com/ASHIQUEMD/…
ASHIQUEMD Jan 9, 2024
60dea2e
run only sqlite test
ASHIQUEMD Jan 9, 2024
37b298a
fix wf backend test
ASHIQUEMD Jan 9, 2024
917812a
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 10, 2024
c7a095b
Update Dockerfile
ASHIQUEMD Jan 10, 2024
4ad6a28
Merge branch 'master' into dapr-workflow-backend
ItalyPaleAle Jan 10, 2024
9449484
making sqlite backend only available for unit/e2e/integration/perf te…
ASHIQUEMD Jan 11, 2024
06b32fc
making sqlite backend only available for unit/e2e/integration/perf te…
ASHIQUEMD Jan 11, 2024
11d76c6
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 11, 2024
702d822
making sqlite backend only available for unit/e2e/integration/perf te…
ASHIQUEMD Jan 11, 2024
1b0f5ef
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 11, 2024
10600e8
fix merge conflict
ASHIQUEMD Jan 11, 2024
5a2271c
fix merge conflict
ASHIQUEMD Jan 11, 2024
bea6f2f
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 11, 2024
1b8fc1b
Change build tag to wfbackendsqlite
ASHIQUEMD Jan 12, 2024
61e6cb0
removing DAPR_GO_BUILD_TAGS=wfbackendsqlite as it will come from http…
ASHIQUEMD Jan 12, 2024
312d92d
Merge branch 'master' into dapr-workflow-backend
mukundansundar Jan 12, 2024
2ec08e1
fix merge conflict
ASHIQUEMD Jan 12, 2024
3a3fb33
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 12, 2024
da5607f
fix merge conflict
ASHIQUEMD Jan 13, 2024
79877a3
Merge branch 'master' into dapr-workflow-backend
ItalyPaleAle Jan 13, 2024
2235958
Merge branch 'master' into dapr-workflow-backend
ASHIQUEMD Jan 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 27 additions & 0 deletions cmd/daprd/components/wfbackend_actors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//go:build allcomponents || stablecomponents

/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package components

import (
wfbeLoader "github.com/dapr/dapr/pkg/components/wfbackend"
"github.com/dapr/dapr/pkg/runtime/wfengine/backends/actors"
)

func init() {
// Note that the actors backend is always enabled, even if this file is deleted
// This component is still registered here to allow users to explicitly instantiate the actors backend
wfbeLoader.DefaultRegistry.RegisterComponent(actors.NewActorBackend, "actor", "actors")
}
25 changes: 25 additions & 0 deletions cmd/daprd/components/wfbackend_sqlite.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//go:build allcomponents || stablecomponents

/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package components

import (
wfbeLoader "github.com/dapr/dapr/pkg/components/wfbackend"
"github.com/dapr/dapr/pkg/runtime/wfengine/backends/sqlite"
)

func init() {
wfbeLoader.DefaultRegistry.RegisterComponent(sqlite.NewSQLiteBackend, "sqlite")
}
5 changes: 4 additions & 1 deletion cmd/daprd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
pubsubLoader "github.com/dapr/dapr/pkg/components/pubsub"
secretstoresLoader "github.com/dapr/dapr/pkg/components/secretstores"
stateLoader "github.com/dapr/dapr/pkg/components/state"
wfbeLoader "github.com/dapr/dapr/pkg/components/wfbackend"
workflowsLoader "github.com/dapr/dapr/pkg/components/workflows"
"github.com/dapr/dapr/pkg/modes"
"github.com/dapr/dapr/pkg/runtime"
Expand Down Expand Up @@ -91,6 +92,7 @@ func main() {
nrLoader.DefaultRegistry.Logger = logContrib
bindingsLoader.DefaultRegistry.Logger = logContrib
workflowsLoader.DefaultRegistry.Logger = logContrib
wfbeLoader.DefaultRegistry.Logger = logContrib
httpMiddlewareLoader.DefaultRegistry.Logger = log // Note this uses log on purpose

reg := registry.NewOptions().
Expand All @@ -103,7 +105,8 @@ func main() {
WithBindings(bindingsLoader.DefaultRegistry).
WithCryptoProviders(cryptoLoader.DefaultRegistry).
WithHTTPMiddlewares(httpMiddlewareLoader.DefaultRegistry).
WithWorkflows(workflowsLoader.DefaultRegistry)
WithWorkflows(workflowsLoader.DefaultRegistry).
WithWorkflowBackends(wfbeLoader.DefaultRegistry)
ASHIQUEMD marked this conversation as resolved.
Show resolved Hide resolved

ctx := signals.Context()
secProvider, err := security.New(ctx, security.Options{
Expand Down
21 changes: 11 additions & 10 deletions pkg/components/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ type Category string

// supported components category
const (
CategoryBindings Category = "bindings"
CategoryPubSub Category = "pubsub"
CategorySecretStore Category = "secretstores"
CategoryStateStore Category = "state"
CategoryWorkflow Category = "workflow"
CategoryMiddleware Category = "middleware"
CategoryConfiguration Category = "configuration"
CategoryCryptoProvider Category = "crypto"
CategoryLock Category = "lock"
CategoryNameResolution Category = "nameresolution"
CategoryBindings Category = "bindings"
CategoryPubSub Category = "pubsub"
CategorySecretStore Category = "secretstores"
CategoryStateStore Category = "state"
CategoryWorkflow Category = "workflow"
CategoryWorkflowBackend Category = "workflowbackend"
CategoryMiddleware Category = "middleware"
CategoryConfiguration Category = "configuration"
CategoryCryptoProvider Category = "crypto"
CategoryLock Category = "lock"
CategoryNameResolution Category = "nameresolution"
)
2 changes: 1 addition & 1 deletion pkg/components/state/pluggable.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
defer ss.lock.Unlock()

// Check the cached value again in case another goroutine set it
if multiMaxSize != nil {
if multiMaxSize != nil {

Check warning on line 347 in pkg/components/state/pluggable.go

View check run for this annotation

Codecov / codecov/patch

pkg/components/state/pluggable.go#L347

Added line #L347 was not covered by tests
return *multiMaxSize
}

Expand Down
26 changes: 26 additions & 0 deletions pkg/components/wfbackend/metadata.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package wfbackend

import (
"github.com/dapr/components-contrib/metadata"
)

// Metadata represents a set of properties specific for workflow backends.
type Metadata struct {
metadata.Base `json:",inline"`

// Dapr app ID
AppID string
}
86 changes: 86 additions & 0 deletions pkg/components/wfbackend/registry.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package wfbackend

import (
"fmt"
"strings"

"github.com/microsoft/durabletask-go/backend"

"github.com/dapr/dapr/pkg/components"
"github.com/dapr/kit/logger"
)

// Registry is an interface for a component that returns registered workflow backend implementations.
type Registry struct {
Logger logger.Logger
workflowBackendComponents map[string]WorkflowBackend
}

// DefaultRegistry is the singleton with the registry.
var DefaultRegistry *Registry = NewRegistry()

// NewRegistry is used to create workflow registry.
func NewRegistry() *Registry {
return &Registry{
workflowBackendComponents: make(map[string]WorkflowBackend),
}
}

// RegisterComponent adds a new workflow to the registry.
func (s *Registry) RegisterComponent(componentFactory WorkflowBackend, names ...string) {
for _, name := range names {
s.workflowBackendComponents[createFullName(name)] = componentFactory
}
}

func (s *Registry) Create(name, version, logName string) (func(Metadata) (backend.Backend, error), error) {
if method, ok := s.getWorkflowBackendComponent(name, version, logName); ok {
return method, nil
}
return nil, fmt.Errorf("couldn't find wokflow backend %s/%s", name, version)
}

func (s *Registry) getWorkflowBackendComponent(name, version, logName string) (func(Metadata) (backend.Backend, error), bool) {
nameLower := strings.ToLower(name)
versionLower := strings.ToLower(version)
workflowFn, ok := s.workflowBackendComponents[nameLower+"/"+versionLower]
if ok {
return s.wrapFn(workflowFn, logName), true
}
if components.IsInitialVersion(versionLower) {
workflowFn, ok = s.workflowBackendComponents[nameLower]
if ok {
return s.wrapFn(workflowFn, logName), true
}
}
return nil, false
}

func (s *Registry) wrapFn(componentFactory WorkflowBackend, logName string) func(Metadata) (backend.Backend, error) {
return func(m Metadata) (backend.Backend, error) {
l := s.Logger
if logName != "" && l != nil {
l = l.WithFields(map[string]any{
"component": logName,
})
}
return componentFactory(m, l)
}
}

func createFullName(name string) string {
return strings.ToLower("workflowbackend." + name)
}
106 changes: 106 additions & 0 deletions pkg/components/wfbackend/registry_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package wfbackend_test

import (
"fmt"
"strings"
"testing"

"github.com/microsoft/durabletask-go/backend"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

wbe "github.com/dapr/dapr/pkg/components/wfbackend"
"github.com/dapr/kit/logger"
)

type mockWorkflowBackend struct {
backend.Backend
}

func TestRegistry(t *testing.T) {
testRegistry := wbe.NewRegistry()

t.Run("workflow backend is registered", func(t *testing.T) {
const (
backendName = "testbackendname"
backendNameV2 = "testbackendname/v2"
componentType = "workflowbackend." + backendName
)

// Initiate mock object
wbeMock := &mockWorkflowBackend{}
wbeMockV2 := &mockWorkflowBackend{}
md := wbe.Metadata{}

// act
testRegistry.RegisterComponent(func(_ wbe.Metadata, _ logger.Logger) (backend.Backend, error) {
return wbeMock, nil
}, backendName)
testRegistry.RegisterComponent(func(_ wbe.Metadata, _ logger.Logger) (backend.Backend, error) {
return wbeMockV2, nil
}, backendNameV2)

// assert v0 and v1
wbeFn, err := testRegistry.Create(componentType, "v0", "")
require.NoError(t, err)
wbe, err := wbeFn(md)
require.NoError(t, err)
assert.Same(t, wbeMock, wbe)

wbeFn, err = testRegistry.Create(componentType, "v1", "")
require.NoError(t, err)
wbe, err = wbeFn(md)
require.NoError(t, err)
assert.Same(t, wbeMock, wbe)

// assert v2
wbeFn, err = testRegistry.Create(componentType, "v2", "")
require.NoError(t, err)
wbe, err = wbeFn(md)
require.NoError(t, err)
assert.Same(t, wbeMockV2, wbe)

// check case-insensitivity
wbeFn, err = testRegistry.Create(strings.ToUpper(componentType), "V2", "")
require.NoError(t, err)
wbe, err = wbeFn(md)
require.NoError(t, err)
assert.Same(t, wbeMockV2, wbe)

// check case-insensitivity
testRegistry.Logger = logger.NewLogger("wfengine.backend")
wbeFn, err = testRegistry.Create(strings.ToUpper(componentType), "V2", "workflowbackendlog")
require.NoError(t, err)
wbe, err = wbeFn(md)
require.NoError(t, err)
assert.Same(t, wbeMockV2, wbe)
})

t.Run("workflow backend is not registered", func(t *testing.T) {
const (
backendName = "fakeBackend"
componentType = "workflowbackend." + backendName
)

// act
wbe, actualError := testRegistry.Create(componentType, "v1", "")
expectedError := fmt.Errorf("couldn't find wokflow backend %s/v1", componentType)

// assert
assert.Nil(t, wbe)
assert.Equal(t, expectedError.Error(), actualError.Error())
})
}
23 changes: 23 additions & 0 deletions pkg/components/wfbackend/wfbackend.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2021 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package wfbackend

import (
"github.com/microsoft/durabletask-go/backend"

"github.com/dapr/kit/logger"
)

// WorkflowBackend is a function that returns a workflow backend
type WorkflowBackend = func(Metadata, logger.Logger) (backend.Backend, error)