plugins

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlreadyMigrated = errors.New("database already migrated")

Functions

func Register

func Register(name PluginName, plugin Plugin)

Types

type BootstrapPlugin

type BootstrapPlugin interface {
	Plugin
	Bootstrap(*MutablePluginContext, PluginConfig) error
}

BootstrapPlugin is responsible for environment-specific initialization at start up, e.g. Kubernetes-specific part of configuration. Unlike other plugins, can mutate plugin context directly.

type CaPlugin

type CaPlugin interface {
	Plugin
	NewCaManager(PluginContext, PluginConfig) (core_ca.Manager, error)
}

CaPlugin is responsible for providing Certificate Authority Manager

type ConfigStorePlugin

type ConfigStorePlugin interface {
	Plugin
	NewConfigStore(PluginContext, PluginConfig) (config_store.ConfigStore, error)
}

ConfigStorePlugin is responsible for instantiating a particular ConfigStore.

type DbVersion

type DbVersion = uint

ResourceStorePlugin is responsible for instantiating a particular ResourceStore.

type DiscoveryPlugin

type DiscoveryPlugin interface {
	Plugin
	StartDiscovering(PluginContext, PluginConfig) error
}

DiscoveryPlugin is responsible for discovering Dataplanes for given environment.

type MutablePluginContext

type MutablePluginContext = core_runtime.Builder

type MutableRegistry

type MutableRegistry interface {
	Registry
	RegistryMutator
}

func NewRegistry

func NewRegistry() MutableRegistry

type Plugin

type Plugin interface{}

type PluginConfig

type PluginConfig interface{}

type PluginContext

type PluginContext = core_runtime.BuilderContext

type PluginName

type PluginName string
const (
	Kubernetes PluginName = "k8s"
	Universal  PluginName = "universal"
	Memory     PluginName = "memory"
	Postgres   PluginName = "postgres"

	CaBuiltin  PluginName = "builtin"
	CaProvided PluginName = "provided"
)

type Registry

type Registry interface {
	Bootstrap(PluginName) (BootstrapPlugin, error)
	ResourceStore(name PluginName) (ResourceStorePlugin, error)
	SecretStore(name PluginName) (SecretStorePlugin, error)
	ConfigStore(name PluginName) (ConfigStorePlugin, error)
	Discovery(name PluginName) (DiscoveryPlugin, error)
	Runtime(name PluginName) (RuntimePlugin, error)
	Ca(name PluginName) (CaPlugin, error)
	CaPlugins() map[PluginName]CaPlugin
}

func Plugins

func Plugins() Registry

type RegistryMutator

type RegistryMutator interface {
	Register(PluginName, Plugin) error
}

type ResourceStorePlugin

type ResourceStorePlugin interface {
	Plugin
	NewResourceStore(PluginContext, PluginConfig) (core_store.ResourceStore, error)
	Migrate(PluginContext, PluginConfig) (DbVersion, error)
}

type RuntimePlugin

type RuntimePlugin interface {
	Plugin
	Customize(core_runtime.Runtime) error
}

RuntimePlugin is responsible for registering environment-specific components, e.g. Kubernetes admission web hooks.

type SecretStorePlugin

type SecretStorePlugin interface {
	Plugin
	NewSecretStore(PluginContext, PluginConfig) (secret_store.SecretStore, error)
}

SecretStorePlugin is responsible for instantiating a particular SecretStore.

Jump to

Keyboard shortcuts

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