Documentation
¶
Index ¶
- Constants
- Variables
- func WalkerDir(dir string, index *cache.Index, p *progress.Progress, logger *zap.Logger) (progress.Stat, int64, error)
- func WalkerItem(index *cache.Index, p *progress.Progress, logger *zap.Logger) (progress.Stat, error)
- type Option
- func WithAddr(addr string) Option
- func WithBackupClient(c *backupapi.Client) Option
- func WithBroker(b broker.Broker) Option
- func WithLogger(logger *zap.Logger) Option
- func WithNumGoroutine(num int) Option
- func WithPublishTopics(topics ...string) Option
- func WithSubscribeTopics(topics ...string) Option
- type Server
- func (s *Server) DeleteRecoveryPoints(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListAction(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListBackup(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListRecoveryPoints(w http.ResponseWriter, r *http.Request)
- func (s *Server) NewStorageVault(storageVault backupapi.StorageVault, actionID string, ...) (storage_vault.StorageVault, error)
- func (s *Server) RequestBackup(w http.ResponseWriter, r *http.Request)
- func (s *Server) RequestRestore(w http.ResponseWriter, r *http.Request)
- func (s *Server) Run() error
- func (s *Server) StopAction(w http.ResponseWriter, r *http.Request)
- func (s *Server) SyncConfig(w http.ResponseWriter, r *http.Request)
- func (s *Server) UpgradeAgent(w http.ResponseWriter, r *http.Request)
- func (s *Server) Version(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const (
BACKUP_FAILED_PATH = "backup_failed"
)
View Source
const (
PERCENT_PROCESS = 0.2
)
Variables ¶
View Source
var Version = "dev"
Functions ¶
Types ¶
type Option ¶
func WithBackupClient ¶
WithBackupClient returns an Option which set the backup client for Server.
func WithBroker ¶
WithBroker returns an Option which set the server broker for async messaging.
func WithLogger ¶ added in v1.0.16
WithLogger returns an Option which set the logger for Server.
func WithNumGoroutine ¶ added in v1.0.19
WithLogger returns an Option which set the logger for Server.
func WithPublishTopics ¶ added in v1.0.0
WithPublishTopics returns an Option which set the server topic that server broker will publish message.
func WithSubscribeTopics ¶
WithSubscribeTopics returns an Option which set the subscribeTopics that server broker will subscribe to.
type Server ¶
type Server struct { Addr string // contains filtered or unexported fields }
Server defines parameters for running BizFly Backup HTTP server.
func (*Server) DeleteRecoveryPoints ¶ added in v1.0.20
func (s *Server) DeleteRecoveryPoints(w http.ResponseWriter, r *http.Request)
func (*Server) ListAction ¶ added in v1.0.18
func (s *Server) ListAction(w http.ResponseWriter, r *http.Request)
func (*Server) ListBackup ¶
func (s *Server) ListBackup(w http.ResponseWriter, r *http.Request)
func (*Server) ListRecoveryPoints ¶
func (s *Server) ListRecoveryPoints(w http.ResponseWriter, r *http.Request)
func (*Server) NewStorageVault ¶ added in v1.0.4
func (s *Server) NewStorageVault(storageVault backupapi.StorageVault, actionID string, limitUpload, limitDownload int) (storage_vault.StorageVault, error)
func (*Server) RequestBackup ¶
func (s *Server) RequestBackup(w http.ResponseWriter, r *http.Request)
func (*Server) RequestRestore ¶
func (s *Server) RequestRestore(w http.ResponseWriter, r *http.Request)
func (*Server) StopAction ¶ added in v1.0.18
func (s *Server) StopAction(w http.ResponseWriter, r *http.Request)
func (*Server) SyncConfig ¶
func (s *Server) SyncConfig(w http.ResponseWriter, r *http.Request)
func (*Server) UpgradeAgent ¶
func (s *Server) UpgradeAgent(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.