gossip

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT

README

gossip (ノ◕ヮ◕)ノ*:・゚✧

A lightweight, type‑safe event bus for Go — because sometimes your code just needs to talk behind your back.


What is this?

gossip is an in‑process pub/sub library for Go. It lets your code publish events when something interesting happens (user created, login succeeded, token revoked, you name it) and lets other parts of your program subscribe without tight coupling. Think of it as a rumor mill for your application: one function whispers, the rest of the system listens in.

Why?
  • Decoupling: Core logic stays clean — side effects live in listeners.
  • Extensibility: Add logging, auditing, metrics, or notifications without touching the original code.
  • Type‑safety: Events are registered with identifiers, not raw strings, so you don’t get bitten by typos.
  • Go‑native: No Kafka, no brokers, no infra. Just a simple, fast, in‑memory bus.
Example use cases
  • Fire an audit log entry every time a user logs in.
  • Trigger a notification when a resource is updated.
  • Collect metrics when tokens are issued or revoked.
  • Or just… spread some gossip.

Getting Started

go get github.com/seyedali-dev/gossip

Directories

Path Synopsis
Package event.
Package event.
bus
Package bus.
Package bus.
middleware
Package middleware.
Package middleware.
sub
Package sub.
Package sub.

Jump to

Keyboard shortcuts

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