update package reference
This commit is contained in:
2
core/stores/cache/cacheconf.go
vendored
2
core/stores/cache/cacheconf.go
vendored
@@ -1,5 +1,5 @@
|
||||
package cache
|
||||
|
||||
import "zero/core/stores/internal"
|
||||
import "github.com/tal-tech/go-zero/core/stores/internal"
|
||||
|
||||
type CacheConf = internal.ClusterConf
|
||||
|
||||
2
core/stores/cache/cacheopt.go
vendored
2
core/stores/cache/cacheopt.go
vendored
@@ -3,7 +3,7 @@ package cache
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
)
|
||||
|
||||
type Option = internal.Option
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package clickhouse
|
||||
|
||||
import (
|
||||
"zero/core/stores/sqlx"
|
||||
|
||||
_ "github.com/kshvakov/clickhouse"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
const clickHouseDriverName = "clickhouse"
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"zero/core/errorx"
|
||||
"zero/core/hash"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/errorx"
|
||||
"github.com/tal-tech/go-zero/core/hash"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -8,13 +8,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"zero/core/errorx"
|
||||
"zero/core/hash"
|
||||
"zero/core/stores/redis"
|
||||
"zero/core/syncx"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/errorx"
|
||||
"github.com/tal-tech/go-zero/core/hash"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
type mockedNode struct {
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/mathx"
|
||||
"zero/core/stat"
|
||||
"zero/core/stores/redis"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/mathx"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,13 +7,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/mathx"
|
||||
"zero/core/stat"
|
||||
"zero/core/stores/redis"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/mathx"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
const statInterval = time.Minute
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/collection"
|
||||
"zero/core/lang"
|
||||
"zero/core/logx"
|
||||
"zero/core/proc"
|
||||
"zero/core/stat"
|
||||
"zero/core/stringx"
|
||||
"zero/core/threading"
|
||||
"github.com/tal-tech/go-zero/core/collection"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/proc"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
"github.com/tal-tech/go-zero/core/threading"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package internal
|
||||
|
||||
import "zero/core/stores/redis"
|
||||
import "github.com/tal-tech/go-zero/core/stores/redis"
|
||||
|
||||
type (
|
||||
ClusterConf []NodeConf
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package kv
|
||||
|
||||
import "zero/core/stores/internal"
|
||||
import "github.com/tal-tech/go-zero/core/stores/internal"
|
||||
|
||||
type KvConf = internal.ClusterConf
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"errors"
|
||||
"log"
|
||||
|
||||
"zero/core/errorx"
|
||||
"zero/core/hash"
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/errorx"
|
||||
"github.com/tal-tech/go-zero/core/hash"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
var ErrNoRedisNode = errors.New("no redis node")
|
||||
|
||||
@@ -4,12 +4,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/redis"
|
||||
"zero/core/stringx"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
var s1, _ = miniredis.Run()
|
||||
|
||||
@@ -3,10 +3,9 @@ package mongo
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/executors"
|
||||
"zero/core/logx"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,11 +4,10 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"zero/core/breaker"
|
||||
"zero/core/logx"
|
||||
"zero/core/timex"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/timex"
|
||||
)
|
||||
|
||||
const slowThreshold = time.Millisecond * 500
|
||||
|
||||
@@ -6,8 +6,7 @@ import (
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"zero/core/stringx"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
func TestKeepPromise_accept(t *testing.T) {
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
package mongo
|
||||
|
||||
import (
|
||||
"zero/core/breaker"
|
||||
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -4,13 +4,12 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"zero/core/breaker"
|
||||
"zero/core/stringx"
|
||||
"zero/core/syncx"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
func TestClosableIter_Close(t *testing.T) {
|
||||
|
||||
@@ -3,9 +3,8 @@ package mongo
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/breaker"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -3,9 +3,8 @@ package mongo
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"zero/core/breaker"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
func TestRejectedPipe_All(t *testing.T) {
|
||||
|
||||
@@ -3,9 +3,8 @@ package mongo
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/breaker"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -3,10 +3,9 @@ package mongo
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"zero/core/breaker"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
func Test_rejectedQuery_All(t *testing.T) {
|
||||
|
||||
@@ -4,10 +4,9 @@ import (
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/syncx"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package mongoc
|
||||
|
||||
import (
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/mongo"
|
||||
"zero/core/syncx"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/mongo"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -11,15 +11,14 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"zero/core/stat"
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/mongo"
|
||||
"zero/core/stores/redis"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/mongo"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -3,12 +3,11 @@ package mongoc
|
||||
import (
|
||||
"log"
|
||||
|
||||
"zero/core/stores/cache"
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/mongo"
|
||||
"zero/core/stores/redis"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/mongo"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"zero/core/stores/sqlx"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
const postgreDriverName = "postgres"
|
||||
|
||||
@@ -3,11 +3,10 @@ package redis
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/mapping"
|
||||
"zero/core/timex"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/mapping"
|
||||
"github.com/tal-tech/go-zero/core/timex"
|
||||
)
|
||||
|
||||
func process(proc func(red.Cmder) error) func(red.Cmder) error {
|
||||
|
||||
@@ -6,10 +6,9 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"zero/core/breaker"
|
||||
"zero/core/mapping"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/mapping"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,9 +3,8 @@ package redis
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"zero/core/logx"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type ClosableNode interface {
|
||||
|
||||
@@ -3,9 +3,8 @@ package redis
|
||||
import (
|
||||
"io"
|
||||
|
||||
"zero/core/syncx"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,9 +3,8 @@ package redis
|
||||
import (
|
||||
"io"
|
||||
|
||||
"zero/core/syncx"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
var clusterManager = syncx.NewResourceManager()
|
||||
|
||||
@@ -6,9 +6,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
|
||||
red "github.com/go-redis/redis"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,9 +3,8 @@ package redis
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"zero/core/stringx"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
func TestRedisLock(t *testing.T) {
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"zero/core/stores/cache"
|
||||
"zero/core/stores/internal"
|
||||
"zero/core/stores/redis"
|
||||
"zero/core/stores/sqlx"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/core/stores/internal"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
// see doc/sql-cache.md
|
||||
|
||||
@@ -14,14 +14,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/stat"
|
||||
"zero/core/stores/cache"
|
||||
"zero/core/stores/redis"
|
||||
"zero/core/stores/sqlx"
|
||||
|
||||
"github.com/alicebob/miniredis"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stores/cache"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"zero/core/executors"
|
||||
"zero/core/logx"
|
||||
"zero/core/stringx"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,10 +5,9 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"zero/core/logx"
|
||||
|
||||
"github.com/DATA-DOG/go-sqlmock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type mockedConn struct {
|
||||
|
||||
@@ -3,12 +3,11 @@ package sqlx
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"zero/core/breaker"
|
||||
"zero/core/logx"
|
||||
"zero/core/stat"
|
||||
|
||||
"github.com/go-sql-driver/mysql"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"zero/core/mapping"
|
||||
"github.com/tal-tech/go-zero/core/mapping"
|
||||
)
|
||||
|
||||
const tagName = "db"
|
||||
|
||||
@@ -4,10 +4,9 @@ import (
|
||||
"database/sql"
|
||||
"testing"
|
||||
|
||||
"zero/core/logx"
|
||||
|
||||
"github.com/DATA-DOG/go-sqlmock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
func TestUnmarshalRowBool(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package sqlx
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
)
|
||||
|
||||
var ErrNotFound = sql.ErrNoRows
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/timex"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/timex"
|
||||
)
|
||||
|
||||
const slowThreshold = time.Millisecond * 500
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/mapping"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/mapping"
|
||||
)
|
||||
|
||||
func desensitize(datasource string) string {
|
||||
|
||||
Reference in New Issue
Block a user