pkgsitegolang.org/x/pkgsite/internal/config/dynconfig Index | Files

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-20250218150137-224a1368cf02 (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
10 packages
Last checked
2 months ago

Tools for package owners.