MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Run

Method Run

app/cli/pkg/action/plugin_actions.go:113–124  ·  view source on GitHub ↗

Run executes the NewPluginDescribe action

(_ context.Context, pluginName string)

Source from the content-addressed store, hash-verified

111
112// Run executes the NewPluginDescribe action
113func (action *PluginDescribe) Run(_ context.Context, pluginName string) (*PluginDescribeResult, error) {
114 action.cfg.Logger.Debug().Str("pluginName", pluginName).Msg("Getting plugin info")
115 plugin, ok := action.manager.GetPlugin(pluginName)
116 if !ok {
117 return nil, fmt.Errorf("plugin '%s' not found", pluginName)
118 }
119
120 action.cfg.Logger.Debug().Str("pluginName", pluginName).Str("version", plugin.Metadata.Version).Int("commandCount", len(plugin.Metadata.Commands)).Msg("Found plugin")
121 return &PluginDescribeResult{
122 Plugin: plugin,
123 }, nil
124}
125
126// NewPluginExec creates a new PluginExec action
127func NewPluginExec(cfg *ActionsOpts, manager *plugins.Manager) *PluginExec {

Callers

nothing calls this directly

Calls 3

GetPluginMethod · 0.80
IntMethod · 0.80
DebugMethod · 0.45

Tested by

no test coverage detected