Discover Packages
github.com/xgodev/boost
builder
examples
simple
stock
memory
package
Version:
v1.6.1
Opens a new window with list of versions in this module.
Published: Oct 19, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package memory keeps the stock in memory. Its methods are plain: builder
runs the middlewares @Middleware lists around each of them.
New provides the default stock service, out of the items Options lists;
every consumer receives it wrapped in the log and prometheus middlewares.
@Provide(index=0)
@Default
@Middleware(log, prometheus)
type Options struct {
SoldOut []string `default:"sold-out" desc:"items the memory stock is out of"`
}
Options configures the memory stock. inject generates its config keys
(builder.examples.simple.stock.memory.*) and provides *Options to New.
@Config
Source Files
¶
Click to show internal directories.
Click to hide internal directories.