bufgraph

package
v0.0.0-...-a078c60 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

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