Documentation ¶
Overview ¶
Package manager provides the instantiation and running of the plugins on machine controller side.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrLocatingPlugins is returned when a new manager cannot locate // the plugins for the supported operating systems. ErrLocatingPlugins = errors.New("one or more user data plugins not found") // ErrPluginNotFound describes an invalid operating system for // a user data plugin. Here directory has to be checked if // correct ones are installed. ErrPluginNotFound = errors.New("no user data plugin for the given operating system found") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager inits and manages the userdata plugins.
func New ¶
func New(log *zap.SugaredLogger) (*Manager, error)
New returns an initialised plugin manager.
func (*Manager) ForOS ¶
func (m *Manager) ForOS(os providerconfigtypes.OperatingSystem) (p *Plugin, err error)
ForOS returns the plugin for the given operating system.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin looks for the plugin executable and calls it for each request.
func (*Plugin) UserData ¶
func (p *Plugin) UserData(_ *zap.SugaredLogger, req plugin.UserDataRequest) (string, error)
UserData retrieves the user data of the given resource via plugin handling the communication.
Click to show internal directories.
Click to hide internal directories.