runpluginutil

package
v0.0.0-...-da9a336 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Overview

Package runpluginutil run plugin utility functions without referencing the actually plugin impl packages

Package runpluginutil run plugin utility functions without referencing the actually plugin impl packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPropertyName

func GetPropertyName(rawPluginInput interface{}) (propertyName string, err error)

GetPropertyName returns the ID field of property in a v1.2 SSM Document

func IsPluginSupportedForCurrentPlatform

func IsPluginSupportedForCurrentPlatform(log log.T, pluginName string) (isKnown bool, isSupported bool, message string)

IsPluginSupportedForCurrentPlatform always returns true for plugins that exist for linux because currently there are no plugins that are supported on only one distribution or version of linux.

func RunPlugins

func RunPlugins(
	context context.T,
	plugins []contracts.PluginState,
	ioConfig contracts.IOConfiguration,
	upstreamServiceName contracts.UpstreamServiceName,
	registry PluginRegistry,
	resChan chan contracts.PluginResult,
	cancelFlag task.CancelFlag,
) (pluginOutputs map[string]*contracts.PluginResult)

TODO remove executionID and creation date RunPlugins executes a set of plugins. The plugin configurations are given in a map with pluginId as key. Outputs the results of running the plugins, indexed by pluginId. Make this function private in case everybody tries to reference it everywhere, this is a private member of Executer

Types

type PluginFactory

type PluginFactory interface {
	Create(context context.T) (T, error)
}

type PluginRegistry

type PluginRegistry map[string]PluginFactory

PluginRegistry stores a set of plugins (both worker and long running plugins), indexed by ID.

var (
	SSMPluginRegistry PluginRegistry
)

type T

type T interface {
	Execute(config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)
}

TODO: rename to RCPlugin, this represents RCPlugin interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL