Allow proxy plugins to have capabilities
Signed-off-by: Kern Walster <walster@amazon.com>
This commit is contained in:
		@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user