Skip to content

xingskycn/apnsd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apnsd

apns + redis = apnsd

in developing, it is still alpha quality

usage

go get github.com/makeitreal/apnsd/cmd/apnsd
apnsd -apnsCer="path/to/cerfile" -apnsKey="path/to/keyfile"

enqueue msg

Send LPUSH command to redis-server with key that apnsd watch and message encoded as messagepack. Default redis key is APNSD:MSG_QUEUE.

msg spec

{
    token:      binary
    payload:    string encoded as json
    expire:     uint32
    priority:   uint8
    identifier: uint32
}

If identifier is 0, apnsd set identifier with incrmented number. Expire and priority spec is here.

Payload size should be less than or equal to 256 bytes. apnsd trim payload body ( aps.alert or aps.alert.body ) automatically.

failed msg

When APNS server receive wrong msg, return error response include error status and identifier (detail is here). Apnsd send lpush command to redis server with key and msg include error status encoded as messagepack when received. Default redis key is APNSD:FAILED_MSG_QUEUE.

failed msg spec

{
    token:      binary
    payload:    string encoded as json
    expire:     uint32
    priority:   uint8
    identifier: uint32
    status:     uint8
}

todo

  • feedback service
  • write document
  • graceful shutdown

feature

About

apns + redis = apnsd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%