importer

package
v0.0.0-...-f04227e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package importer handles all configs importing.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFatalTag is an error tag to indicate an unrecoverable error in the
	// configs importing flow.
	ErrFatalTag = errors.BoolTag{Key: errors.NewTagKey("A config importing unrecoverable error")}
)

Functions

This section is empty.

Types

type Importer

type Importer struct {
	// GSBucket is the bucket name where the imported configs will be stored to.
	GSBucket string
	// Validator is used to validate the configs before import.
	Validator validator
}

Importer is able to import a config set.

func (*Importer) ImportConfigSet

func (i *Importer) ImportConfigSet(ctx context.Context, cfgSet config.Set) error

ImportConfigSet tries to import a config set. TODO(crbug.com/1446839): Optional: for ErrFatalTag errors or errors which are retried many times, may send notifications to Config Service owners in future after the notification functionality is done.

func (*Importer) RegisterImportConfigsCron

func (i *Importer) RegisterImportConfigsCron(dispatcher *tq.Dispatcher)

RegisterImportConfigsCron register the cron to trigger import for all config sets

func (*Importer) Reimport

func (i *Importer) Reimport(c *router.Context)

Reimport handles the HTTP request of reimporting a single config set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL