Skip to content

Commit

Permalink
use int64 type for offset since uint64 is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Aug 30, 2020
1 parent 3d6f0f1 commit a5479da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type ErrorHandler interface {
// ServerPublishEvent has info about received channel Publication.
type ServerPublishEvent struct {
Channel string
Offset uint64
Offset int64
Data []byte
Info *ClientInfo
}
Expand Down Expand Up @@ -198,7 +198,7 @@ func (p *eventProxy) OnMessage(_ *gocentrifuge.Client, e gocentrifuge.MessageEve
func (p *eventProxy) OnServerPublish(_ *gocentrifuge.Client, e gocentrifuge.ServerPublishEvent) {
event := &ServerPublishEvent{
Channel: e.Channel,
Offset: e.Offset,
Offset: int64(e.Offset),
Data: e.Data,
}
if e.Info != nil {
Expand Down Expand Up @@ -350,7 +350,7 @@ type JoinEvent struct {

// PublishEvent has info about received channel Publication.
type PublishEvent struct {
Offset uint64
Offset int64
Data []byte
Info *ClientInfo
}
Expand Down Expand Up @@ -400,7 +400,7 @@ type subEventProxy struct {

func (p *subEventProxy) OnPublish(_ *gocentrifuge.Subscription, e gocentrifuge.PublishEvent) {
event := &PublishEvent{
Offset: e.Offset,
Offset: int64(e.Offset),
Data: e.Data,
}
if e.Info != nil {
Expand Down
4 changes: 2 additions & 2 deletions subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

// Publication ...
type Publication struct {
Offset uint64
Offset int64
Data []byte
Info *ClientInfo
}
Expand Down Expand Up @@ -79,7 +79,7 @@ func (d *HistoryData) ItemAt(i int) *Publication {
}
}
return &Publication{
Offset: pub.Offset,
Offset: int64(pub.Offset),
Data: pub.Data,
Info: info,
}
Expand Down

0 comments on commit a5479da

Please sign in to comment.