mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-04 12:03:41 +02:00
merge api/redis_common and api/redis_pubsub to api/redis
This commit is contained in:
parent
102045e47e
commit
a8bac16aa9
9 changed files with 10 additions and 15 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
package redis_common
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package redis_common
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package redis_common
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package redis_common
|
package redis
|
||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
package redis_pubsub
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"thalos/api"
|
"thalos/api"
|
||||||
. "thalos/api/redis_common"
|
|
||||||
|
|
||||||
"github.com/go-redis/redis/v8"
|
"github.com/go-redis/redis/v8"
|
||||||
)
|
)
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
package redis_pubsub
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"thalos/api"
|
"thalos/api"
|
||||||
. "thalos/api/redis_common"
|
|
||||||
|
|
||||||
"github.com/go-redis/redismock/v8"
|
"github.com/go-redis/redismock/v8"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package redis_pubsub
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
@ -6,7 +6,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"thalos/api"
|
"thalos/api"
|
||||||
. "thalos/api/redis_common"
|
|
||||||
|
|
||||||
"github.com/go-redis/redis/v8"
|
"github.com/go-redis/redis/v8"
|
||||||
)
|
)
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
package redis_pubsub
|
package redis
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"thalos/api"
|
"thalos/api"
|
||||||
. "thalos/api/redis_common"
|
|
||||||
|
|
||||||
"github.com/alicebob/miniredis/v2"
|
"github.com/alicebob/miniredis/v2"
|
||||||
"github.com/go-redis/redis/v8"
|
"github.com/go-redis/redis/v8"
|
||||||
|
|
@ -12,10 +12,9 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"thalos/abi"
|
"thalos/abi"
|
||||||
|
api_redis "thalos/api/redis"
|
||||||
"thalos/app"
|
"thalos/app"
|
||||||
"thalos/config"
|
"thalos/config"
|
||||||
"thalos/transport/redis_common"
|
|
||||||
"thalos/transport/redis_pubsub"
|
|
||||||
|
|
||||||
"github.com/nikoksr/notify"
|
"github.com/nikoksr/notify"
|
||||||
"github.com/nikoksr/notify/service/telegram"
|
"github.com/nikoksr/notify/service/telegram"
|
||||||
|
|
@ -190,7 +189,7 @@ func main() {
|
||||||
|
|
||||||
processor := app.SpawnProccessor(
|
processor := app.SpawnProccessor(
|
||||||
shClient,
|
shClient,
|
||||||
redis_pubsub.NewPublisher(rdb, redis_common.Namespace{
|
api_redis.NewPublisher(rdb, api_redis.Namespace{
|
||||||
Prefix: conf.Redis.Prefix,
|
Prefix: conf.Redis.Prefix,
|
||||||
ChainID: chainInfo.ChainID.String(),
|
ChainID: chainInfo.ChainID.String(),
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue