Storage is a way to store checkup results on the local filesystem.
| 15 | |
| 16 | // Storage is a way to store checkup results on the local filesystem. |
| 17 | type Storage struct { |
| 18 | // The path to the directory where check files will be stored. |
| 19 | Dir string `json:"dir"` |
| 20 | // The URL corresponding to fs.Dir. |
| 21 | URL string `json:"url"` |
| 22 | |
| 23 | // Check files older than CheckExpiry will be |
| 24 | // deleted on calls to Maintain(). If this is |
| 25 | // the zero value, no old check files will be |
| 26 | // deleted. |
| 27 | CheckExpiry time.Duration `json:"check_expiry,omitempty"` |
| 28 | } |
| 29 | |
| 30 | // New creates a new Storage instance based on json config |
| 31 | func New(config json.RawMessage) (Storage, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected