config

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StuckScannerDuration refers how many hours after a ref stops auditing,
	// a bug will be filed.
	StuckScannerDuration = time.Duration(24) * time.Hour

	// MaxCommitsPerRefUpdate is the maximum commits that the Gitiles git.Log
	// API should return every time it is called.
	MaxCommitsPerRefUpdate = 6000
)

Variables

This section is empty.

Functions

func Get

func Get(c context.Context) *cpb.Config

Get returns the config stored in the context.

func GetConfigRevision

func GetConfigRevision(c context.Context) string

GetConfigRevision returns the revision of the current config.

func GetUpdatedRuleMap

func GetUpdatedRuleMap(c context.Context) map[string]*rules.RefConfig

GetUpdatedRuleMap returns a map of each monitored repository to a list of account/rules structs.

func Middleware

func Middleware(c *router.Context, next router.Handler)

Middleware loads the service config and installs it into the context.

func Update

func Update(c *router.Context)

Update is called by a cron job, which fetches the config and puts it into the datastore.

Types

This section is empty.

Jump to

Keyboard shortcuts

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