Documentation
¶
Overview ¶
Package prefixcfg allows to configure prefix metadata via service configs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportConfig ¶
ImportConfig is called from a cron to import prefixes.cfg into the datastore.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds parsed and transformed configs in memory, refetching them from the datastore occasionally.
func (*Config) Lookup ¶
Lookup returns a config entry to use for the given prefix or package.
It is a fast local operation and it can't fail. If the prefix doesn't have a config, returns a default one.
func (*Config) RefreshPeriodically ¶
RefreshPeriodically runs a loop that periodically refetches the config from the datastore to update the local in-memory cache.
Click to show internal directories.
Click to hide internal directories.