job

package
v0.0.0-...-0616d9d Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBackupsInfoMessage

func MakeBackupsInfoMessage(bi []*BackupInfo) string

Help func for make message

Types

type BackupInfo

type BackupInfo struct {
	BackupName       string    `json:"backup_name"`
	Time             time.Time `json:"time"`
	UncompressedSize int64     `json:"uncompressed_size"`
	CompressedSize   int64     `json:"compressed_size"`
}

Helper struct for parse wal-g backups info json

type InfoJob

type InfoJob struct {
	Storage        storage.Provider
	Config         *config.Config
	TelegramBotApi *tgbotapi.BotAPI
	// contains filtered or unexported fields
}

InfoJob - struct for manage job, which send notifications of backups and etc

func NewInfoJob

func NewInfoJob(cfg *config.Config, botapi *tgbotapi.BotAPI, storage storage.Provider) *InfoJob

Constructor

func (*InfoJob) Run

func (ij *InfoJob) Run()

Main func for Run this job, implements for cron.Job interface

Jump to

Keyboard shortcuts

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