1
0
Fork 0

Move message struct definition to hub

This commit is contained in:
Gregory Eremin 2014-09-24 19:36:09 +04:00
parent 959bc56bc3
commit 9d6d240bbc
2 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,10 @@ type (
subscribers []*Subscription subscribers []*Subscription
lock sync.Mutex lock sync.Mutex
} }
Message struct {
Queue string
Message []byte
}
) )
func New(st *storage.Storage) *Hub { func New(st *storage.Storage) *Hub {

View File

@ -6,10 +6,6 @@ type (
result chan Message result chan Message
done chan struct{} done chan struct{}
} }
Message struct {
Queue string
Message []byte
}
) )
func NewSubscription(queues []string) *Subscription { func NewSubscription(queues []string) *Subscription {