containerd/services/metrics/metrics.go
Michael Crosby 4f2b443a27 Rewrite imports for new github org
This rewrites the Go imports after switching to the new github org.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 14:05:44 -07:00

26 lines
489 B
Go

package metrics
import (
"github.com/containerd/containerd/plugin"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"google.golang.org/grpc"
)
func init() {
plugin.Register("metrics-grpc", &plugin.Registration{
Type: plugin.GRPCPlugin,
Init: New,
})
}
func New(_ *plugin.InitContext) (interface{}, error) {
return &Service{}, nil
}
type Service struct {
}
func (s *Service) Register(server *grpc.Server) error {
grpc_prometheus.Register(server)
return nil
}