diff --git a/pkg/plugins/backendplugin/grpcplugin/client_proto.go b/pkg/plugins/backendplugin/grpcplugin/client_proto.go index af18a2b092f..5326cf3ba8b 100644 --- a/pkg/plugins/backendplugin/grpcplugin/client_proto.go +++ b/pkg/plugins/backendplugin/grpcplugin/client_proto.go @@ -26,19 +26,22 @@ type ProtoClient interface { PID() (string, error) PluginID() string + PluginVersion() string Logger() log.Logger Start(context.Context) error Stop(context.Context) error } type protoClient struct { - plugin *grpcPlugin + plugin *grpcPlugin + pluginVersion string mu sync.RWMutex } type ProtoClientOpts struct { PluginID string + PluginVersion string ExecutablePath string ExecutableArgs []string Env []string @@ -58,7 +61,7 @@ func NewProtoClient(opts ProtoClientOpts) (ProtoClient, error) { func() []string { return opts.Env }, ) - return &protoClient{plugin: p}, nil + return &protoClient{plugin: p, pluginVersion: opts.PluginVersion}, nil } func (r *protoClient) PID() (string, error) { @@ -72,6 +75,10 @@ func (r *protoClient) PluginID() string { return r.plugin.descriptor.pluginID } +func (r *protoClient) PluginVersion() string { + return r.pluginVersion +} + func (r *protoClient) Logger() log.Logger { return r.plugin.logger }