job

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 1 Imported by: 1 module, 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.

README

bootstrap/job

A job is a function an app runs once and then exits, the shape of a Kubernetes CronJob:

// Handler is the work of a job.
type Handler func(ctx context.Context) error

It returns when the work is done, with the error that makes the app exit non-zero, or when ctx is cancelled because the app is stopping (SIGTERM). fx/modules/bootstrap/job runs it; builder generates the app from @Job:

// Run checks the stock of the configured items.
// @Job(app=stock-audit)
func (a *Auditor) Run(ctx context.Context) error { ... }

Documentation

Overview

Package job is a function an app runs once and then exits, the shape of a Kubernetes CronJob. fx/modules/bootstrap/job runs it; builder generates the app from @Job.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(ctx context.Context) error

Handler is the work of a job. It returns when the work is done, with the error that makes the app exit non-zero, or when ctx is cancelled because the app is stopping (SIGTERM).

Jump to

Keyboard shortcuts

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