Terry-Mao/gopush-cluster Web http protocol document
Web internal interface document, used for push or delete messages so on
ErrorCode
Description
0
Success
65534
Parameter Error
65535
Internal Error
{
"ret": 0, //ErrorCode
"data": {….}//Data does not appear if data is null or ret != 0
}
Push Single Private Message
Parameter
Type
Description
key
string
Subscription key
expire
int64
Message Expire Time, Unit:second
Note: Messages stored in body and must be json format, service will intactly return to client. Above just as URL Parameter.
ErrorCode
Description
1001
no node
{
"ret": 0
}
Push Multiple Private Message
Parameter
Type
Description
expire
int64
Message Expire Time, Unit:second
push-message json structure like following:
{
"m": "{\"test\":1}",
"k": "t1,t2,t3"
}
Parameter
Type
Description
m
string
push-message, must be json string
k
string
subcribe key, comma separated
ErrorCode
Description
1001
no node
{
"data": {
"fk": [ //if push part of messages failed, then return into fk. in normal case, no fk.
"t1",
"t2"
]
},
"ret": 0
}
Node: It will delete all of messages what belong to specify key and it will delete the Channel in the Comet-Service, for release memory
Parameter
Type
Description
key
string
Subscription Key
{
"ret": 0
}