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
- func (s *DefaultPivotalCF) GetCredentials() (creds map[string]map[string][]cfbackup.Properties)
- func (s *DefaultPivotalCF) GetHostDetails() tileregistry.TileSpec
- func (s *DefaultPivotalCF) GetProducts() (products map[string]cfbackup.Products)
- func (s *DefaultPivotalCF) NewArchiveReader(name string) (reader io.ReadCloser, err error)
- func (s *DefaultPivotalCF) NewArchiveWriter(name string) (writer io.WriteCloser, err error)
- 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, ts tileregistry.TileSpec) PivotalCF { return &DefaultPivotalCF{ TileSpec: ts, 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 { TileSpec tileregistry.TileSpec 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) GetHostDetails ¶
func (s *DefaultPivotalCF) GetHostDetails() tileregistry.TileSpec
GetHostDetails - return all of the host and archive details in the form of a tile spec object
func (*DefaultPivotalCF) GetProducts ¶
func (s *DefaultPivotalCF) GetProducts() (products map[string]cfbackup.Products)
GetProducts - gets a products object from the given pivotalcf
func (*DefaultPivotalCF) NewArchiveReader ¶
func (s *DefaultPivotalCF) NewArchiveReader(name string) (reader io.ReadCloser, err error)
NewArchiveReader - creates a reader to a named resource using the given name on the cfops defined target (s3, local, etc)
func (*DefaultPivotalCF) NewArchiveWriter ¶
func (s *DefaultPivotalCF) NewArchiveWriter(name string) (writer io.WriteCloser, err error)
NewArchiveWriter - creates a writer to a named resource using the given name on the cfops defined target (s3, local, etc)
type PivotalCF ¶
type PivotalCF interface { GetHostDetails() tileregistry.TileSpec GetProducts() map[string]cfbackup.Products GetCredentials() map[string]map[string][]cfbackup.Properties NewArchiveReader(name string) (io.ReadCloser, error) NewArchiveWriter(name string) (io.WriteCloser, error) }
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