From 9d6d240bbc49db72fcf7435cd1fdadc19e221142 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Wed, 24 Sep 2014 19:36:09 +0400 Subject: [PATCH] Move message struct definition to hub --- hub/hub.go | 4 ++++ hub/subscription.go | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hub/hub.go b/hub/hub.go index 4813135..a1072d2 100644 --- a/hub/hub.go +++ b/hub/hub.go @@ -13,6 +13,10 @@ type ( subscribers []*Subscription lock sync.Mutex } + Message struct { + Queue string + Message []byte + } ) func New(st *storage.Storage) *Hub { diff --git a/hub/subscription.go b/hub/subscription.go index f011090..0838ff0 100644 --- a/hub/subscription.go +++ b/hub/subscription.go @@ -6,10 +6,6 @@ type ( result chan Message done chan struct{} } - Message struct { - Queue string - Message []byte - } ) func NewSubscription(queues []string) *Subscription {