plugin

package
v0.0.0-...-7638cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package plugin contains all essential structs/interfaces for long running plugins

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPluginSupportedForCurrentPlatform

func IsPluginSupportedForCurrentPlatform(log log.T, pluginName string) (bool, string)

IsPluginSupportedForCurrentPlatform always returns true because currently, there is no plugin that particular linux version doesn't support while other linux version does.

func RegisteredPlugins

func RegisteredPlugins(context context.T) map[string]Plugin

RegisteredPlugins loads all long running plugins in memory

Types

type LongRunningPlugin

type LongRunningPlugin interface {
	IsRunning(context context.T) bool
	Start(context context.T, configuration string, orchestrationDir string, cancelFlag task.CancelFlag) error
	Stop(context context.T, cancelFlag task.CancelFlag) error
}

LongRunningPlugin is the interface that must be implemented by all long running plugins

type LongRunningPluginInput

type LongRunningPluginInput struct {
	Settings   PluginSettings
	Properties string
}

LongRunningPluginInput represents input for long running plugin like aws:cloudWatch

type Plugin

type Plugin struct {
	Info    PluginInfo
	Handler LongRunningPlugin
}

Plugin reflects a long running plugin

type PluginInfo

type PluginInfo struct {
	Name          string
	Configuration string
	State         PluginState
}

PluginInfo reflects information about long running plugins This is also used by lrpm manager to persisting information & then later use it for reference

type PluginSettings

type PluginSettings struct {
	StartType string
}

PluginSettings reflects settings that can be applied to long running plugins like aws:cloudWatch

type PluginState

type PluginState struct {
	LastConfigurationModifiedTime time.Time
	IsEnabled                     bool
}

PluginState reflects state of a long running plugin

Directories

Path Synopsis
Package cloudwatch implements cloudwatch plugin and its configuration
Package cloudwatch implements cloudwatch plugin and its configuration

Jump to

Keyboard shortcuts

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