caches

package
v0.0.0-...-1ea9000 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentChangesCache

type CurrentChangesCache interface {
	// Get returns the current cache.
	Get() map[string]*types.CurrentlyProcessingChange

	// Add creates an entry in the changes cache if it does not already
	// exist. It returns the cqStartTime of this attempt and a boolean
	// indicating whether this is a new CQ attempt.
	Add(ctx context.Context, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch string, dryRun, internal bool, changeID, latestPatchsetID int64) (int64, bool, error)

	// Remove removes the specified change from the cache.
	Remove(ctx context.Context, changeEquivalentPatchset string) error
}

func GetCurrentChangesCache

func GetCurrentChangesCache(ctx context.Context, dbClient db.DB) (CurrentChangesCache, error)

type CurrentChangesCacheImpl

type CurrentChangesCacheImpl struct {
	// contains filtered or unexported fields
}

func (*CurrentChangesCacheImpl) Add

func (c *CurrentChangesCacheImpl) Add(ctx context.Context, changeEquivalentPatchset, changeSubject, changeOwner, repo, branch string, dryRun, internal bool, changeID, latestPatchsetID int64) (int64, bool, error)

Add implements the CurrentChangesCache interface.

func (*CurrentChangesCacheImpl) Get

Get implements the CurrentChangesCache interface.

func (*CurrentChangesCacheImpl) Remove

func (c *CurrentChangesCacheImpl) Remove(ctx context.Context, changeEquivalentPatchset string) error

Remove implements the CurrentChangesCache interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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