api-events

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package api-events demonstrates the api/events builder: define channels with codec-backed payload types, get typed Decode/Encode helpers, and generate a full AsyncAPI 2.6 spec — all without importing any messaging library.

AsyncAPI operations are app-centric:

  • Subscribe: this app RECEIVES messages on the channel (consumer)
  • Publish: this app SENDS messages on the channel (producer)
  • Both: bidirectional — set both Subscribe and Publish on one ChannelConfig

The same ChannelHandle.Decode and ChannelHandle.Encode helpers work unchanged with MQTT (Paho), AMQP, Kafka, NATS, or any other message broker.

Run with: go run ./examples/api-events

Jump to

Keyboard shortcuts

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