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) Initialize ¶
Initialize initializes all cache options in the lookup with default values and overlays any values that were set during YAML unmarshaling
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"`
// Memory provides options for Memory caching
Memory *memory.Options `yaml:"memory,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
func (*Options) ClearProviderOptions ¶
func (o *Options) ClearProviderOptions()
func (*Options) Equal ¶
Equal returns true if all values in the Options references and their their child Option references are completely identical
func (*Options) Initialize ¶
Initialize sets up the cache Options with default values and overlays any values that were set during YAML unmarshaling
Click to show internal directories.
Click to hide internal directories.