diff options
Diffstat (limited to 'plugins/grpc/plugin.go')
-rw-r--r-- | plugins/grpc/plugin.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/grpc/plugin.go b/plugins/grpc/plugin.go index 4871a8a7..b424c5d0 100644 --- a/plugins/grpc/plugin.go +++ b/plugins/grpc/plugin.go @@ -4,6 +4,8 @@ import ( "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" + "google.golang.org/grpc" + "google.golang.org/grpc/encoding" ) const ( @@ -11,6 +13,9 @@ const ( ) type Plugin struct { + config *Config + opts []grpc.ServerOption + cfg config.Configurer log logger.Logger } @@ -18,6 +23,9 @@ type Plugin struct { func (p *Plugin) Init(cfg config.Configurer, log logger.Logger) error { const op = errors.Op("grpc_plugin_init") + // register the codec + encoding.RegisterCodec(&codec{}) + return nil } |