server

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2020 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(s *Server) error

func WithAddr

func WithAddr(addr string) Option

WithAddr returns an Option which set the server listening address.

func WithBackupClient

func WithBackupClient(c *backupapi.Client) Option

WithBackupClient returns an Option which set the backup client for Server.

func WithBroker

func WithBroker(b broker.Broker) Option

WithBroker returns an Option which set the server broker for async messaging.

func WithPublishTopic

func WithPublishTopic(topic string) Option

WithPublishTopic returns an Option which set the server topic that server broker will publish message.

func WithSubscribeTopics

func WithSubscribeTopics(topics ...string) Option

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 New

func New(opts ...Option) (*Server, error)

New creates new server instance.

func (*Server) DownloadRecoveryPoint

func (s *Server) DownloadRecoveryPoint(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) 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) Run

func (s *Server) Run() error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL