modules

command
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command modules is the program of the recipe "Organize tasks by module", docs/recipes/organize-tasks-by-module.md: one binary of two modules, orders and billing, which share one taskmill schema. Each module owns its task types, its queue, its handlers, and its schedules, and main puts them together.

docker run --name taskmill-pg -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:18
go run ./examples/modules

It reads the database from DATABASE_URL, by default the one that the docker command above starts. It places one order, logs the receipt and the invoice, and runs until Ctrl-C.

Directories

Path Synopsis
internal
billing
Package billing is the billing module of the example: it creates invoices.
Package billing is the billing module of the example: it creates invoices.
billing/billingtasks
Package billingtasks holds the tasks of the billing module: the types that other modules enqueue, and nothing else.
Package billingtasks holds the tasks of the billing module: the types that other modules enqueue, and nothing else.
orders
Package orders is the orders module of the example: it takes orders.
Package orders is the orders module of the example: it takes orders.
orders/ordertasks
Package ordertasks holds the tasks of the orders module: the types that other modules enqueue, and nothing else.
Package ordertasks holds the tasks of the orders module: the types that other modules enqueue, and nothing else.

Jump to

Keyboard shortcuts

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