Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.48 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.48 KB

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