Skip to content

Commit

Permalink
update rpc, build
Browse files Browse the repository at this point in the history
  • Loading branch information
dengzii committed Jun 16, 2022
1 parent 89fbe8f commit 79d7733
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 491 deletions.
15 changes: 15 additions & 0 deletions build/build-linux-amd64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cd ../cmd/im_service || exit

export CGO_ENABLED=0
export GOOS=linux
export GOHOSTOS=linux
export GOARCH=amd64

echo 'build...'
go build
echo 'build complete'
cp ../../config/config.toml config.toml
tar -czvf ./im_service_linux_amd64.tar.gz im_service config.toml
rm config.toml
rm im_service
read -p 'complete.'
15 changes: 15 additions & 0 deletions build/build-windows-amd64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cd ../cmd/im_service || exit

export CGO_ENABLED=0
export GOOS=windows
export GOHOSTOS=windows
export GOARCH=amd64

echo 'build...'
go build -o im_service.exe
echo 'build complete'
cp ../../config/config.toml config.toml
tar -czvf ./im_service_windows_amd64.tar.gz im_service.exe config.toml
rm config.toml
rm im_service
read -p 'complete.'
2 changes: 1 addition & 1 deletion cmd/im_service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"github.com/glide-im/glide/pkg/bootstrap"
"github.com/glide-im/glide/pkg/logger"
"github.com/glide-im/glide/pkg/messaging/message_handler"
"github.com/glide-im/glide/pkg/rpc"
"github.com/glide-im/glide/pkg/store"
"github.com/glide-im/glide/pkg/subscription/subscription_impl"
"github.com/glide-im/im-service/internal/config"
"github.com/glide-im/im-service/internal/im_server"
"github.com/glide-im/im-service/internal/message_store_db"
"github.com/glide-im/im-service/internal/rpc"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions example/client/rpc_client_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/glide-im/glide/pkg/gate"
"github.com/glide-im/glide/pkg/messages"
"github.com/glide-im/im-service/internal/rpc"
"github.com/glide-im/glide/pkg/rpc"
"github.com/glide-im/im-service/pkg/client"
)

Expand All @@ -22,7 +22,7 @@ func RpcClientExample() {
if err != nil {
panic(err)
}
err = cli.EnqueueMessage(gate.NewID2(1), messages.NewEmptyMessage())
err = cli.EnqueueMessage(gate.NewID2("1"), messages.NewEmptyMessage())
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/glide-im/im-service
go 1.18

require (
github.com/glide-im/glide v1.2.5
github.com/glide-im/glide v1.2.6
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-sql-driver/mysql v1.6.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
Expand Down
2 changes: 1 addition & 1 deletion internal/im_server/rpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"github.com/glide-im/glide/pkg/gate"
"github.com/glide-im/glide/pkg/messages"
"github.com/glide-im/im-service/internal/rpc"
"github.com/glide-im/glide/pkg/rpc"
"github.com/glide-im/im-service/pkg/proto"
)

Expand Down
86 changes: 0 additions & 86 deletions internal/rpc/client.go

This file was deleted.

60 changes: 0 additions & 60 deletions internal/rpc/context.go

This file was deleted.

89 changes: 0 additions & 89 deletions internal/rpc/grpc_client.go

This file was deleted.

67 changes: 0 additions & 67 deletions internal/rpc/grpc_server.go

This file was deleted.

Loading

0 comments on commit 79d7733

Please sign in to comment.