plugin

package
v0.0.0-...-a9ed6da Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: Apache-2.0 Imports: 10 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 IsLongRunningPluginSupportedForCurrentPlatform

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

IsLongRunningPluginSupportedForCurrentPlatform always returns false because currently, there are no long-running plugins supported on Linux

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, out iohandler.IOHandler) 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
Package rundaemon implements rundaemon plugin and its configuration
Package rundaemon implements rundaemon plugin and its configuration

Jump to

Keyboard shortcuts

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