Discover Packages
github.com/xgodev/boost
builder
examples
simple
stockaudit
package
Version:
v1.7.0
Opens a new window with list of versions in this module.
Published: Oct 20, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package stockaudit checks the stock of a list of items in app stock-audit,
a job: the app runs the audit once and exits, the shape of a CronJob.
Auditor checks the stock of the items Options lists.
New provides the auditor with the stock service of the app, wrapped in
the middlewares @Middleware lists on it.
@Provide(index=0)
Run asks the stock for each item and logs the ones that are out. A stock
that fails stops the audit with its error, and the app exits 1.
@Job(app=stock-audit)
type Options struct {
Items []string `default:"book,pen,sold-out" desc:"items the audit checks"`
}
Options configures the audit. inject generates its config keys
(builder.examples.simple.stockaudit.*) and provides *Options to New.
@Config
Source Files
¶
Click to show internal directories.
Click to hide internal directories.