v1

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationChangedHandler

type ConfigurationChangedHandler interface {
	// ConfigurationChanged is a method that gets triggered when a ConfigurationManager
	// has a new configuration that should be loaded.
	ConfigurationChanged(string, config_v2.Config) error
}

ConfigurationChangedHandler interface specifies what method is required to support being a target of a ConfigurationManger object.

type ConfigurationManager

type ConfigurationManager interface {
	// Initialize is called to instantiate the ConfigurationManager and provide
	// a handler that will be notified of configuration object updates.
	Initialize(handler ConfigurationChangedHandler, configSpec string) error

	// GetName returns the internal name that the ConfigurationManager was
	// instantiated with.
	GetName() string
}

ConfigurationManager is the interface used to obtain configuration data and to trigger updates

type ConfigurationManagerOptions

type ConfigurationManagerOptions struct {
	// Name is the internal name that the configuraton manager will have. This
	// may be different from the name passed back from the factory.
	Name string
}

ConfigurationManagerOptions contains the configuration for the configuration manager instantiation.

type ConnectionManager

type ConnectionManager interface {
	// Initialize is called before proxy initialization
	Initialize(config_v2.Config, func(config_v2.Config) error) error

	// CloseConnect is called when a client connection is closed
	CloseConnection(net.Conn)

	// ResolveCredential is called when a provider resolves a variable
	ResolveCredential(provider Provider, id string, value []byte)

	// ClientData is called for each inbound packet from clients
	ClientData(net.Conn, []byte)

	// ServerData is called for each inbound packet from the backend
	ServerData(net.Conn, []byte)

	// Shutdown is called when secretless caught a signal to exit
	Shutdown()
}

ConnectionManager is an interface to be implemented by plugins that want to manage connections for handlers and listeners.

type EventNotifier

type EventNotifier interface {
	// ClientData is called for each inbound packet from clients
	ClientData(net.Conn, []byte)

	// ResolveCredential is called when a provider resolves a variable
	// TODO: unclear why we're reimplementing the StoredSecret functionality here...
	ResolveCredential(provider Provider, id string, value []byte)

	// ServerData is called for each inbound packet from the backend
	ServerData(net.Conn, []byte)
}

EventNotifier is the interface which is used to pass event up from handlers/ listeners/managers back up to the main plugin manager

type Provider

type Provider interface {
	// GetName returns the name that the Provider was instantiated with
	GetName() string

	// GetValue takes in an id of a variable and returns its resolved value
	GetValue(id string) ([]byte, error)
}

Provider is the interface used to obtain values from a secret vault backend.

type ProviderOptions

type ProviderOptions struct {
	// Name is the internal name that the provider will have. This may be different from
	// the name passed back from the provider factory.
	Name string
}

ProviderOptions contains the configuration for the provider instantiation

type Resolver

type Resolver interface {
	// Provider gets back an instance of a named provider and creates it if
	// one already doesn't exist
	Provider(name string) (Provider, error)

	// Resolve accepts an array of credentials and returns a map of resolved ones
	Resolve(credentials []*config_v2.Credential) (result map[string][]byte, err error)
}

Resolver is the interface which is used to pass a generic resolver down to the Listeners/Handlers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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