Allow proxy plugins to have capabilities

Signed-off-by: Kern Walster <walster@amazon.com>
This commit is contained in:
Kern Walster 2024-06-06 16:43:36 +00:00
parent c75f6d404d
commit 5b8dfbd111
2 changed files with 6 additions and 4 deletions

View File

@ -234,10 +234,11 @@ type CgroupConfig struct {
// ProxyPlugin provides a proxy plugin configuration // ProxyPlugin provides a proxy plugin configuration
type ProxyPlugin struct { type ProxyPlugin struct {
Type string `toml:"type"` Type string `toml:"type"`
Address string `toml:"address"` Address string `toml:"address"`
Platform string `toml:"platform"` Platform string `toml:"platform"`
Exports map[string]string `toml:"exports"` Exports map[string]string `toml:"exports"`
Capabilities []string `toml:"capabilities"`
} }
// Decode unmarshals a plugin specific configuration by plugin id // 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) { InitFn: func(ic *plugin.InitContext) (interface{}, error) {
ic.Meta.Exports = exports ic.Meta.Exports = exports
ic.Meta.Platforms = append(ic.Meta.Platforms, p) ic.Meta.Platforms = append(ic.Meta.Platforms, p)
ic.Meta.Capabilities = pp.Capabilities
conn, err := clients.getClient(address) conn, err := clients.getClient(address)
if err != nil { if err != nil {
return nil, err return nil, err