Implementing rpc example in Go
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user