Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { // Enabled if this cache enabled Enabled bool `toml:"enabled"` // CacheAddr is an addr to cache // - A network address to redis or other // - A path to position on disk CacheAddr string `toml:"cache_addr"` // CacheSize is `max` size the cache can take in. // Because we limit caches size by lru maybe the actual usage of size will surpass the CacheSize CacheSize int64 `toml:"cache_size"` // UnitSizeLimitation is max unit size cache can take in UnitSizeLimitation int `toml:"unit_size_limitation"` }
Cache config for every config type
type CacheConfig ¶
type CacheConfig struct { ListenAddr string `toml:"listen_addr"` RedisCache *Cache `toml:"redis_cache"` DiskCache *Cache `toml:"disk_cache"` InmemoryCache *Cache `toml:"inmemory_cache"` }
func (*CacheConfig) String ¶
func (c *CacheConfig) String() string
type Configure ¶
type Configure struct { ExecutorConfig `toml:"executor"` ServerConfig `toml:"server"` DebugConfig `toml:"debug"` CacheConfig `toml:"caches"` }
func NewConfigFromFile ¶
func (*Configure) GetCacheConfig ¶
func (c *Configure) GetCacheConfig() *CacheConfig
func (*Configure) GetDebugConfig ¶
func (c *Configure) GetDebugConfig() *DebugConfig
func (*Configure) GetExecutorConfig ¶
func (c *Configure) GetExecutorConfig() *ExecutorConfig
func (*Configure) GetServerConfig ¶
func (c *Configure) GetServerConfig() *ServerConfig
type DebugConfig ¶
type DebugConfig struct {
LogLevel string `toml:"log_level"`
}
type ExecutorConfig ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.