Documentation ¶
Index ¶
- Constants
- Variables
- func GetHandshake() plugin.HandshakeConfig
- func GetPlugins() map[string]plugin.Plugin
- func RegisterPlugin(name string, plugin BackupRestorer)
- func Start(plgn Plugin)
- type BackupRestorePlugin
- type BackupRestoreRPC
- type BackupRestoreRPCServer
- type BackupRestorer
- type DefaultPivotalCF
- type Meta
- type PivotalCF
- type Plugin
- type PluginTileBuilder
Constants ¶
const (
//PluginMeta - default plugin arg to show meta data
PluginMeta = "plugin-meta"
)
Variables ¶
var NewPivotalCF = func(installationSettings *cfbackup.ConfigurationParser) PivotalCF { return &DefaultPivotalCF{ InstallationSettings: installationSettings, } }
NewPivotalCF - creates the default pivotacf
var ( //UIOutput - a function to control UIOutput UIOutput = fmt.Print )
Functions ¶
func GetHandshake ¶
func GetHandshake() plugin.HandshakeConfig
GetHandshake - gets the handshake object
func GetPlugins ¶
func GetPlugins() map[string]plugin.Plugin
GetPlugins - returns the list of registered plugins
func RegisterPlugin ¶
func RegisterPlugin(name string, plugin BackupRestorer)
RegisterPlugin - register a plugin as available
Types ¶
type BackupRestorePlugin ¶
type BackupRestorePlugin struct {
P BackupRestorer
}
BackupRestorePlugin - this is an implementation of the rpc client and server wrapper
func (BackupRestorePlugin) Client ¶
func (g BackupRestorePlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
Client --
func (BackupRestorePlugin) Server ¶
func (g BackupRestorePlugin) Server(*plugin.MuxBroker) (interface{}, error)
Server --
type BackupRestoreRPC ¶
type BackupRestoreRPC struct {
// contains filtered or unexported fields
}
BackupRestoreRPC - is an implementation of a client that talks over RPC
type BackupRestoreRPCServer ¶
type BackupRestoreRPCServer struct {
Impl BackupRestorer
}
BackupRestoreRPCServer - this is an implementation of the rpc server for a backuprestorer
func (*BackupRestoreRPCServer) Backup ¶
func (s *BackupRestoreRPCServer) Backup(args interface{}, resp *error) error
Backup --
func (*BackupRestoreRPCServer) Restore ¶
func (s *BackupRestoreRPCServer) Restore(args interface{}, resp *error) error
Restore --
type BackupRestorer ¶
BackupRestorer - is the interface that we're exposing as a plugin.
func Call ¶
func Call(name string, filePath string) (BackupRestorer, *plugin.Client)
Call - calls a given plugin by name and file path
type DefaultPivotalCF ¶
type DefaultPivotalCF struct {
InstallationSettings *cfbackup.ConfigurationParser
}
DefaultPivotalCF - default implementation of PivotalCF interface
func (*DefaultPivotalCF) GetCredentials ¶
func (s *DefaultPivotalCF) GetCredentials() (creds map[string]map[string][]cfbackup.Properties)
GetCredentials - gets a credentials object from the given pivotalcf
func (*DefaultPivotalCF) GetProducts ¶
func (s *DefaultPivotalCF) GetProducts() (products map[string]cfbackup.Products)
GetProducts - gets a products object from the given pivotalcf
type PivotalCF ¶
type PivotalCF interface { GetProducts() map[string]cfbackup.Products GetCredentials() map[string]map[string][]cfbackup.Properties }
PivotalCF - interface representing a pivotalcf
type Plugin ¶
type Plugin interface { BackupRestorer GetMeta() Meta }
type PluginTileBuilder ¶
PluginTileBuilder - factory for a tile wrapped plugin
func (*PluginTileBuilder) New ¶
func (s *PluginTileBuilder) New(tileSpec tileregistry.TileSpec) (tile tileregistry.Tile, err error)
New - method to create a plugin tile