collect

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package collect provides functionality to collect file paths for processing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPath added in v0.7.2

type IPath interface {
	Kind() kind.Kind
	SetKind(kind kind.Kind)
	Val() string
	SetVal(val string)
	Err() error
	SetErr(err error)
}

IPath provides an interface for Paths collected by IPathCollectors.

func NewPath added in v0.7.2

func NewPath(kind kind.Kind, val string, err error) IPath

NewPath is a path of a specific kind, such as a Dockerfile, Composefile, or Kubernetesfile.

type IPathCollector

type IPathCollector interface {
	Kind() kind.Kind
	CollectPaths(done <-chan struct{}) <-chan IPath
}

IPathCollector provides an interface for PathCollectors, which collect paths to be processed downstream.

func NewPathCollector

func NewPathCollector(
	kind kind.Kind,
	baseDir string,
	defaultPathVals []string,
	manualPathVals []string,
	globVals []string,
	recursive bool,
) (IPathCollector, error)

NewPathCollector returns an IPathCollector after validating its fields. If recursive is true, defaultPathVals must be defined so the collector knows which files to collect as it recurs.

Jump to

Keyboard shortcuts

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