Unexport grpc service types

Since these are registered and the interface is what matters, these
Service types do not need to be exported.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-10-20 11:18:37 -04:00
parent 3679a55883
commit 9bd1dc78cb
11 changed files with 111 additions and 100 deletions

View File

@@ -28,22 +28,23 @@ func init() {
})
}
type Service struct {
type service struct {
plugins []api.Plugin
}
// NewService returns the GRPC introspection server
func NewService(plugins []api.Plugin) api.IntrospectionServer {
return &Service{
return &service{
plugins: plugins,
}
}
func (s *Service) Register(server *grpc.Server) error {
func (s *service) Register(server *grpc.Server) error {
api.RegisterIntrospectionServer(server, s)
return nil
}
func (s *Service) Plugins(ctx context.Context, req *api.PluginsRequest) (*api.PluginsResponse, error) {
func (s *service) Plugins(ctx context.Context, req *api.PluginsRequest) (*api.PluginsResponse, error) {
filter, err := filters.ParseAll(req.Filters...)
if err != nil {
return nil, errdefs.ToGRPCf(errdefs.ErrInvalidArgument, err.Error())