bufgraph

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 10 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

This section is empty.

Types

type BuildOption

type BuildOption func(*buildOptions)

BuildOption is an option for Build.

func BuildWithWorkspace

func BuildWithWorkspace(workspace bufmodule.Workspace) BuildOption

BuildWithWorkspace returns a new BuildOption that specifies a workspace that is being operated on.

type Builder

type Builder interface {
	// Build builds the dependency graph.
	Build(
		ctx context.Context,
		modules []bufmodule.Module,
		options ...BuildOption,
	) (*dag.Graph[Node], []bufanalysis.FileAnnotation, error)
}

Builder builds dependency graphs.

func NewBuilder

func NewBuilder(
	logger *zap.Logger,
	moduleResolver bufmodule.ModuleResolver,
	moduleReader bufmodule.ModuleReader,
) Builder

NewBuilder returns a new Builder.

type Node

type Node struct {
	// Required,
	Remote string
	// Required.
	Owner string
	// Required.
	Repository string
	// Optional. Will not bet set for modules read from workspaces.
	Commit string
}

Node is a node in a dependency graph.

This is a struct because this needs to be comparable for the *dag.Graph.

TODO: Don't have the duplication across Node and ImageModuleDependency.

func (*Node) IdentityString

func (n *Node) IdentityString() string

IdentityString prints remote/owner/repository.

func (*Node) String

func (n *Node) String() string

String prints remote/owner/repository[:commit].

Jump to

Keyboard shortcuts

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