MCPcopy
hub / github.com/Terry-Mao/goim

github.com/Terry-Mao/goim @v2.0.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.0.0 ↗
1,000 symbols 2,313 edges 84 files 315 documented · 32%
README

goim

Terry-Mao/goim is a IM and push notification server cluster.



Features

  • Light weight
  • High performance
  • Pure Golang
  • Supports single push, multiple push, room push and broadcasting
  • Supports one key to multiple subscribers (Configurable maximum subscribers count)
  • Supports heartbeats (Application heartbeats, TCP, KeepAlive)
  • Supports authentication (Unauthenticated user can't subscribe)
  • Supports multiple protocols (WebSocket,TCP)
  • Scalable architecture (Unlimited dynamic job and logic modules)
  • Asynchronous push notification based on Kafka

Installing

Dependencies

$ yum -y install java-1.7.0-openjdk

Install Kafka

Please follow the official quick start here.

Install Golang environment

Please follow the official quick start here.

Deploy goim

1.Download goim

$ yum install git
$ cd $GOPATH/src
$ git clone https://github.com/Terry-Mao/goim.git
$ cd $GOPATH/src/goim
$ go get ./...

2.Install router、logic、comet、job modules(You might need to change the configuration files based on your servers)

$ cd $GOPATH/src/goim/router
$ go install
$ cp router-example.conf $GOPATH/bin/router.conf
$ cp router-log.xml $GOPATH/bin/
$ cd ../logic/
$ go install
$ cp logic-example.conf $GOPATH/bin/logic.conf
$ cp logic-log.xml $GOPATH/bin/
$ cd ../comet/
$ go install
$ cp comet-example.conf $GOPATH/bin/comet.conf
$ cp comet-log.xml $GOPATH/bin/
$ cd ../logic/job/
$ go install
$ cp job-example.conf $GOPATH/bin/job.conf
$ cp job-log.xml $GOPATH/bin/

Everything is DONE!

Run goim

You may need to change the log files location.

$ cd /$GOPATH/bin
$ nohup $GOPATH/bin/router -c $GOPATH/bin/router.conf 2>&1 > /data/logs/goim/panic-router.log &
$ nohup $GOPATH/bin/logic -c $GOPATH/bin/logic.conf 2>&1 > /data/logs/goim/panic-logic.log &
$ nohup $GOPATH/bin/comet -c $GOPATH/bin/comet.conf 2>&1 > /data/logs/goim/panic-comet.log &
$ nohup $GOPATH/bin/job -c $GOPATH/bin/job.conf 2>&1 > /data/logs/goim/panic-job.log &

If it fails, please check the logs for debugging.

Testing

Check the push protocols herepush HTTP protocols

Configurations

TODO

Examples

Websocket: Websocket Client Demo

Android: Android SDK

iOS: iOS

Documents

push HTTP protocols

Comet client protocols

More

TODO

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Printf
called by 50
internal/comet/whitelist.go
Flush
called by 24
pkg/bufio/bufio.go
Reset
called by 21
pkg/bufio/bufio.go
WriteString
called by 19
pkg/bufio/bufio.go
PutInt32
called by 18
pkg/encoding/binary/endian.go
Peek
called by 18
pkg/bufio/bufio.go
Write
called by 16
pkg/bufio/bufio.go
Get
called by 16
internal/comet/ring.go

Shape

Method 694
Function 198
Struct 98
TypeAlias 6
Interface 4

Languages

Go99%
TypeScript1%

Modules by API surface

api/logic/grpc/api.pb.go335 symbols
api/comet/grpc/api.pb.go186 symbols
pkg/bufio/bufio_test.go61 symbols
pkg/bufio/bufio.go29 symbols
pkg/time/timer.go21 symbols
internal/comet/bucket.go17 symbols
internal/logic/dao/redis.go14 symbols
internal/logic/conf/conf.go12 symbols
internal/comet/conf/conf.go12 symbols
pkg/websocket/conn.go11 symbols
internal/logic/balancer.go11 symbols
internal/logic/grpc/server.go10 symbols

Dependencies from manifests, versioned

github.com/Bilibili/discoveryv0.0.0-2018103110534 · 1×
github.com/BurntSushi/tomlv0.3.1 · 1×
github.com/Shopify/saramav1.19.0 · 1×
github.com/bsm/sarama-clusterv2.1.15+incompatible · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/eapache/go-resiliencyv1.1.0 · 1×
github.com/eapache/go-xerial-snappyv0.0.0-2018081417443 · 1×
github.com/eapache/queuev1.1.0 · 1×
github.com/gin-contrib/ssev0.0.0-2017010909383 · 1×
github.com/golang/glogv0.0.0-2016012623530 · 1×

For agents

$ claude mcp add goim \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact