appkit

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT

README

AppKit

AppKit is a collection of opinionated Go packages for building robust and scalable applications. It aims to provide standard patterns for common problems like lifecycle management, configuration, and more.

Packages

Lifecycle

The lifecycle package provides primitives for managing the start/stop sequences of application components. It introduces Runnable and Lifecycle interfaces to standardize long-running processes and their coordination.

  • Runnable: Represents a blocking process (e.g., HTTP server, worker loop).
  • Lifecycle: Represents a component with non-blocking Start/Stop phases.
  • Adapters: Helpers to convert Lifecycle components into Runnable processes that can be easily managed with errgroup.
Worker Pool

The workerpool package provides a service for running small parts of code (called jobs) in the background. It is compatible with the Lifecycle interface.

  • Jobs: Functions with context support, timeouts, and rich retry strategies.

  • Pool: Manages a set of workers to execute jobs concurrently.

  • Middleware: Support for panic recovery, logging, retries, and timeouts.

Logger

The logger package defines a common logging interface and provides implementations for various logging libraries.

  • Interface: A standard Logger interface for consistent logging across the application.

  • Implementations: Includes zerolog, slog, and Nop logger implementations.

Directories

Path Synopsis
internal
contexts
Package contexts provides utilities for working with Go contexts.
Package contexts provides utilities for working with Go contexts.
Package logger defines a common logging interface and provides implementations for various logging libraries.
Package logger defines a common logging interface and provides implementations for various logging libraries.
Package version provides version information for the application.
Package version provides version information for the application.
Package workerpool provides a service for running small parts of code (called jobs) in the background.
Package workerpool provides a service for running small parts of code (called jobs) in the background.

Jump to

Keyboard shortcuts

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