luci: go.chromium.org/luci/config/impl/memory Index | Files

package memory

import "go.chromium.org/luci/config/impl/memory"

Package memory implements in-memory backend for the config client.

May be useful during local development or from unit tests. Do not use in production. It is terribly slow.

Index

Package Files

memory.go

func New Uses

func New(cfg map[config.Set]Files) config.Interface

New makes an implementation of the config service which takes all configs from provided mapping {config set name -> map of configs}. For unit testing.

func SetError Uses

func SetError(impl config.Interface, err error)

SetError artificially pins the error code returned by impl to err. If err is nil, impl will behave normally.

impl must be a memory config isntance created with New, else SetError will panic.

type Files Uses

type Files map[string]string

Files is all files comprising some config set.

Represented as a mapping from a file path to a config file body.

Package memory imports 9 packages (graph) and is imported by 4 packages. Updated 2018-12-16. Refresh now. Tools for package owners.