Skip to content

Commit b0cdf70

Browse files
authored
Rename diag interface
1 parent 0607b11 commit b0cdf70

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

backend/redis/diagnostics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/go-redis/redis/v8"
1010
)
1111

12-
var _ web.WebBackend = (*redisBackend)(nil)
12+
var _ web.Backend = (*redisBackend)(nil)
1313

1414
func (rb *redisBackend) GetWorkflowInstances(ctx context.Context, afterInstanceID string, count int) ([]*web.WorkflowInstanceRef, error) {
1515
max := "+inf"

backend/sqlite/diagnostics.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import (
1010
"github.com/cschleiden/go-workflows/web"
1111
)
1212

13+
var _ web.Backend = (*sqliteBackend)(nil)
14+
1315
func (sb *sqliteBackend) GetWorkflowInstances(ctx context.Context, afterInstanceID string, count int) ([]*web.WorkflowInstanceRef, error) {
1416
tx, err := sb.db.BeginTx(ctx, nil)
1517
if err != nil {

web/web.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type WorkflowInstanceInfo struct {
3737
History []*Event `json:"history,omitempty"`
3838
}
3939

40-
type WebBackend interface {
40+
type Backend interface {
4141
backend.Backend
4242

4343
GetWorkflowInstance(ctx context.Context, instanceID string) (*WorkflowInstanceRef, error)
@@ -47,7 +47,7 @@ type WebBackend interface {
4747
//go:embed app/build
4848
var embeddedFiles embed.FS
4949

50-
func NewMux(backend WebBackend) *http.ServeMux {
50+
func NewMux(backend Backend) *http.ServeMux {
5151
mux := http.NewServeMux()
5252

5353
// API

0 commit comments

Comments
 (0)