deps

package
v0.0.0-...-223af15 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package deps provides functionality for parsing dependency files and generating .deps files used by RE Proxy for invalidating remote cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// ExecRoot is the exec root under which all file paths are relative.
	ExecRoot string
	// DigestStore is a store for file digests as read from disk.
	DigestStore filemetadata.Cache
}

Parser parses dependency files into manifests.

func (*Parser) GetDeps

func (p *Parser) GetDeps(dFilePath string) (string, error)

GetDeps returns the deps file content based on the d file and include directories. The deps are formatted as sorted unique "<path>:<digest>\n" lines. If <digest> is "NA", it means it failed to get digest of the file.

func (*Parser) VerifyDepsFile

func (p *Parser) VerifyDepsFile(dFilePath string, rec *logger.LogRecord) (bool, error)

VerifyDepsFile compares an existing deps file in the expected <path>.d.deps path to the one that would be generated from the provided d file and include directories.

func (*Parser) WriteDepsFile

func (p *Parser) WriteDepsFile(dFilePath string, rec *logger.LogRecord) error

WriteDepsFile creates a deps file from the provided d file and include directories. The path of the deps file is the same as the provided d file, with the .deps extension.

Jump to

Keyboard shortcuts

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