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

Commit

Permalink
Problem: Unable to create non-Docker Group plugin alternative. (#394)
Browse files Browse the repository at this point in the history
Signed-off-by: Tristan Slominski <tristan.slominski@gmail.com>
  • Loading branch information
tristanls authored and David Chung committed Feb 12, 2017
1 parent 913d307 commit f00e0d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
3 changes: 0 additions & 3 deletions pkg/rpc/server/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ func NewPluginInfo(receiver interface{}) (*PluginInfo, error) {
// Register registers an rpc-capable object for introspection and metadata service
func (m *PluginInfo) Register(receiver interface{}) error {
r := &reflector{target: receiver}
if err := r.validate(); err != nil {
return err
}
m.reflectors = append(m.reflectors, r)
return nil
}
Expand Down
9 changes: 0 additions & 9 deletions pkg/rpc/server/reflector.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"net/http"
"reflect"
"strings"
"time"
"unicode"
"unicode/utf8"
Expand Down Expand Up @@ -44,14 +43,6 @@ func (r *reflector) targetType() reflect.Type {
return reflect.Indirect(reflect.ValueOf(r.target)).Type()
}

func (r *reflector) validate() error {
t := r.targetType()
if !strings.Contains(t.PkgPath(), "github.com/docker/infrakit/pkg/rpc") {
return fmt.Errorf("object not a standard plugin type: %v", t)
}
return nil
}

// Interface returns the plugin type and version.
func (r *reflector) Interface() spi.InterfaceSpec {
if v, is := r.target.(VersionedInterface); is {
Expand Down

0 comments on commit f00e0d3

Please sign in to comment.