execunit

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileDependenciesResourceKind = "input_file_dependencies"
)

Variables

This section is empty.

Functions

func NewAssetPathMatcher

func NewAssetPathMatcher(include []string, exclude []string, filePath string) (assetPathMatcher, error)

Types

type Assets

type Assets struct{}

func (Assets) Name

func (p Assets) Name() string

func (Assets) Transform

func (p Assets) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type ExecUnitPlugin

type ExecUnitPlugin struct {
	Config *config.Application
}

func (ExecUnitPlugin) Name

func (p ExecUnitPlugin) Name() string

func (ExecUnitPlugin) Transform

func (p ExecUnitPlugin) Transform(result *core.CompilationResult, deps *core.Dependencies) error

type FileDependencies

type FileDependencies map[string]Imported

FileDependencies is a map from file (by path) to the other files it imports

func (FileDependencies) Add

func (deps FileDependencies) Add(other FileDependencies)

func (FileDependencies) Key

func (deps FileDependencies) Key() core.ResourceKey

Key implements core.CloudResource

func (FileDependencies) Type

func (FileDependencies) Type() string

type Imported

type Imported map[string]References

Imported is a map from the imported file to the set of references used by the original file

type PruneUncategorizedFiles

type PruneUncategorizedFiles struct {
}

PruneUncategorizedFiles is a plugin that performs tree-shaking on each core.ExecutionUnit in the current compilation context.

func (PruneUncategorizedFiles) Name

func (PruneUncategorizedFiles) Transform

func (p PruneUncategorizedFiles) Transform(result *core.CompilationResult, dependencies *core.Dependencies) error

type References

type References map[string]struct{}

References is a set of references that are being used from the file

func (References) Add

func (r References) Add(ref string)

func (References) Clone

func (r References) Clone() References

func (References) MarshalJSON

func (r References) MarshalJSON() ([]byte, error)

func (References) String

func (r References) String() string

type SourceFilesResolver

type SourceFilesResolver struct {
	UnitFileDependencyResolver UnitFileDependencyResolver
	UpstreamAnnotations        []string
}

func (SourceFilesResolver) Resolve

func (resolver SourceFilesResolver) Resolve(unit *core.ExecutionUnit) (map[string]struct{}, error)

type UnitFileDependencyResolver

type UnitFileDependencyResolver func(unit *core.ExecutionUnit) (FileDependencies, error)

Jump to

Keyboard shortcuts

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