liveBook · Manning

Callback

As explained in Logs and Telemetry

A callback is a function invoked by a framework or runtime in response to a lifecycle event or processing opportunity.

A callback is a function invoked by a framework or runtime at a lifecycle event or processing opportunity. In a Fluent Bit Go input plugin, callbacks register the plugin, validate configuration, retrieve records, encode payloads, clean up, and exit. section 10.6.2

How Logs and Telemetry covers it

How deep it goes
Shows registration, initialization, processing, cleanup, and exit implementations, including configuration, encoding, state, and return codes.
Examples
Uses Go functions for registration, initialization, input processing, cleanup, and exit, with database records as input.
What it assumes
Assumes Go, plugin configuration, database retrieval, and C-compatible data handling through pointers and transformations.
What you can do after
Build it from scratch by implementing lifecycle callbacks for a Go-based Fluent Bit input plugin.
How it connects
Ties callbacks to input plugins, Go, database queries, MessagePack encoding, configuration validation, and return codes.

Also explained in

Compare how 18 books explain callback →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Logs and Telemetry. The section links point to the parts of the book it draws on.