Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidName = errors.New("invalid cache name")
Functions ¶
This section is empty.
Types ¶
type Lookup ¶
Lookup is a map of Options
func (Lookup) OverlayYAMLData ¶
OverlayYAMLData extracts supported cache Options values from the yaml map, and overlays the extracted values into activeCaches
type Options ¶
type Options struct {
// Name is the Name of the cache, taken from the Key in the Caches map[string]*CacheConfig
Name string `yaml:"-"`
// Provider represents the type of cache that we wish to use: "boltdb", "memory", "filesystem", or "redis"
Provider string `yaml:"provider,omitempty"`
// Index provides options for the Cache Index
Index *index.Options `yaml:"index,omitempty"`
// Redis provides options for Redis caching
Redis *redis.Options `yaml:"redis,omitempty"`
// Filesystem provides options for Filesystem caching
Filesystem *filesystem.Options `yaml:"filesystem,omitempty"`
// BBolt provides options for BBolt caching
BBolt *bbolt.Options `yaml:"bbolt,omitempty"`
// Badger provides options for BadgerDB caching
Badger *badger.Options `yaml:"badger,omitempty"`
// Defines if the cache should use cache chunking. Splits cache objects into smaller, reliably-sized parts.
UseCacheChunking bool `yaml:"use_cache_chunking,omitempty"`
// Determines chunk size (duration) for timeseries objects, query step * chunk factor
TimeseriesChunkFactor int64 `yaml:"timeseries_chunk_factor"`
// Determines chunk size (bytes) for byterange objects
ByterangeChunkSize int64 `yaml:"byterange_chunk_size"`
// ProviderID represents the internal constant for the provided Provider string
// and is automatically populated at startup
ProviderID providers.Provider `yaml:"-"`
}
Options is a collection of defining the Trickster Caching Behavior
func New ¶
func New() *Options
New will return a pointer to a CacheOptions with the default configuration settings
Click to show internal directories.
Click to hide internal directories.