Help us shape the future of Go! Take the 2026 Go Developer Survey

memory

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package memory keeps the stock in memory. Its methods are plain: builder runs the middlewares @Middleware lists around each of them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(o *Options) stock.Service

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)

Types

type Options

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

Jump to

Keyboard shortcuts

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