file_fetcher

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

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