Categorygithub.com/Guicbdiniz/go-pub-sub
repository
0.0.0-20230918155531-2d08b8e0eae4
Repository: https://github.com/guicbdiniz/go-pub-sub.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

go-pub-sub

A simple PubSub library written in Golang.

Check out the Developer Diary to learn more of how I've developed this little project.

Roadmap

  • Create initial architecture sketch.
  • Create initial package without generics or use of files.
  • Add file management.
  • Add Generics.

Usage

First you must create a Pub/Sub agent:

pubSub := pubsub.CreatePubSub()

After that you can create queues, subscribe and publish string data:

pubSub.CreateQueue("my_queue")

sub, err := pubSub.Subscribe("my_queue")

err = pubSub.Publish("my_queue", message)

You can also add a logger to the agent, which will create a logging file for each queue with timestamps:

err := pubSub.AddLogger()

Check out the examples to learn more.