-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: plugin multiplexing: handle plugin client cleanup #13896
Changes from 12 commits
4ff8b08
8adfd95
e9da3b4
7c1e08b
6a72cf8
3afa088
c6a2e28
73d420e
f755270
5bfe889
7365970
e5c57a3
414bc11
dd7e52c
73077e2
35af94e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,9 @@ type SystemView interface { | |
// name. Returns a PluginRunner or an error if a plugin can not be found. | ||
LookupPlugin(context.Context, string, consts.PluginType) (*pluginutil.PluginRunner, error) | ||
|
||
NewPluginClient(ctx context.Context, pluginRunner *pluginutil.PluginRunner, config pluginutil.PluginClientConfig) (pluginutil.Multiplexer, error) | ||
// NewPluginClient returns a client for managing the lifecycle of plugin | ||
// processes | ||
NewPluginClient(ctx context.Context, config pluginutil.PluginClientConfig) (pluginutil.PluginInstance, error) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes me think whether we should be embedding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be more appropriate to name this |
||
|
||
// MlockEnabled returns the configuration setting for enabling mlock on | ||
// plugins. | ||
|
@@ -154,7 +156,7 @@ func (d StaticSystemView) ReplicationState() consts.ReplicationState { | |
return d.ReplicationStateVal | ||
} | ||
|
||
func (d StaticSystemView) NewPluginClient(ctx context.Context, pluginRunner *pluginutil.PluginRunner, config pluginutil.PluginClientConfig) (pluginutil.Multiplexer, error) { | ||
func (d StaticSystemView) NewPluginClient(ctx context.Context, config pluginutil.PluginClientConfig) (pluginutil.PluginInstance, error) { | ||
return nil, errors.New("NewPluginClient is not implemented in StaticSystemView") | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will likely need a Plugin Type arg in the future but I think it is ok to leave out for now.