jaywalk

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT

README ΒΆ

πŸŒ€ jaywalk: rx observable concurrent directory walker

A B A B A B Go Reference Go report Coverage Status Astrolib Continuous Integration pre-commit A B

go.dev

πŸ”° Introduction

This project provides a directory walker in the same vein as the Walk in standard library filepath, but provides many features in addition to the basic facility of simply navigating. These include, but not limited to the following:

  • Comprehensive filtering with regex/glob patterns
  • Resume, from a previous navigation that was prematurely terminated (typically via a ctrl-c interrupt), or cancellation via a context; this is particularly useful if the client program runs heavy IO bound tasks resulting in relatively long batch runs
  • Hibernation, this allows for client defined action to be invoked for eligible file/folders encountered during navigation, when a particular condition occurs; as opposed to invoking the client action for every file/folder from the root onwards. The navigator starts off in a hibernated state, then when the condition occurs, the navigator awakens and begins invoking the client action for eligible nodes.
  • Concurrent navigation implemented with a reactive model, using rx observables
  • Compatibility with os.fs file system
  • Ability to hook many aspects of the traversal process

πŸ“š Usage

πŸŽ€ Features

ginkgo gomega

🌐 l10n Translations

This template has been setup to support localisation. The default language is en-GB with support for en-US. There is a translation file for en-US defined as src/i18n/deploy/astrolib.active.en-US.json. This is the initial translation for en-US that should be deployed with the app.

Make sure that the go-i18n package has been installed so that it can be invoked as cli, see go-i18n for installation instructions.

To maintain localisation of the application, the user must take care to implement all steps to ensure translate-ability of all user facing messages. Whenever there is a need to add/change user facing messages including error messages, to maintain this state, the user must:

  • define template struct (xxxTemplData) in src/i18n/messages.go and corresponding Message() method. All messages are defined here in the same location, simplifying the message extraction process as all extractable strings occur at the same place. Please see go-i18n for all translation/pluralisation options and other regional sensitive content.

For more detailed workflow instructions relating to i18n, please see i18n README

πŸ“¨ Message Bus
  • Contains an alternative version of bus. The requirement for a bus implementation is based upon the need to create loosely coupled internal code. The original bus was designed with concurrency in mind so it uses locks to achieve thread safety. This aspect is surplus to requirements as all we need it for are synchronous scenarios, so it has been striped out.

Directories ΒΆ

Path Synopsis
cmd
jay command
Package main provides CLI functionality for the jay application.
Package main provides CLI functionality for the jay application.
Package locale contains i18n translations definition required to integrate with go-i18n.
Package locale contains i18n translations definition required to integrate with go-i18n.
src
agenor
Package agenor is the front line user facing interface to this module.
Package agenor is the front line user facing interface to this module.
agenor/collections
Package collections provides implementations of various collection types.
Package collections provides implementations of various collection types.
agenor/core
Package core contains universal definitions and handles user facing cross cutting concerns.
Package core contains universal definitions and handles user facing cross cutting concerns.
agenor/enums
Package enums provides the enumeration types for the agenor library.
Package enums provides the enumeration types for the agenor library.
agenor/internal/enclave
Package enclave defines internal types
Package enclave defines internal types
agenor/internal/feat
Package feat defines features implemented as plugins
Package feat defines features implemented as plugins
agenor/internal/feat/filter
Package filter defines filters
Package filter defines filters
agenor/internal/feat/hiber
Package hiber represents the facility to be able to start navigation in hibernated state, ie we navigate but dont invoke a client action, until a certain condition occurs, specified by a node matching a filter.
Package hiber represents the facility to be able to start navigation in hibernated state, ie we navigate but dont invoke a client action, until a certain condition occurs, specified by a node matching a filter.
agenor/internal/feat/nanny
Package nanny handles a node's children for directories with children subscription
Package nanny handles a node's children for directories with children subscription
agenor/internal/feat/resume
Package resume depends on hiber, filter and persist.
Package resume depends on hiber, filter and persist.
agenor/internal/feat/sampling
Package sampling refers to the ability to just take a sample from each directory encountered during traversal.
Package sampling refers to the ability to just take a sample from each directory encountered during traversal.
agenor/internal/filtering
Package filtering is required because filters are required not just by the filter plugin, but others too like hibernation.
Package filtering is required because filters are required not just by the filter plugin, but others too like hibernation.
agenor/internal/kernel
Package kernel contains the core traversal functionality.
Package kernel contains the core traversal functionality.
agenor/internal/laboratory
Package lab (laboratory) is a test package providing testing helpers used internally within agenor.
Package lab (laboratory) is a test package providing testing helpers used internally within agenor.
agenor/internal/level
Package level contains functionality concerned only with depth management.
Package level contains functionality concerned only with depth management.
agenor/internal/opts
Package opts internal options handling; can't use persist
Package opts internal options handling; can't use persist
agenor/internal/opts/jason
Package jason provides options related to JSON handling and processing within the application.
Package jason provides options related to JSON handling and processing within the application.
agenor/internal/persist
Package persist defines marshalling functionality.
Package persist defines marshalling functionality.
agenor/life
Package life represents life cycle events; can't use prefs
Package life represents life cycle events; can't use prefs
agenor/pref
Package pref contains user option definitions; do not use anything in kernel (cyclic).
Package pref contains user option definitions; do not use anything in kernel (cyclic).
agenor/stock
Package stock contain functions that can be considered addenda to the std golang library.
Package stock contain functions that can be considered addenda to the std golang library.
agenor/tapable
Package tapable enables entities to expose hooks
Package tapable enables entities to expose hooks
agenor/test/cmd/venus command
Package main provides a test command-line utility for navigating a file system tree using the Agenor library.
Package main provides a test command-line utility for navigating a file system tree using the Agenor library.
agenor/test/hanno
Package hanno provides utilities for building a virtual file system tree based on an XML index file.
Package hanno provides utilities for building a virtual file system tree based on an XML index file.
agenor/tfs
Package tfs provides a local file system implementation for traversal.
Package tfs provides a local file system implementation for traversal.
app/command
Package command provides CLI commands for the jay application.
Package command provides CLI commands for the jay application.
app/command/internal/cfg
Package cfg handles all configuration concerns for jay, including loading, validation, and access to config values.
Package cfg handles all configuration concerns for jay, including loading, validation, and access to config values.
app/ui
Package ui defines the user interface abstraction for jay.
Package ui defines the user interface abstraction for jay.
examples/nexus command
Package main implements a multi-threaded file system navigator for test/demonstration purposes.
Package main implements a multi-threaded file system navigator for test/demonstration purposes.
internal/services
Package services can contain anything which is a cross cutting concern so much so that explicitly passing them around just results in tighter coupling.
Package services can contain anything which is a cross cutting concern so much so that explicitly passing them around just results in tighter coupling.
internal/third
Package third contains inline clones of third party packages which have been modified for custom purposes; as opposed to forking said packages.
Package third contains inline clones of third party packages which have been modified for custom purposes; as opposed to forking said packages.
internal/third/bus
Package bus is a collection of helper functions for common operations.
Package bus is a collection of helper functions for common operations.
internal/third/lo
Package lo is a collection of helper functions for common operations.
Package lo is a collection of helper functions for common operations.
tools
inspect command
inspect: Extract exported declarations from Go modules in the module cache.
inspect: Extract exported declarations from Go modules in the module cache.

Jump to

Keyboard shortcuts

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