Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gfr10598 committed Feb 15, 2019
1 parent 7818495 commit 8218238
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,27 @@ each distinct date, using the most recent Annotator from each list prior to that

Directory wraps a []api.Annotator, and provides the GetAnnotator(date time.Time) function.

## Loading datasets
### CachingLoader

We will modify the LoadAll function to instead be a Loader class that:
CachingLoader specifies the interface provided by loaders that load and cache a list of annotators.

1. Holds a source, filter, and loader
1. Maintains list of loaded Annotator objects.
1. Refreshes the list of loaded objects on demand.

The cache package will then contain a Generator class that maintain a list of these objects that in turn
maintain the complete collection of base Annotators, an Update method that will trigger updating all the
annotator lists, and a Generate method that creates a new AnnotatorCache
```
type CachingLoader interface {
UpdateCache() error
Fetch() []Annotator
}
```

### Loader

Loader should be an interface, so that we can allow annotator providers to provide their own Loaders. The geoloader package may also provide a generic NewLoader.

* func NewLoader(source, filter, loader) *Loader
* func (ld *Loader) Update() // Updates the list of Annotators.
TODO: Need to implement the CachingLoaders.

### Generator
```
func NewGenerator(v4, v6, g2 *CachingLoader)
func (gen *Generator) Update() error // Reloads all lists
func (gen *Generator) Generate() []Annotator // constructs list of CompositeAnnotators
* func (gen *Generator) AddLoader(loader *Loader)
* func (gen *Generator) Update() // Reloads all lists
* func (gen *Generator) Generate() *AnnotatorCache // Creates a new cache.
```

0 comments on commit 8218238

Please sign in to comment.