We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gocent verison: v3.3.0 centrifugo version: v4 / v5 , v3 maybe?
v3.3.0
v4 / v5
v3 maybe?
github.com/centrifugal/gocent/v3 v3.3.0 is not working when using with these codes:
github.com/centrifugal/gocent/v3 v3.3.0
func doServerSubscribe(client string) { cc := gocent.New(gocent.Config{ Addr: "http://127.0.0.1:8000/api", Key: "fake-key", }) err := cc.Subscribe(context.TODO(), "foo", client, gocent.WithPresence(true), gocent.WithJoinLeave(true)) if err != nil { log.Fatalf("Server Subscribe failed %v", err) } }
params from gocent.WithPresence(true), gocent.WithJoinLeave(true) will be ignored from centrifugo v4 to v5
gocent.WithPresence(true), gocent.WithJoinLeave(true)
encoded json result is:
{"method":"subscribe","params":{"channel":"foo","user":"3e3fc43b-bef9-4ab5-a3da-4c96c688351e","presence":true,"join_leave":true}}
and, this will be ignored when decode from centrifugo server code, with SubscribeRequest from internal/apiproto/api.pb.go
SubscribeRequest
internal/apiproto/api.pb.go
SubscribeRequest require all fields inside override sub field.
override
type SubscribeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` ExpireAt int64 `protobuf:"varint,3,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"` Info Raw `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` B64Info string `protobuf:"bytes,5,opt,name=b64info,proto3" json:"b64info,omitempty"` Client string `protobuf:"bytes,6,opt,name=client,proto3" json:"client,omitempty"` Data Raw `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` B64Data string `protobuf:"bytes,8,opt,name=b64data,proto3" json:"b64data,omitempty"` RecoverSince *StreamPosition `protobuf:"bytes,9,opt,name=recover_since,json=recoverSince,proto3" json:"recover_since,omitempty"` Override *SubscribeOptionOverride `protobuf:"bytes,10,opt,name=override,proto3" json:"override,omitempty"` Session string `protobuf:"bytes,11,opt,name=session,proto3" json:"session,omitempty"` }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
gocent verison:
v3.3.0
centrifugo version:
v4 / v5
,v3 maybe?
github.com/centrifugal/gocent/v3 v3.3.0
is not working when using with these codes:params from
gocent.WithPresence(true), gocent.WithJoinLeave(true)
will be ignored from centrifugo v4 to v5encoded json result is:
and, this will be ignored when decode from centrifugo server code,
with
SubscribeRequest
frominternal/apiproto/api.pb.go
SubscribeRequest require all fields inside
override
sub field.The text was updated successfully, but these errors were encountered: