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.