Documentation
¶
Index ¶
Constants ¶
View Source
const Shell = "/bin/sh"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Schedule string `long:"schedule" env:"SCHEDULE" description:"Backup schedule" default:"@daily"` Dir string `long:"dir" env:"DIR" description:"Directory to backup and restore" default:"/data"` Prune string `long:"prune" env:"PRUNE" description:"Cleanup and prune backups schedule" default:"@daily"` Depth int `long:"depth" env:"DEPTH" description:"How many snapshots to keep" default:"7"` Restic string `long:"restic" env:"RESTIC" description:"Restic binary" default:"restic"` LogLimit int `` /* 136-byte string literal not displayed */ Notification HTTPNotification `group:"Webhook notification" namespace:"notification" env-namespace:"NOTIFICATION"` }
type HTTPNotification ¶
type HTTPNotification struct { URL string `long:"url" env:"URL" description:"URL to invoke"` Retries int `long:"retries" env:"RETRIES" description:"Number of additional retries" default:"5"` Interval time.Duration `long:"interval" env:"INTERVAL" description:"Interval between attempts" default:"12s"` Method string `long:"method" env:"METHOD" description:"HTTP method" default:"POST"` Timeout time.Duration `long:"timeout" env:"TIMEOUT" description:"Request timeout" default:"30s"` Authorization string `long:"authorization" env:"AUTHORIZATION" description:"Authorization header value"` }
func (*HTTPNotification) Auto ¶
func (ht *HTTPNotification) Auto(ctx context.Context, op string, fn func() error)
func (*HTTPNotification) Notify ¶
func (ht *HTTPNotification) Notify(ctx context.Context, record *Notification) error
Click to show internal directories.
Click to hide internal directories.