Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachingFileReader ¶
type CachingFileReader struct {
// contains filtered or unexported fields
}
CachingFileReader reads a file and keeps an in-memory copy of it, until the copy is considered stale. Next ReadFile() after expiry will re-read the file from disk.
func NewCachingFileReader ¶
func NewCachingFileReader(path string, ttl time.Duration) *CachingFileReader
func (*CachingFileReader) ReadFile ¶
func (r *CachingFileReader) ReadFile() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.