Versions in this module Expand all Collapse all v0 v0.11.0 Oct 31, 2026 Changes in this version + var ErrCacheFull = errors.New("git cache is full") + var ErrNotFound = errors.New("repository not found upstream") + var ErrRefused = errors.New("upstream refused the request") + var ErrRequestTooLarge = errors.New("request body too large") + var ErrTooLarge = errors.New("repository is larger than git.max_repo_size or git.max_size") + func UpstreamDir(name, baseURL string) string + type Cache struct + func New(opts Options) (*Cache, error) + func (c *Cache) Close() error + func (c *Cache) Open(ctx context.Context, key, repoURL string, opts OpenOptions) (*Lease, error) + func (c *Cache) ReadRequest(r *http.Request) (*Request, error) + type Lease struct + func (l *Lease) Hit() bool + func (l *Lease) Release() + func (l *Lease) ServeInfoRefs(w http.ResponseWriter, r *http.Request) + func (l *Lease) ServeUploadPack(w http.ResponseWriter, r *http.Request, req *Request) + type OpenOptions struct + FetchWants bool + Refresh bool + type Options struct + CacheDir string + Client *http.Client + Logger *slog.Logger + MaxRepoSize int64 + MaxSize int64 + RefreshWait time.Duration + StaleMaxAge time.Duration + Upstreams map[string]string + type Request struct + func (req *Request) Close()