file_fetcher

package
v0.180.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileFetcher

func NewFileFetcher(directory string) (stored_requests.AllFetcher, error)

NewFileFetcher _immediately_ loads stored request data from local files. These are stored in memory for low-latency reads.

This expects each file in the directory to be named "{config_id}.json". For example, when asked to fetch the request with ID == "23", it will return the data from "directory/23.json".

Types

type FileSystem

type FileSystem struct {
	Directories map[string]FileSystem
	Files       map[string]json.RawMessage
}

Jump to

Keyboard shortcuts

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