package dynconfig
import "golang.org/x/pkgsite/internal/config/dynconfig"
Package dynconfig supports dynamic configuration for pkgsite services. Dynamic configuration is read from a file and can change over the lifetime of the process.
Index ¶
Types ¶
type DynamicConfig ¶
type DynamicConfig struct { Experiments []*internal.Experiment }
DynamicConfig holds configuration that can change over the lifetime of the process. It is loaded from a GCS file or other external source.
func Parse ¶
func Parse(yamlData []byte) (_ *DynamicConfig, err error)
Parse parses yamlData as a YAML description of DynamicConfig.
func Read ¶
func Read(ctx context.Context, location string) (_ *DynamicConfig, err error)
Read reads dynamic configuration from the given location. Location may be of the form gs://bucket/object, denoting a GCS bucket. Otherwise it is interpreted as a filename.
Source Files ¶
dynconfig.go
- Version
- v0.0.0-20250704161611-eac0bf970406 (latest)
- Published
- Jul 4, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 4 weeks ago –
Tools for package owners.