prombackup

package
v0.0.0-...-44c254b Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackupSize = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "prom_backup_size_count",
			Help: "The size in bytes of the latest snapshot",
		},
	)
)

Functions

func FileSize

func FileSize(path string) (int64, error)

Types

type App

type App struct {
	ServerUrl     string
	SnapPath      string
	SnapDir       string
	SecondsToZero int // After SecondsToZero set the metric back to zero bytes
	TarBallName   string
	ListenPort    int
	S3Region      string
	S3Bucket      string
}

func (*App) CreateSnapShot

func (app *App) CreateSnapShot() (string, error)

func (*App) FullUrl

func (app *App) FullUrl() string

func (*App) MakeTarBall

func (app *App) MakeTarBall(sourceDir string) (string, error)

func (*App) Run

func (app *App) Run()

func (*App) RunSnapShot

func (app *App) RunSnapShot()

func (*App) UploadFile

func (app *App) UploadFile(filename string) error

type SnapData

type SnapData struct {
	Name string `json:"name"`
}

type SnapResponse

type SnapResponse struct {
	Status string   `json:"status"`
	Data   SnapData `json:"data"`
}

Jump to

Keyboard shortcuts

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