android-components / mozilla.components.service.fretboard / ExperimentStorage

ExperimentStorage

interface ExperimentStorage (source)

Represents a location where experiments are stored locally on the device

Functions

Name Summary
retrieve abstract fun retrieve(): ExperimentsSnapshot
Reads experiments from disk
save abstract fun save(snapshot: ExperimentsSnapshot): Unit
Stores the given experiments to disk

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.

Inheritors

Name Summary
FlatFileExperimentStorage class FlatFileExperimentStorage : ExperimentStorage
Class which uses a flat JSON file as an experiment storage mechanism