lookup

package
v0.0.0-...-0abec67 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: 8 Imported by: 2

Documentation

Overview

Package lookup provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache keeps a cache of recent buildids and their associated git hashes. Since this is only used for ingesting test results this window is fine since we can presume the tests successfully finish running in under a year.

func New

func New(ctx context.Context, checkout git.Checkout) (*Cache, error)

New returns a newly populated *Cache with buildids for the last 2 weeks.

The 'checkout' is only used during the construction of *Cache.

func (*Cache) Add

func (c *Cache) Add(buildid int64, hash string)

Add a new buildid, githash to the cache.

func (*Cache) Lookup

func (c *Cache) Lookup(buildid int64) (string, error)

Lookup returns the git hash for the given buildid.

Jump to

Keyboard shortcuts

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