Documentation ¶
Index ¶
- Constants
- func HandleRenderingRequestWithRemoteFetch(cache *cache.TwoTierCache, obj cache.IdentifiableObject, ...) ([]byte, error)
- func ResolveInputSpec(rc rs.RenderingHandler, rawBytes []byte, out rs.Field) (rs.Field, error)
- type BaseInMemCachedRenderer
- type BaseRenderer
- type BaseTwoTierCachedRenderer
- type CacheConfig
Constants ¶
View Source
const ( AttrUseSpec = "use-spec" AttrAllowExpired = "allow-expired" AttrCachedFile = "cached-file" AttrCacheData = "cache-data" )
Variables ¶
This section is empty.
Functions ¶
func HandleRenderingRequestWithRemoteFetch ¶ added in v0.5.0
func HandleRenderingRequestWithRemoteFetch( cache *cache.TwoTierCache, obj cache.IdentifiableObject, fetchRemote cache.RemoteCacheRefreshFunc, attributes []dukkha.RendererAttribute, ) ([]byte, error)
func ResolveInputSpec ¶ added in v0.7.0
Types ¶
type BaseInMemCachedRenderer ¶ added in v0.7.0
type BaseInMemCachedRenderer struct { rs.BaseField `yaml:"-"` BaseRenderer `yaml:",inline"` CacheConfig CacheConfig `yaml:"cache"` // CacheFS provided when calling Init CacheFS *fshelper.OSFS `yaml:"-"` // Cache is the in memory cache, nil if not enabled in CacheConfig Cache *cache.Cache `yaml:"-"` }
type BaseRenderer ¶ added in v0.7.0
type BaseRenderer struct { rs.BaseField `yaml:"-"` RendererAlias string `yaml:"alias"` DefaultAttributes []dukkha.RendererAttribute `yaml:"attributes"` }
func (*BaseRenderer) Alias ¶ added in v0.7.0
func (r *BaseRenderer) Alias() string
func (*BaseRenderer) Attributes ¶ added in v0.7.0
func (r *BaseRenderer) Attributes(override []dukkha.RendererAttribute) []dukkha.RendererAttribute
type BaseTwoTierCachedRenderer ¶ added in v0.7.0
type BaseTwoTierCachedRenderer struct { rs.BaseField `yaml:"-"` BaseRenderer `yaml:",inline"` CacheConfig CacheConfig `yaml:"cache"` // Cache is always not nil after Init Cache *cache.TwoTierCache `yaml:"-"` }
type CacheConfig ¶
type CacheConfig struct { rs.BaseField `yaml:"-"` // Enabled activates data caching // // * for renderers reading data directly from local disk (e.g. file): // will cache content in memory with size limit applied // * for renderers doing remote fetch (e.g. http, git, af): // will cache data on local disk first (cache size limiting is not effective at this time) // then cache data in memory with size limit applied // // Defaults to `false` Enabled bool `yaml:"enabled"` // MaxItemSize is the maximum size limit an item can be cached in memory // // Format: <number><unit> // where unit can be one of: [ , B, KB, MB, GB, TB, PB] // // Defaults to `0` (no size limit for single item) MaxItemSize utils.Size `yaml:"max_item_size"` // Size limits maximum in memory size of cached content // // Format: <number><unit> // where unit can be one of: [ , B, KB, MB, GB, TB, PB] // // Defaults to `0` (no size limit) Size utils.Size `yaml:"size"` // Timeout is the data caching duration // // if caching is enabled and this option is set to 0: // in memory cache will never expire during runtime // file cache for remote content will expire immediately (probably that's not what you want) // // Defaults to `0` Timeout time.Duration `yaml:"timeout"` }
CacheConfig is the config for data caching
Directories ¶
Path | Synopsis |
---|---|
Package af (archivefile) provides a renderer generating value by extracting file content from archive directly
|
Package af (archivefile) provides a renderer generating value by extracting file content from archive directly |
Click to show internal directories.
Click to hide internal directories.