Implementing rpc example in Go

This commit is contained in:
Dan Buch
2012-12-02 08:41:05 -05:00
parent b0553c1b8d
commit 9fd03cab2f
4 changed files with 122 additions and 3 deletions

View File

@@ -2,12 +2,18 @@ package sylvilagus
import (
"log"
"time"
)
import (
"github.com/streadway/amqp"
)
type Ping struct {
ClientName string `json:"client_name"`
Time time.Time `json:"time"`
}
func CreateRPCTopology(connection *amqp.Connection) (channel *amqp.Channel, err error) {
if channel, err = connection.Channel(); err != nil {
log.Println("Failed to get channel!: ", err)