Documentation
¶
Overview ¶
Package task is the module manifest: what the kernel needs to know about tasks that it cannot learn from a function call.
It is the shape every module follows: contracts/, internal/, and one exported function taking a struct of typed dependencies and returning a module.Module. main constructs it in dependency order and the compiler checks the wiring, which is the whole of docs/adr/0002 — a dependency this module needs and main did not pass is a compile error at the construction site, not a nil at boot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
// Tenants is how the SLA sweep reaches every tenant. The tenant module
// implements it in E3; until then apps/platformkit/dev.go does.
Tenants jobs.TenantLister
// SweepEvery is how often the sweep runs; zero means a minute. The promise
// this module keeps is measured in hours, so a minute of lag on noticing a
// breach is free and anything faster is a query per tenant per tick for
// nobody's benefit. A test sets it lower.
SweepEvery time.Duration
}
Deps is what this module cannot make for itself: a struct rather than a parameter list, so adding one is a named field at every call site rather than a fourth positional argument. Every module follows this, and an empty Deps is a module that needs nothing.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package contracts is everything another module, an app or a test may know about tasks: the entity, the events, the permissions and the Service interface.
|
Package contracts is everything another module, an app or a test may know about tasks: the entity, the events, the permissions and the Service interface. |
|
tasktest
Package tasktest is the conformance suite for contracts.Service, and a fake that passes it.
|
Package tasktest is the conformance suite for contracts.Service, and a fake that passes it. |
|
Package internal is every implementation of the task module.
|
Package internal is every implementation of the task module. |