plugins

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 8 Imported by: 24

Documentation

Index

Constants

View Source
const (

	// InternalAPMNomad is the Nomad APM internal plugin name.
	InternalAPMNomad = "nomad-apm"

	// InternalTargetNomad is the Nomad Target internal plugin name.
	InternalTargetNomad = "nomad-target"

	// InternalAPMPrometheus is the Prometheus APM internal plugin name.
	InternalAPMPrometheus = "prometheus"

	// InternalStrategyPassThrough is the Pass Through strategy internal plugin name.
	InternalStrategyPassThrough = "pass-through"

	// InternalStrategyTargetValue is the Target Value Strategy internal plugin
	// name.
	InternalStrategyTargetValue = "target-value"

	// InternalStrategyThreshold is the Threshold Strategy internal plugin name.
	InternalStrategyThreshold = "threshold"

	// InternalStrategyFixedValue is the Fixed Value Strategy internal plugin name.
	InternalStrategyFixedValue = "fixed-value"

	// InternalTargetAWSASG is the Amazon Web Services AutoScaling Group target
	// plugin.
	InternalTargetAWSASG = "aws-asg"

	// InternalTargetAzureVMSS is the Azure Virtual Machine Scale Set target
	// plugin.
	InternalTargetAzureVMSS = "azure-vmss"

	// InternalTargetGCEMIG is the Google Compute Engine Managed Instance Group target
	// plugin.
	InternalTargetGCEMIG = "gce-mig"

	// InternalAPMDatadog is the Datadog APM plugin name.
	InternalAPMDatadog = "datadog"
)
View Source
const ConfigKeyNomadConfigInherit = "nomad_config_inherit"

ConfigKeyNomadConfigInherit is a generic plugin config map key that supports a boolean value. It indicates whether or not the plugin config should be merged with the agent's Nomad config. This provides an easy simple way in which plugins can have their Nomad client configured without extra hassle.

Variables

View Source
var (
	// Handshake is used to do a basic handshake between a plugin and host. If
	// the handshake fails, a user friendly error is shown. This prevents users
	// from executing bad plugins or executing a plugin directory. It is a UX
	// feature, not a security feature.
	//
	// Currently the Nomad Autoscaler plugin visioning is performed using the
	// ProtocolVersion within the Handshake.
	Handshake = plugin.HandshakeConfig{
		ProtocolVersion:  1,
		MagicCookieKey:   "NOMAD_AUTOSCALER_PLUGIN_MAGIC_COOKIE",
		MagicCookieValue: "e082fa04d587a6525d683666fa253d6afda00f20c122c54a80a3ed57fec99ff3",
	}
)

Functions

func Serve

func Serve(f PluginFactory)

Serve is used to serve a Nomad Autoscaler Base.

Types

type InternalPluginConfig

type InternalPluginConfig struct{ Factory PluginFactory }

InternalPluginConfig is a struct that internal plugins must implement in order to provide critical information about the plugin and launching it.

type PluginFactory

type PluginFactory func(log hclog.Logger) interface{}

PluginFactory is used to return a new plugin instance.

type PluginID

type PluginID struct {
	Name       string
	PluginType string
}

PluginID contains plugin metadata and identifies a plugin. It is used as a key to aid plugin lookups. The information held here is also reflected within PluginInfo, but will not include all.

func (PluginID) String

func (p PluginID) String() string

String returns a human readable version of PluginID.

Jump to

Keyboard shortcuts

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