go-easy-pubsub

module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT

README

easy pubsub Go Reference Go Report Card GitHub go.mod Go version GitHub release (latest SemVer)

Installation
go get github.com/buraksecer/go-easy-pubsub v0.0.2

Example

Firstly, you must Init new topic operation.

topic.Init(clientId)

You can create basicly a client

topic.Create(topicName)

You can list the topic of the client

topics := topic.Topics()

for _, v := range topics.Topics {
	fmt.Println(v)
}

After, you can create a new subscription

topic.CreateSubscription(topicName, subName)

You can list the subscription of the client

topic.Subscriptions(topicName)

After finally, let's go Publish first message :)

topic.Publish(topicName, "Fly me to the moon..")

And exactly, you must pull the message -_-

topic.Receive(subName)

Google pub/sub service easy way to use

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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