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 BuildCmd
- type ClientCloser
- type DefaultPivotalCF
- func (s *DefaultPivotalCF) GetHostDetails() tileregistry.TileSpec
- func (s *DefaultPivotalCF) GetInstallationSettings() cfbackup.InstallationSettings
- 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.InstallationSettings, 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.
type ClientCloser ¶
type ClientCloser struct {
Client *plugin.Client
}
ClientCloser This is an adaptor to transform the client kill method to Close method
func (*ClientCloser) Close ¶
func (clientCloser *ClientCloser) Close()
Close Let the client kill the method
type DefaultPivotalCF ¶
type DefaultPivotalCF struct { TileSpec tileregistry.TileSpec InstallationSettings cfbackup.InstallationSettings }
DefaultPivotalCF - default implementation of PivotalCF interface
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) GetInstallationSettings ¶
func (s *DefaultPivotalCF) GetInstallationSettings() cfbackup.InstallationSettings
GetInstallationSettings - return installation settings
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 NewArchiveReader(name string) (io.ReadCloser, error) NewArchiveWriter(name string) (io.WriteCloser, error) GetInstallationSettings() cfbackup.InstallationSettings }
PivotalCF - interface representing a pivotalcf
type Plugin ¶
type Plugin interface { BackupRestorer GetMeta() Meta }
Plugin - is a interface plugin providers should implement
type PluginTileBuilder ¶
PluginTileBuilder - factory for a tile wrapped plugin
func (*PluginTileBuilder) New ¶
func (s *PluginTileBuilder) New(tileSpec tileregistry.TileSpec) (tileCloser tileregistry.TileCloser, err error)
New - method to create a plugin tile