Skip to content

event broadcast / eventemitter for golang

License

Notifications You must be signed in to change notification settings

eccosuprastyo/warta

Repository files navigation

Warta

Tests Status Coverage Status Go Report Status Quality Gate Status
SonarCloud

Warta is a Golang package for event broadcast/emitters.

Installation

Use go get command.

go get github.com/raspiantoro/warta

Usage

func main() {

	var helloTopic warta.TopicName = "hello"

	helloFunc := func(fName string, lName string) {
		fmt.Printf("Hello %s %s\n", fName, lName)
	}

	warta := warta.New()

	l, err := warta.ListenCreate(helloTopic, helloFunc)
	if err != nil {
		panic(err)
	}
	defer l.Close()

	warta.BroadcastClose(helloTopic, "John", "Doe")

}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

event broadcast / eventemitter for golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages