update package reference

master
kevin 4 years ago
parent d19d25c72f
commit 0a7e0cce77

@ -4,8 +4,8 @@ import (
"errors" "errors"
"strconv" "strconv"
"zero/core/hash" "github.com/tal-tech/go-zero/core/hash"
"zero/core/stores/redis" "github.com/tal-tech/go-zero/core/stores/redis"
) )
const ( const (

@ -3,10 +3,9 @@ package bloom
import ( import (
"testing" "testing"
"zero/core/stores/redis"
"github.com/alicebob/miniredis" "github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stores/redis"
) )
func TestRedisBitSet_New_Set_Test(t *testing.T) { func TestRedisBitSet_New_Set_Test(t *testing.T) {

@ -7,10 +7,10 @@ import (
"sync" "sync"
"time" "time"
"zero/core/mathx" "github.com/tal-tech/go-zero/core/mathx"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
"zero/core/stringx" "github.com/tal-tech/go-zero/core/stringx"
) )
const ( const (

@ -5,9 +5,8 @@ import (
"strconv" "strconv"
"testing" "testing"
"zero/core/stat"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stat"
) )
func init() { func init() {

@ -5,9 +5,8 @@ import (
"fmt" "fmt"
"testing" "testing"
"zero/core/stat"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stat"
) )
func init() { func init() {

@ -5,8 +5,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/collection" "github.com/tal-tech/go-zero/core/collection"
"zero/core/mathx" "github.com/tal-tech/go-zero/core/mathx"
) )
const ( const (

@ -7,11 +7,10 @@ import (
"testing" "testing"
"time" "time"
"zero/core/collection"
"zero/core/mathx"
"zero/core/stat"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/mathx"
"github.com/tal-tech/go-zero/core/stat"
) )
const ( const (

@ -7,7 +7,7 @@ import (
"encoding/base64" "encoding/base64"
"errors" "errors"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
var ErrPaddingSize = errors.New("padding size error") var ErrPaddingSize = errors.New("padding size error")

@ -6,9 +6,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/mathx" "github.com/tal-tech/go-zero/core/mathx"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
) )
const ( const (

@ -4,7 +4,7 @@ import (
"sync" "sync"
"time" "time"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
type ( type (

@ -5,9 +5,8 @@ import (
"testing" "testing"
"time" "time"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
const duration = time.Millisecond * 50 const duration = time.Millisecond * 50

@ -3,9 +3,8 @@ package collection
import ( import (
"testing" "testing"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
func TestSafeMap(t *testing.T) { func TestSafeMap(t *testing.T) {

@ -1,8 +1,8 @@
package collection package collection
import ( import (
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const ( const (

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"time" "time"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const drainWorkers = 8 const drainWorkers = 8

@ -7,12 +7,11 @@ import (
"testing" "testing"
"time" "time"
"zero/core/lang"
"zero/core/stringx"
"zero/core/syncx"
"zero/core/timex"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
) )
const ( const (

@ -6,7 +6,7 @@ import (
"log" "log"
"path" "path"
"zero/core/mapping" "github.com/tal-tech/go-zero/core/mapping"
) )
var loaders = map[string]func([]byte, interface{}) error{ var loaders = map[string]func([]byte, interface{}) error{

@ -6,7 +6,7 @@ import (
"strings" "strings"
"sync" "sync"
"zero/core/iox" "github.com/tal-tech/go-zero/core/iox"
) )
// PropertyError represents a configuration error message. // PropertyError represents a configuration error message.

@ -4,9 +4,8 @@ import (
"os" "os"
"testing" "testing"
"zero/core/fs"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
) )
func TestProperties(t *testing.T) { func TestProperties(t *testing.T) {

@ -3,7 +3,7 @@ package contextx
import ( import (
"context" "context"
"zero/core/mapping" "github.com/tal-tech/go-zero/core/mapping"
) )
const contextTagKey = "ctx" const contextTagKey = "ctx"

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"zero/core/discov/internal" "github.com/tal-tech/go-zero/core/discov/internal"
) )
const ( const (

@ -4,9 +4,8 @@ import (
"sync" "sync"
"testing" "testing"
"zero/core/discov/internal"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
) )
var mockLock sync.Mutex var mockLock sync.Mutex

@ -1,8 +1,8 @@
package discov package discov
import ( import (
"zero/core/discov/internal" "github.com/tal-tech/go-zero/core/discov/internal"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
) )
type ( type (

@ -9,12 +9,11 @@ import (
"sync" "sync"
"time" "time"
"zero/core/contextx" "github.com/tal-tech/go-zero/core/contextx"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
"go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/clientv3"
) )

@ -5,11 +5,10 @@ import (
"sync" "sync"
"testing" "testing"
"zero/core/contextx"
"zero/core/stringx"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/contextx"
"github.com/tal-tech/go-zero/core/stringx"
"go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/mvcc/mvccpb" "go.etcd.io/etcd/mvcc/mvccpb"
) )

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: discov

@ -1,378 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: etcd
namespace: discov
spec:
ports:
- name: etcd-port
port: 2379
protocol: TCP
targetPort: 2379
selector:
app: etcd
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd0
name: etcd0
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd0
- --initial-advertise-peer-urls
- http://etcd0:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd0:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd0
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd0
name: etcd0
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd0
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd1
name: etcd1
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd1
- --initial-advertise-peer-urls
- http://etcd1:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd1:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd1
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd1
name: etcd1
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd1
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd2
name: etcd2
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd2
- --initial-advertise-peer-urls
- http://etcd2:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd2:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd2
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd2
name: etcd2
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd2
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd3
name: etcd3
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd3
- --initial-advertise-peer-urls
- http://etcd3:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd3:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd3
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd3
name: etcd3
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd3
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd4
name: etcd4
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd4
- --initial-advertise-peer-urls
- http://etcd4:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd4:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd4
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd4
name: etcd4
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd4

@ -1,13 +1,12 @@
package discov package discov
import ( import (
"zero/core/discov/internal" "github.com/tal-tech/go-zero/core/discov/internal"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
"go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/clientv3"
) )

@ -5,11 +5,10 @@ import (
"sync" "sync"
"testing" "testing"
"zero/core/discov/internal"
"zero/core/logx"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/logx"
"go.etcd.io/etcd/clientv3" "go.etcd.io/etcd/clientv3"
) )

@ -4,8 +4,8 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"zero/core/discov/internal" "github.com/tal-tech/go-zero/core/discov/internal"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
) )
type ( type (

@ -3,9 +3,8 @@ package discov
import ( import (
"testing" "testing"
"zero/core/discov/internal"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
) )
const ( const (

@ -1,8 +1,6 @@
package executors package executors
import ( import "time"
"time"
)
const defaultBulkTasks = 1000 const defaultBulkTasks = 1000

@ -4,7 +4,7 @@ import (
"sync" "sync"
"time" "time"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
type DelayExecutor struct { type DelayExecutor struct {

@ -3,8 +3,8 @@ package executors
import ( import (
"time" "time"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
type LessExecutor struct { type LessExecutor struct {

@ -4,9 +4,8 @@ import (
"testing" "testing"
"time" "time"
"zero/core/timex"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/timex"
) )
func TestLessExecutor_DoOrDiscard(t *testing.T) { func TestLessExecutor_DoOrDiscard(t *testing.T) {

@ -5,10 +5,10 @@ import (
"sync" "sync"
"time" "time"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const idleRound = 10 const idleRound = 10

@ -7,9 +7,8 @@ import (
"testing" "testing"
"time" "time"
"zero/core/timex"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/timex"
) )
const threshold = 10 const threshold = 10

@ -4,7 +4,7 @@ import (
"os" "os"
"testing" "testing"
"zero/core/fs" "github.com/tal-tech/go-zero/core/fs"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

@ -4,9 +4,8 @@ import (
"os" "os"
"testing" "testing"
"zero/core/fs"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
) )
func TestSplitLineChunks(t *testing.T) { func TestSplitLineChunks(t *testing.T) {

@ -5,8 +5,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
"zero/core/fs"
) )
func TestRangeReader(t *testing.T) { func TestRangeReader(t *testing.T) {

@ -4,7 +4,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"zero/core/hash" "github.com/tal-tech/go-zero/core/hash"
) )
// TempFileWithText creates the temporary file with the given content, // TempFileWithText creates the temporary file with the given content,

@ -4,9 +4,9 @@ import (
"sort" "sort"
"sync" "sync"
"zero/core/collection" "github.com/tal-tech/go-zero/core/collection"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
const ( const (

@ -9,9 +9,8 @@ import (
"testing" "testing"
"time" "time"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
func TestBuffer(t *testing.T) { func TestBuffer(t *testing.T) {

@ -1,6 +1,6 @@
package fx package fx
import "zero/core/threading" import "github.com/tal-tech/go-zero/core/threading"
func Parallel(fns ...func()) { func Parallel(fns ...func()) {
group := threading.NewRoutineGroup() group := threading.NewRoutineGroup()

@ -1,6 +1,6 @@
package fx package fx
import "zero/core/errorx" import "github.com/tal-tech/go-zero/core/errorx"
const defaultRetryTimes = 3 const defaultRetryTimes = 3

@ -6,8 +6,8 @@ import (
"strconv" "strconv"
"sync" "sync"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/mapping" "github.com/tal-tech/go-zero/core/mapping"
) )
const ( const (

@ -6,8 +6,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/mathx"
"zero/core/mathx"
) )
const ( const (

@ -8,10 +8,9 @@ import (
"testing" "testing"
"time" "time"
"zero/core/fs"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
"github.com/tal-tech/go-zero/core/stringx"
) )
func TestReadText(t *testing.T) { func TestReadText(t *testing.T) {

@ -5,7 +5,7 @@ import (
"strconv" "strconv"
"time" "time"
"zero/core/stores/redis" "github.com/tal-tech/go-zero/core/stores/redis"
) )
const ( const (

@ -3,10 +3,9 @@ package limit
import ( import (
"testing" "testing"
"zero/core/stores/redis"
"github.com/alicebob/miniredis" "github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stores/redis"
) )
func TestPeriodLimit_Take(t *testing.T) { func TestPeriodLimit_Take(t *testing.T) {

@ -7,9 +7,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/stores/redis" "github.com/tal-tech/go-zero/core/stores/redis"
xrate "golang.org/x/time/rate" xrate "golang.org/x/time/rate"
) )

@ -4,11 +4,10 @@ import (
"testing" "testing"
"time" "time"
"zero/core/logx"
"zero/core/stores/redis"
"github.com/alicebob/miniredis" "github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stores/redis"
) )
func init() { func init() {

@ -7,11 +7,11 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/collection" "github.com/tal-tech/go-zero/core/collection"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const ( const (

@ -7,13 +7,12 @@ import (
"testing" "testing"
"time" "time"
"zero/core/collection"
"zero/core/logx"
"zero/core/mathx"
"zero/core/stat"
"zero/core/syncx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/collection"
"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/syncx"
) )
const ( const (

@ -3,7 +3,7 @@ package load
import ( import (
"io" "io"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
) )
type ShedderGroup struct { type ShedderGroup struct {

@ -4,8 +4,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
) )
type ( type (

@ -5,7 +5,7 @@ import (
"io" "io"
"time" "time"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const customCallerDepth = 3 const customCallerDepth = 3

@ -4,8 +4,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
type limitedExecutor struct { type limitedExecutor struct {

@ -16,10 +16,10 @@ import (
"sync" "sync"
"sync/atomic" "sync/atomic"
"zero/core/iox" "github.com/tal-tech/go-zero/core/iox"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/sysx" "github.com/tal-tech/go-zero/core/sysx"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const ( const (

@ -13,9 +13,9 @@ import (
"sync" "sync"
"time" "time"
"zero/core/fs" "github.com/tal-tech/go-zero/core/fs"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
) )
const ( const (

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"io" "io"
"zero/core/trace/tracespec" "github.com/tal-tech/go-zero/core/trace/tracespec"
) )
type tracingEntry struct { type tracingEntry struct {

@ -5,9 +5,8 @@ import (
"strings" "strings"
"testing" "testing"
"zero/core/trace/tracespec"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/trace/tracespec"
) )
const ( const (

@ -3,7 +3,7 @@ package mapping
import ( import (
"io" "io"
"zero/core/jsonx" "github.com/tal-tech/go-zero/core/jsonx"
) )
const jsonTagKey = "json" const jsonTagKey = "json"

@ -10,9 +10,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/jsonx" "github.com/tal-tech/go-zero/core/jsonx"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/stringx" "github.com/tal-tech/go-zero/core/stringx"
) )
const ( const (

@ -6,9 +6,8 @@ import (
"testing" "testing"
"time" "time"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
// because json.Number doesn't support strconv.ParseUint(...), // because json.Number doesn't support strconv.ParseUint(...),

@ -10,7 +10,7 @@ import (
"strings" "strings"
"sync" "sync"
"zero/core/stringx" "github.com/tal-tech/go-zero/core/stringx"
) )
const ( const (

@ -3,9 +3,8 @@ package mathx
import ( import (
"testing" "testing"
"zero/core/stringx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
func TestMaxInt(t *testing.T) { func TestMaxInt(t *testing.T) {

@ -1,9 +1,8 @@
package metric package metric
import ( import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus" prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
) )
type ( type (

@ -1,9 +1,8 @@
package metric package metric
import ( import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus" prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
) )
type ( type (

@ -1,9 +1,8 @@
package metric package metric
import ( import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus" prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
) )
type ( type (

@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"sync" "sync"
"zero/core/errorx" "github.com/tal-tech/go-zero/core/errorx"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
const ( const (

@ -9,10 +9,9 @@ import (
"testing" "testing"
"time" "time"
"zero/core/stringx"
"zero/core/syncx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/syncx"
) )
var errDummy = errors.New("dummy") var errDummy = errors.New("dummy")

@ -10,7 +10,7 @@ import (
"syscall" "syscall"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const ( const (

@ -14,7 +14,7 @@ import (
"syscall" "syscall"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
// DefaultMemProfileRate is the default memory profiling rate. // DefaultMemProfileRate is the default memory profiling rate.

@ -9,7 +9,7 @@ import (
"syscall" "syscall"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const ( const (

@ -7,7 +7,7 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const timeFormat = "0102150405" const timeFormat = "0102150405"

@ -7,10 +7,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx"
"zero/core/threading"
"github.com/olekukonko/tablewriter" "github.com/olekukonko/tablewriter"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/threading"
) )
type ( type (

@ -1,6 +1,6 @@
package prof package prof
import "zero/core/utils" import "github.com/tal-tech/go-zero/core/utils"
type ( type (
ProfilePoint struct { ProfilePoint struct {

@ -5,10 +5,9 @@ import (
"net/http" "net/http"
"sync" "sync"
"zero/core/logx"
"zero/core/threading"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/threading"
) )
var once sync.Once var once sync.Once

@ -1,6 +1,6 @@
package rescue package rescue
import "zero/core/logx" import "github.com/tal-tech/go-zero/core/logx"
func Recover(cleanups ...func()) { func Recover(cleanups ...func()) {
for _, cleanup := range cleanups { for _, cleanup := range cleanups {

@ -4,9 +4,8 @@ import (
"sync/atomic" "sync/atomic"
"testing" "testing"
"zero/core/logx"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
) )
func init() { func init() {

@ -3,10 +3,10 @@ package service
import ( import (
"log" "log"
"zero/core/load" "github.com/tal-tech/go-zero/core/load"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/prometheus" "github.com/tal-tech/go-zero/core/prometheus"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
) )
const ( const (

@ -3,9 +3,9 @@ package service
import ( import (
"log" "log"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
type ( type (

@ -10,11 +10,11 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/executors" "github.com/tal-tech/go-zero/core/executors"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/sysx" "github.com/tal-tech/go-zero/core/sysx"
"zero/core/timex" "github.com/tal-tech/go-zero/core/timex"
"zero/core/utils" "github.com/tal-tech/go-zero/core/utils"
) )
const ( const (

@ -7,8 +7,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"zero/core/iox" "github.com/tal-tech/go-zero/core/iox"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
) )
const cgroupDir = "/sys/fs/cgroup" const cgroupDir = "/sys/fs/cgroup"

@ -6,8 +6,8 @@ import (
"strings" "strings"
"time" "time"
"zero/core/iox" "github.com/tal-tech/go-zero/core/iox"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
) )
const ( const (

@ -5,8 +5,8 @@ import (
"sync" "sync"
"time" "time"
"zero/core/executors" "github.com/tal-tech/go-zero/core/executors"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
var ( var (

@ -7,7 +7,7 @@ import (
"net/http" "net/http"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const httpTimeout = time.Second * 5 const httpTimeout = time.Second * 5

@ -5,9 +5,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/stat/internal" "github.com/tal-tech/go-zero/core/stat/internal"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
const ( const (

@ -1,5 +1,5 @@
package cache package cache
import "zero/core/stores/internal" import "github.com/tal-tech/go-zero/core/stores/internal"
type CacheConf = internal.ClusterConf type CacheConf = internal.ClusterConf

@ -3,7 +3,7 @@ package cache
import ( import (
"time" "time"
"zero/core/stores/internal" "github.com/tal-tech/go-zero/core/stores/internal"
) )
type Option = internal.Option type Option = internal.Option

@ -1,9 +1,8 @@
package clickhouse package clickhouse
import ( import (
"zero/core/stores/sqlx"
_ "github.com/kshvakov/clickhouse" _ "github.com/kshvakov/clickhouse"
"github.com/tal-tech/go-zero/core/stores/sqlx"
) )
const clickHouseDriverName = "clickhouse" const clickHouseDriverName = "clickhouse"

@ -5,9 +5,9 @@ import (
"log" "log"
"time" "time"
"zero/core/errorx" "github.com/tal-tech/go-zero/core/errorx"
"zero/core/hash" "github.com/tal-tech/go-zero/core/hash"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
) )
type ( type (

@ -8,13 +8,12 @@ import (
"testing" "testing"
"time" "time"
"zero/core/errorx"
"zero/core/hash"
"zero/core/stores/redis"
"zero/core/syncx"
"github.com/alicebob/miniredis" "github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert" "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 { type mockedNode struct {

@ -8,11 +8,11 @@ import (
"sync" "sync"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/mathx" "github.com/tal-tech/go-zero/core/mathx"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
"zero/core/stores/redis" "github.com/tal-tech/go-zero/core/stores/redis"
"zero/core/syncx" "github.com/tal-tech/go-zero/core/syncx"
) )
const ( const (

@ -7,13 +7,12 @@ import (
"testing" "testing"
"time" "time"
"zero/core/logx"
"zero/core/mathx"
"zero/core/stat"
"zero/core/stores/redis"
"github.com/alicebob/miniredis" "github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert" "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() { func init() {

@ -4,7 +4,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
) )
const statInterval = time.Minute const statInterval = time.Minute

@ -4,13 +4,13 @@ import (
"fmt" "fmt"
"time" "time"
"zero/core/collection" "github.com/tal-tech/go-zero/core/collection"
"zero/core/lang" "github.com/tal-tech/go-zero/core/lang"
"zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"zero/core/proc" "github.com/tal-tech/go-zero/core/proc"
"zero/core/stat" "github.com/tal-tech/go-zero/core/stat"
"zero/core/stringx" "github.com/tal-tech/go-zero/core/stringx"
"zero/core/threading" "github.com/tal-tech/go-zero/core/threading"
) )
const ( const (

@ -1,6 +1,6 @@
package internal package internal
import "zero/core/stores/redis" import "github.com/tal-tech/go-zero/core/stores/redis"
type ( type (
ClusterConf []NodeConf ClusterConf []NodeConf

@ -1,5 +1,5 @@
package kv package kv
import "zero/core/stores/internal" import "github.com/tal-tech/go-zero/core/stores/internal"
type KvConf = internal.ClusterConf type KvConf = internal.ClusterConf

@ -4,10 +4,10 @@ import (
"errors" "errors"
"log" "log"
"zero/core/errorx" "github.com/tal-tech/go-zero/core/errorx"
"zero/core/hash" "github.com/tal-tech/go-zero/core/hash"
"zero/core/stores/internal" "github.com/tal-tech/go-zero/core/stores/internal"
"zero/core/stores/redis" "github.com/tal-tech/go-zero/core/stores/redis"
) )
var ErrNoRedisNode = errors.New("no redis node") var ErrNoRedisNode = errors.New("no redis node")

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save