config

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginDirectoryAndFilename

func GetPluginDirectoryAndFilename(pluginName string) (directory string, filename string, err error)

GetPluginDirectoryAndFilename this functions return the directory and file name from a given pluginName such as argoproj-labs/sample-plugin

func UnInitializeConfig

func UnInitializeConfig()

UnInitializeConfig resets the in memory config to nil. This is useful for testing.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is the in memory representation of the configmap with some additional fields/functions for ease of use.

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns the initialized in memory config object if it exists otherwise errors if InitializeConfig has not been called.

func InitializeConfig

func InitializeConfig(k8sClientset kubernetes.Interface, configMapName string) (*Config, error)

InitializeConfig initializes the in memory config and downloads the plugins to the filesystem. Subsequent calls to this function will update the configmap in memory.

func (*Config) GetAllPlugins

func (c *Config) GetAllPlugins() []types.PluginItem

GetAllPlugins returns a flattened list of plugin items. This is useful for iterating over all plugins.

func (*Config) ValidateConfig

func (c *Config) ValidateConfig() error

Jump to

Keyboard shortcuts

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