Merge pull request #10337 from Kern--/proxy-capabilities

Allow proxy plugins to have capabilities
This commit is contained in:
Maksym Pavlenko 2024-06-14 19:24:32 +00:00 committed by GitHub
commit 8f4a282ab3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -234,10 +234,11 @@ type CgroupConfig struct {
// ProxyPlugin provides a proxy plugin configuration
type ProxyPlugin struct {
Type string `toml:"type"`
Address string `toml:"address"`
Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"`
Type string `toml:"type"`
Address string `toml:"address"`
Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"`
Capabilities []string `toml:"capabilities"`
}
// Decode unmarshals a plugin specific configuration by plugin id

View File

@ -542,6 +542,7 @@ func LoadPlugins(ctx context.Context, config *srvconfig.Config) ([]plugin.Regist
InitFn: func(ic *plugin.InitContext) (interface{}, error) {
ic.Meta.Exports = exports
ic.Meta.Platforms = append(ic.Meta.Platforms, p)
ic.Meta.Capabilities = pp.Capabilities
conn, err := clients.getClient(address)
if err != nil {
return nil, err