|
|
@ -9,6 +9,7 @@ import (
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
|
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
|
|
|
pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push"
|
|
|
|
pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
|
|
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -22,7 +23,7 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cacheModel := cache.NewCacheModel(rdb)
|
|
|
|
cacheModel := cache.NewCacheModel(rdb)
|
|
|
|
|
|
|
|
client.AddOption(grpc.WithTransportCredentials(insecure.NewCredentials()))
|
|
|
|
offlinePusher := NewOfflinePusher(cacheModel)
|
|
|
|
offlinePusher := NewOfflinePusher(cacheModel)
|
|
|
|
database := controller.NewPushDatabase(cacheModel)
|
|
|
|
database := controller.NewPushDatabase(cacheModel)
|
|
|
|
pusher := NewPusher(client, offlinePusher, database, localcache.NewGroupLocalCache(client), localcache.NewConversationLocalCache(client))
|
|
|
|
pusher := NewPusher(client, offlinePusher, database, localcache.NewGroupLocalCache(client), localcache.NewConversationLocalCache(client))
|
|
|
|