Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupHandler ¶
type BackupHandler interface { // RunBackup creates a backup of all events in the store RunBackup(context.Context) (*BackupResult, error) // RunRestore restores all events stored in the backup with the given identifier RunRestore(context.Context, string) (*RestoreResult, error) // RunPurge cleans up backups according to the retention set RunPurge(context.Context) (*PurgeResult, error) }
type BackupResult ¶
type MetricsPublisher ¶
type MetricsPublisher interface { // Start sets a timestamp for start of a backup Start() // Finished sets the duration an backup has taken and the completion time to now Finished() // SetSuccessTime adds the success timestamp to the pushed metrics and sets the time to now SetSuccessTime() // SetFailTime adds a failed timestamp to the pushed metrics and sets the time to now SetFailTime() // SetEventCount sets the events processed during an backup SetEventCount(eventCount float64) // SetBytes sets the bytes written to backup SetBytes(sizeInBytes float64) // CloseAndPush sends the metrics to the prometheus push gateway CloseAndPush() error }
func NewMetricsPublisher ¶
func NewMetricsPublisher(pushGatewayUrl string) (MetricsPublisher, error)
NewMetricsPublisher creates a new backup.MetricsPublisher publishing metrics to a prometheus pushgateway
func NewNoopMetricsPublisher ¶
func NewNoopMetricsPublisher() MetricsPublisher
NewNoopMetricsPublisher returns a noop metrics publisher which does nothing
type PurgeResult ¶
type RestoreResult ¶
Click to show internal directories.
Click to hide internal directories.