Back to

package sourcecache

v0.0.0 (6b5029f)
Latest Go to latest
Published: 1 day ago | License: BSD-3-Clause | Module:


Package sourcecache provides a cache of code found in Git repositories. It takes directly to the Gerrit instance at If RegisterGitMirrorDial is called, it will first try to get code from gitmirror before falling back on Gerrit.


func GetSourceTgz

func GetSourceTgz(sl spanlog.Logger, repo, rev string) (tgz io.Reader, err error)

GetSourceTgz returns a Reader that provides a tgz of the requested source revision. repo is repo ("go", "net", etc) rev is git revision.

func RegisterGitMirrorDial

func RegisterGitMirrorDial(dial func(context.Context) (net.Conn, error))

RegisterGitMirrorDial registers a dial function which will be used to reach gitmirror. If used, this function must be called before GetSourceTgz.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier