diff --git a/.gitignore b/.gitignore index c29385f..229d260 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ centrifuge-sources.jar centrifuge.aar BUILDS/ vendor/ +.idea +.vscode \ No newline at end of file diff --git a/client.go b/client.go index b83be36..3812b2a 100644 --- a/client.go +++ b/client.go @@ -9,7 +9,6 @@ import ( // Client to connect to Centrifuge-based server or Centrifugo. type Client struct { client *gocentrifuge.Client - events *EventHub } // Config defaults. @@ -48,7 +47,6 @@ func New(u string, config *Config) *Client { } client := &Client{ client: gocentrifuge.New(u, c), - events: NewEventHub(), } return client } diff --git a/events.go b/events.go index 1dd58d8..b7247b3 100644 --- a/events.go +++ b/events.go @@ -69,21 +69,6 @@ type ErrorHandler interface { OnError(*Client, *ErrorEvent) } -// EventHub ... -type EventHub struct { - client *Client - eventHub *gocentrifuge.EventHub -} - -// NewEventHub ... -func NewEventHub() *EventHub { - return &EventHub{} -} - -func (h *EventHub) setClient(c *Client) { - h.client = c -} - type eventProxy struct { client *Client @@ -248,21 +233,6 @@ type SubscribeErrorHandler interface { OnSubscribeError(*Subscription, *SubscribeErrorEvent) } -// SubscriptionEventHub ... -type SubscriptionEventHub struct { - sub *Subscription - subEventHub *gocentrifuge.SubscriptionEventHub -} - -// NewSubscriptionEventHub initializes new SubscriptionEventHub. -func NewSubscriptionEventHub() *SubscriptionEventHub { - return &SubscriptionEventHub{} -} - -func (h *SubscriptionEventHub) setSub(s *Subscription) { - h.sub = s -} - type subEventProxy struct { sub *Subscription