Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PollingInterval defines how often a single feed is re-synced. // If a feed was synced at T, it will be eligible again at T + PollingInterval. PollingInterval = 10 * time.Minute // IdleSleepTime defines how long the worker sleeps when no feeds are due for syncing. IdleSleepTime = 10 * time.Second // ETagTTL defines the cache duration for API endpoints. // This is set below half the PollingInterval (the Nyquist limit) to ensure clients never miss an update. ETagTTL = 150 * time.Second // lock duration DefaultLockDuration = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ApplicationName string `required:"false" default:"'News Deframer Browser Extension Service'"`
// HTTP Port
Port string `env:"PORT" envDefault:"8080"`
// Gorm DNS
DSN string `env:"DSN" envDefault:"host=postgres user=deframer password=deframer dbname=deframer port=5432 sslmode=disable"`
BasicAuthUser string `env:"BASIC_AUTH_USER" envDefault:""`
BasicAuthPassword string `env:"BASIC_AUTH_PASSWORD" envDefault:""`
CORSAllowedOrigins string `env:"CORS_ALLOWED_ORIGINS"`
RedirectWebRequest404URL string `env:"REDIRECT_WEBREQUEST_404_URL" envDefault:""`
LLM_Type LLMType `env:"LLM_TYPE" envDefault:"dummy"`
LLM_Model string `env:"LLM_MODEL" envDefault:""`
LLM_APIKey string `env:"LLM_API_KEY" envDefault:""`
LLM_BaseURL string `env:"LLM_BASE_URL" envDefault:""`
DebugLog bool `env:"DEBUG_LOG" envDefault:"false"`
DatabaseLogging bool `env:"DATABASE_LOGGING" envDefault:"false"`
}
Click to show internal directories.
Click to hide internal directories.