action

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAction

func NewAction(id string, in *anpb.Action, artifacts artifact.PathMap, targets target.Map, deps depset.Resolver) (*dipb.Action, error)

Types

type ActionMap

type ActionMap map[string]*dipb.Action

ActionMap is a map of string -> action.

func NewMnemonicFileMap

func NewMnemonicFileMap(actions []*dipb.Action) ActionMap

NewMnemonicFileMap creates a new actionOutputMap were the key is the primary output file(s) of the action. In the strategy, the last action having the mnemonic wins.

func NewOutputFilesMap

func NewOutputFilesMap(actions []*dipb.Action) ActionMap

NewOutputFilesMap creates a new actionOutputMap were the key is the primary output file(s) of the action.

type ActionMapper

type ActionMapper func([]*dipb.Action) ActionMap

ActionMapper is a function that creates an ActionMap from a list of Actions.

type Graph

type Graph struct {
	Name           string
	Container      *anpb.ActionGraphContainer
	Artifacts      artifact.PathMap
	Targets        target.Map
	DepSetOfFiles  depset.Map
	DepSetResolver depset.Resolver
	Actions        []*dipb.Action
}

Graph holds compiled data about the action graph container.

func NewGraph

func NewGraph(name string, container *anpb.ActionGraphContainer) (*Graph, error)

func (*Graph) GetPrimaryTarget

func (g *Graph) GetPrimaryTarget() string

GetPrimaryTarget returns the most common target from the actions in the graph, or empty string if there are no actions.

type OutputPair

type OutputPair struct {
	Output string
	Action *dipb.Action // representative of before/after
	Before *dipb.Action
	After  *dipb.Action
	// contains filtered or unexported fields
}

func (*OutputPair) Diff

func (p *OutputPair) Diff() string

func (*OutputPair) UnifiedDiff

func (p *OutputPair) UnifiedDiff() gotextdiff.Unified

type OutputPairs

type OutputPairs []*OutputPair

func Partition

func Partition(before, after ActionMap) (beforeOnly, afterOnly, both OutputPairs)

func (OutputPairs) Len

func (p OutputPairs) Len() int

func (OutputPairs) Less

func (p OutputPairs) Less(i, j int) bool

func (OutputPairs) Swap

func (p OutputPairs) Swap(i, j int)

Jump to

Keyboard shortcuts

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