walker

package
v2.19.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WalkFunc

type WalkFunc func(wd string, info *provider.ResourceInfo, err error) error

WalkFunc is the type of function called by Walk to visit each file or directory

Each time the Walk function meet a file/folder path is set to the full path of this. The err argument reports an error related to the path, and the function can decide the action to do with this.

The error result returned by the function controls how Walk continues. If the function returns the special value SkipDir, Walk skips the current directory. Otherwise, if the function returns a non-nil error, Walk stops entirely and returns that error.

type Walker

type Walker interface {
	// Walk walks the file tree rooted at root, calling fn for each file or folder in the tree, including the root.
	Walk(ctx context.Context, root *provider.ResourceId, fn WalkFunc) error
}

Walker is an interface implemented by objects that are able to walk from a dir rooted into the passed path

func NewWalker

func NewWalker(gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) Walker

NewWalker creates a Walker object that uses the reva gateway

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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