Skip to content

Commit e1cb47a

Browse files
authored
interface Runtime Resources (#5448)
1 parent 554771a commit e1cb47a

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright (c) Mondoo, Inc.
2+
// SPDX-License-Identifier: BUSL-1.1
3+
package plugin
4+
5+
type Resources[T any] interface {
6+
Get(key string) (T, bool)
7+
Set(key string, value T)
8+
}

providers-sdk/v1/plugin/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
type Runtime struct {
1616
Connection Connection
17-
Resources *syncx.Map[Resource]
17+
Resources Resources[Resource]
1818
Callback ProviderCallback
1919
HasRecording bool
2020
CreateResource CreateNamedResource

0 commit comments

Comments
 (0)