Documentation ¶
Index ¶
Constants ¶
View Source
const FilenameFormatString = "%d-check.json"
FilenameFormatString is the format string used by GenerateFilename to create a filename.
View Source
const IndexName = "index.json"
View Source
const Type = "fs"
Type should match the package name
Variables ¶
This section is empty.
Functions ¶
func GenerateFilename ¶
func GenerateFilename() *string
GenerateFilename returns a filename that is ideal for storing the results file on a storage provider that relies on the filename for retrieval that is sorted by date/timeframe. It returns a string pointer to be used by the AWS SDK...
Types ¶
type Storage ¶
type Storage struct { // The path to the directory where check files will be stored. Dir string `json:"dir"` // The URL corresponding to fs.Dir. URL string `json:"url"` // Check files older than CheckExpiry will be // deleted on calls to Maintain(). If this is // the zero value, no old check files will be // deleted. CheckExpiry time.Duration `json:"check_expiry,omitempty"` }
Storage is a way to store checkup results on the local filesystem.
func New ¶
func New(config json.RawMessage) (Storage, error)
New creates a new Storage instance based on json config
Click to show internal directories.
Click to hide internal directories.