chatbus

command module
v0.0.0-...-552d5ff Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GopherCon 2019 Azure Service Bus chat application (chatbus)

You are challenged to fill in the send and receive sides of a chat application using Azure Service Bus. There are two functions to fill in before you are able to chat with your fellow Gophers. You can find both functions within ./cmd/join.go.

func sendMessage(ctx context.Context, topic *servicebus.Topic, name, message string) error {
	ctx, span := tab.StartSpan(ctx, "join.sendMessage")
	defer span.End()

	// TODO: Create a ChatMessage

	// TODO: marshal ChatMessage into bits

	// TODO: send message to topic
	return nil
}

func listenForAMessage(ctx context.Context, subscription *servicebus.Subscription) (*ChatMessage, error) {
	ctx, span := tab.StartSpan(ctx, "join.listenForAMessage")
	defer span.End()

	// TODO: receive one message from the subscription and unmarshal into ChatMessage

	// TODO: return ChatMessage
	return nil, nil
}

In sendMessage you are required to send a message to an Azure Service Bus Topic. A Topic is a target for broadcast messages to be listened to many subscribers.

In listenForMessage you are required to listen to a subscription on a topic to receive messages from the topic.

Documentation

If you are up for the challenge, there is help to be had in https://godoc.org/github.com/Azure/azure-service-bus-go.

Build and run

  • git clone github.com/devigned/chatbus
  • go run .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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