Documentation ¶
Index ¶
- type Server
- func (a *Server) BackupsMetadata(m *pbapi.BackupsMetadataParams, stream pbapi.Api_BackupsMetadataServer) error
- func (a *Server) GetClients(m *pbapi.Empty, stream pbapi.Api_GetClientsServer) error
- func (a *Server) LastBackupMetadata(ctx context.Context, e *pbapi.LastBackupMetadataParams) (*pb.BackupMetadata, error)
- func (a *Server) ListStorages(opts *pbapi.ListStoragesParams, stream pbapi.Api_ListStoragesServer) error
- func (a *Server) RunBackup(ctx context.Context, opts *pbapi.RunBackupParams) (*pbapi.RunBackupResponse, error)
- func (a *Server) RunRestore(ctx context.Context, opts *pbapi.RunRestoreParams) (*pbapi.RunRestoreResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶ added in v0.4.0
type Server struct {
// contains filtered or unexported fields
}
Apiserver has unexported fields and all the methods for API calls
func NewServer ¶ added in v0.4.0
func NewServer(server *server.MessagesServer) *Server
NewServer returns a new API Server
func (*Server) BackupsMetadata ¶ added in v0.4.0
func (a *Server) BackupsMetadata(m *pbapi.BackupsMetadataParams, stream pbapi.Api_BackupsMetadataServer) error
BackupMetadata streams back the last backup metadata
func (*Server) GetClients ¶ added in v0.4.0
GetClients streams back the list of connected clients
func (*Server) LastBackupMetadata ¶ added in v0.4.0
func (a *Server) LastBackupMetadata(ctx context.Context, e *pbapi.LastBackupMetadataParams) ( *pb.BackupMetadata, error)
LastBackupMetadata returns the last backup metadata so it can be stored in the local filesystem as JSON
func (*Server) ListStorages ¶ added in v0.4.0
func (a *Server) ListStorages(opts *pbapi.ListStoragesParams, stream pbapi.Api_ListStoragesServer) error
func (*Server) RunBackup ¶ added in v0.4.0
func (a *Server) RunBackup(ctx context.Context, opts *pbapi.RunBackupParams) (*pbapi.RunBackupResponse, error)
StartBackup starts a backup by calling server's StartBackup gRPC method This call waits until the backup finish
func (*Server) RunRestore ¶ added in v0.4.0
func (a *Server) RunRestore(ctx context.Context, opts *pbapi.RunRestoreParams) (*pbapi.RunRestoreResponse, error)
Click to show internal directories.
Click to hide internal directories.