func newSubscriptionEventHub() *subscriptionEventHub {
	return &subscriptionEventHub{}
}
newSubscriptionEventHub initializes new subscriptionEventHub.
package centrifuge
import (
	"fmt"
	"sync"
	"sync/atomic"
	"time"
	"github.com/centrifugal/protocol"
)
type SubscribeSuccessEvent struct {
	Resubscribed bool
	Recovered    bool
}
type SubscribeErrorEvent struct {
	Error string
}
type UnsubscribeEvent struct{}
type LeaveEvent struct {
	ClientInfo
}
type JoinEvent struct {
	ClientInfo
}
type PublishEvent struct {
	Publication
}
type PublishHandler interface {
	OnPublish(*Subscription, PublishEvent)
}
type JoinHandler interface {
	OnJoin(*Subscription, JoinEvent)
}
type LeaveHandler interface {
	OnLeave(*Subscription, LeaveEvent)
}
type UnsubscribeHandler interface {
	OnUnsubscribe(*Subscription, UnsubscribeEvent)
}
type SubscribeSuccessHandler interface {
	OnSubscribeSuccess(*Subscription, SubscribeSuccessEvent)
}
type SubscribeErrorHandler interface {
	OnSubscribeError(*Subscription, SubscribeErrorEvent)
}
type subscriptionEventHub struct {
	onPublish          PublishHandler
	onJoin             JoinHandler
	onLeave            LeaveHandler
	onUnsubscribe      UnsubscribeHandler
	onSubscribeSuccess SubscribeSuccessHandler
	onSubscribeError   SubscribeErrorHandler
}