Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit f00e0d3

Browse files
tristanlsDavid Chung
authored andcommitted
Problem: Unable to create non-Docker Group plugin alternative. (#394)
Signed-off-by: Tristan Slominski <[email protected]>
1 parent 913d307 commit f00e0d3

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

pkg/rpc/server/info.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ func NewPluginInfo(receiver interface{}) (*PluginInfo, error) {
4242
// Register registers an rpc-capable object for introspection and metadata service
4343
func (m *PluginInfo) Register(receiver interface{}) error {
4444
r := &reflector{target: receiver}
45-
if err := r.validate(); err != nil {
46-
return err
47-
}
4845
m.reflectors = append(m.reflectors, r)
4946
return nil
5047
}

pkg/rpc/server/reflector.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"net/http"
66
"reflect"
7-
"strings"
87
"time"
98
"unicode"
109
"unicode/utf8"
@@ -44,14 +43,6 @@ func (r *reflector) targetType() reflect.Type {
4443
return reflect.Indirect(reflect.ValueOf(r.target)).Type()
4544
}
4645

47-
func (r *reflector) validate() error {
48-
t := r.targetType()
49-
if !strings.Contains(t.PkgPath(), "github.com/docker/infrakit/pkg/rpc") {
50-
return fmt.Errorf("object not a standard plugin type: %v", t)
51-
}
52-
return nil
53-
}
54-
5546
// Interface returns the plugin type and version.
5647
func (r *reflector) Interface() spi.InterfaceSpec {
5748
if v, is := r.target.(VersionedInterface); is {

0 commit comments

Comments
 (0)