pkgsite: golang.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

Package Files

dynconfig.go

type DynamicConfig Uses

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 Uses

func Parse(yamlData []byte) (_ *DynamicConfig, err error)

Parse parses yamlData as a YAML description of DynamicConfig.

func Read Uses

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.

Package dynconfig imports 11 packages (graph) and is imported by 1 packages. Updated 2020-10-28. Refresh now. Tools for package owners.