config.go — fiber Source File
Architecture documentation for config.go, a go file in the fiber codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f8b1662e_ffd8_5e13_63a5_0f80c42683c0["config.go"] d31b53b2_3d0c_f538_f920_e1ae643c437c["time"] f8b1662e_ffd8_5e13_63a5_0f80c42683c0 --> d31b53b2_3d0c_f538_f920_e1ae643c437c style f8b1662e_ffd8_5e13_63a5_0f80c42683c0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
package memory
import (
"time"
)
// Config defines the config for storage.
type Config struct {
// Time before deleting expired keys
//
// Default is 10 * time.Second
GCInterval time.Duration
}
// ConfigDefault is the default config
var ConfigDefault = Config{
GCInterval: 10 * time.Second,
}
// configDefault is a helper function to set default values
func configDefault(config ...Config) Config {
// Return default config if nothing provided
if len(config) < 1 {
return ConfigDefault
}
// Override default config
cfg := config[0]
// Set default values
if int(cfg.GCInterval.Seconds()) <= 0 {
cfg.GCInterval = ConfigDefault.GCInterval
}
return cfg
}
Domain
Subdomains
Functions
Classes
Dependencies
- time
Source
Frequently Asked Questions
What does config.go do?
config.go is a source file in the fiber codebase, written in go. It belongs to the InternalStorage domain, MemoryStore subdomain.
What functions are defined in config.go?
config.go defines 1 function(s): configDefault.
What does config.go depend on?
config.go imports 1 module(s): time.
Where is config.go in the architecture?
config.go is located at internal/storage/memory/config.go (domain: InternalStorage, subdomain: MemoryStore, directory: internal/storage/memory).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free