caches

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(path, hash string) (file *commits.File, ok bool)
	Set(commitId string, commit *commits.Commit) error
}

type Local

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

func Download

func Download(ctx context.Context, from repos.Repo, to repos.FS) (*Local, error)

Download the cache to the local filesystem

func Load

func Load(fsys repos.FS) (*Local, error)

Load from existing cache

func (*Local) Download

func (c *Local) Download(ctx context.Context, repo repos.Repo) error

Download the latest commits

func (*Local) Get

func (c *Local) Get(path, hash string) (file *commits.File, ok bool)

func (*Local) Set

func (c *Local) Set(commitId string, commit *commits.Commit) error

Jump to

Keyboard shortcuts

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