File tree 2 files changed +7
-6
lines changed
rpc/cc/arduino/cli/commands/v1
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,6 @@ type CoreInstance struct {
60
60
lm * librariesmanager.LibrariesManager
61
61
}
62
62
63
- // InstanceContainer FIXMEDOC
64
- type InstanceContainer interface {
65
- GetInstance () * rpc.Instance
66
- }
67
-
68
63
// GetInstance returns a CoreInstance for the given ID, or nil if ID
69
64
// doesn't exist
70
65
func GetInstance (id int32 ) * CoreInstance {
@@ -86,7 +81,7 @@ func GetPackageManager(id int32) *packagemanager.PackageManager {
86
81
// GetPackageManagerExplorer returns a new package manager Explorer. The
87
82
// explorer holds a read lock on the underlying PackageManager and it should
88
83
// be released by calling the returned "release" function.
89
- func GetPackageManagerExplorer (instance InstanceContainer ) (explorer * packagemanager.Explorer , release func ()) {
84
+ func GetPackageManagerExplorer (instance rpc. InstanceCommand ) (explorer * packagemanager.Explorer , release func ()) {
90
85
i := GetInstance (instance .GetInstance ().GetId ())
91
86
if i == nil {
92
87
return nil , nil
Original file line number Diff line number Diff line change @@ -20,3 +20,9 @@ type DownloadProgressCB func(curr *DownloadProgress)
20
20
21
21
// TaskProgressCB is a callback to receive progress messages
22
22
type TaskProgressCB func (msg * TaskProgress )
23
+
24
+ // InstanceCommand is an interface thar represents a gRPC command with
25
+ // a gRPC Instance.
26
+ type InstanceCommand interface {
27
+ GetInstance () * Instance
28
+ }
You can’t perform that action at this time.
0 commit comments