Skip to content

Commit

Permalink
refactor: replace inmemoryprovider with inlineprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Apr 28, 2024
1 parent 4f8a992 commit 300ded9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 46 deletions.
43 changes: 0 additions & 43 deletions common/configuration/in_memory_provider.go

This file was deleted.

2 changes: 1 addition & 1 deletion go-runtime/modulecontext/from_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func FromProto(ctx context.Context, response *ftlv1.ModuleContextResponse) (*Mod
}

func newInMemoryConfigManager[R cf.Role](ctx context.Context, config map[string][]byte) (*cf.Manager[R], error) {
provider := cf.NewInMemoryProvider[R]()
provider := cf.InlineProvider[R]{}
refs := map[cf.Ref]*url.URL{}
for name, data := range config {
ref := cf.Ref{Name: name}
Expand Down
4 changes: 2 additions & 2 deletions go-runtime/modulecontext/module_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func TestConfigPriority(t *testing.T) {

moduleName := "test"

cp := cf.NewInMemoryProvider[cf.Configuration]()
cp := cf.InlineProvider[cf.Configuration]{}
cr := cf.NewInMemoryResolver[cf.Configuration]()
cm, err := cf.New(ctx, cr, []cf.Provider[cf.Configuration]{cp})
assert.NoError(t, err)
ctx = cf.ContextWithConfig(ctx, cm)

sp := cf.NewInMemoryProvider[cf.Secrets]()
sp := cf.InlineProvider[cf.Secrets]{}
sr := cf.NewInMemoryResolver[cf.Secrets]()
sm, err := cf.New(ctx, sr, []cf.Provider[cf.Secrets]{sp})
assert.NoError(t, err)
Expand Down

0 comments on commit 300ded9

Please sign in to comment.