update package reference
This commit is contained in:
@@ -3,8 +3,8 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"zero/core/bloom"
|
||||
"zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/bloom"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/breaker"
|
||||
"zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/breaker"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
|
||||
"gopkg.in/cheggaaa/pb.v1"
|
||||
)
|
||||
|
||||
@@ -3,8 +3,8 @@ package main
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type TimeHolder struct {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"zero/core/discov"
|
||||
"zero/core/logx"
|
||||
"zero/core/proc"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/proc"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
|
||||
"go.etcd.io/etcd/clientv3"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
)
|
||||
|
||||
var value = flag.String("v", "value", "the value")
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/discov"
|
||||
"zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -12,9 +12,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"zero/core/filex"
|
||||
"zero/core/fx"
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/filex"
|
||||
"github.com/tal-tech/go-zero/core/fx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
|
||||
"gopkg.in/cheggaaa/pb.v1"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"zero/core/fx"
|
||||
"github.com/tal-tech/go-zero/core/fx"
|
||||
)
|
||||
|
||||
func BenchmarkFx(b *testing.B) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"zero/core/fx"
|
||||
"github.com/tal-tech/go-zero/core/fx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"zero/rest"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
||||
@@ -3,12 +3,12 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/graceful/dns/api/config"
|
||||
"zero/example/graceful/dns/api/handler"
|
||||
"zero/example/graceful/dns/api/svc"
|
||||
"zero/rest"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/config"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/handler"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "etc/graceful-api.json", "the config file")
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"zero/core/executors"
|
||||
"zero/core/logx"
|
||||
"zero/example/graceful/dns/api/svc"
|
||||
"zero/example/graceful/dns/api/types"
|
||||
"zero/example/graceful/dns/rpc/graceful"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/types"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/rpc/graceful"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func gracefulHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
@@ -4,8 +4,8 @@ package handler
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"zero/example/graceful/dns/api/svc"
|
||||
"zero/rest"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(engine *rest.Server, ctx *svc.ServiceContext) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package svc
|
||||
|
||||
import "zero/rpcx"
|
||||
import "github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
type ServiceContext struct {
|
||||
Client *rpcx.RpcClient
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package graceful
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/graceful/dns/rpc/graceful"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/graceful/dns/rpc/graceful"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"zero/rest"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
||||
@@ -3,12 +3,12 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/graceful/etcd/api/config"
|
||||
"zero/example/graceful/etcd/api/handler"
|
||||
"zero/example/graceful/etcd/api/svc"
|
||||
"zero/rest"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/config"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/handler"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "etc/graceful-api.json", "the config file")
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"zero/core/executors"
|
||||
"zero/core/logx"
|
||||
"zero/example/graceful/etcd/api/svc"
|
||||
"zero/example/graceful/etcd/api/types"
|
||||
"zero/example/graceful/etcd/rpc/graceful"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/types"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func gracefulHandler(ctx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
@@ -4,8 +4,8 @@ package handler
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"zero/example/graceful/etcd/api/svc"
|
||||
"zero/rest"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(engine *rest.Server, ctx *svc.ServiceContext) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package svc
|
||||
|
||||
import "zero/rpcx"
|
||||
import "github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
type ServiceContext struct {
|
||||
Client *rpcx.RpcClient
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package graceful
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/graceful/etcd/rpc/graceful"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"zero/core/lang"
|
||||
"zero/core/threading"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/threading"
|
||||
|
||||
"gopkg.in/cheggaaa/pb.v1"
|
||||
)
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/core/stat"
|
||||
"zero/core/syncx"
|
||||
"zero/rest"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"zero/core/codec"
|
||||
"github.com/tal-tech/go-zero/core/codec"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"flag"
|
||||
"net/http"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"zero/core/codec"
|
||||
"github.com/tal-tech/go-zero/core/codec"
|
||||
)
|
||||
|
||||
const pubKey = `-----BEGIN PUBLIC KEY-----
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
var keyPem = flag.String("prikey", "private.pem", "the private key file")
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"github.com/dgrijalva/jwt-go/request"
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/limit"
|
||||
"zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/limit"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
const seconds = 5
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/limit"
|
||||
"zero/core/stores/redis"
|
||||
"github.com/tal-tech/go-zero/core/limit"
|
||||
"github.com/tal-tech/go-zero/core/stores/redis"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/collection"
|
||||
"zero/core/executors"
|
||||
"zero/core/lang"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/collection"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
|
||||
"gopkg.in/cheggaaa/pb.v1"
|
||||
)
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/fx"
|
||||
"zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/fx"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package main
|
||||
|
||||
import _ "zero/core/stat"
|
||||
import _ "github.com/tal-tech/go-zero/core/stat"
|
||||
|
||||
func main() {
|
||||
select {}
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"zero/core/fx"
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/core/stat"
|
||||
"zero/rest"
|
||||
"github.com/tal-tech/go-zero/core/fx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
)
|
||||
|
||||
const duration = time.Millisecond
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
func foo() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/mr"
|
||||
"github.com/tal-tech/go-zero/core/mr"
|
||||
|
||||
"github.com/google/gops/agent"
|
||||
)
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/mr"
|
||||
"zero/core/timex"
|
||||
"github.com/tal-tech/go-zero/core/mr"
|
||||
"github.com/tal-tech/go-zero/core/timex"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"zero/core/mr"
|
||||
"github.com/tal-tech/go-zero/core/mr"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"runtime/pprof"
|
||||
"time"
|
||||
|
||||
"zero/core/lang"
|
||||
"zero/core/logx"
|
||||
"zero/core/mr"
|
||||
"zero/core/proc"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/mr"
|
||||
"github.com/tal-tech/go-zero/core/proc"
|
||||
)
|
||||
|
||||
func dumpGoroutines() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/mr"
|
||||
"github.com/tal-tech/go-zero/core/mr"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"zero/core/stores/mongo"
|
||||
"github.com/tal-tech/go-zero/core/stores/mongo"
|
||||
|
||||
"github.com/globalsign/mgo"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"time"
|
||||
|
||||
"zero/core/executors"
|
||||
"github.com/tal-tech/go-zero/core/executors"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/lang"
|
||||
"zero/core/syncx"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/syncx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/discov"
|
||||
"zero/example/rpc/remote/unary"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
const timeFormat = "15:04:05"
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/discov"
|
||||
"zero/example/rpc/remote/unary"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"zero/core/discov"
|
||||
"zero/example/rpc/remote/stream"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/discov"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/stream"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
const name = "kevin"
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/rpc/remote/unary"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
var configFile = flag.String("f", "config.json", "the config file")
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/example/rpc/remote/unary"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package stream
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package unary
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/rpc/remote/stream"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/stream"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/rpc/remote/unary"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"zero/core/cmdline"
|
||||
"zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/cmdline"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"zero/core/stat"
|
||||
"github.com/tal-tech/go-zero/core/stat"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"zero/core/cmdline"
|
||||
"zero/core/collection"
|
||||
"zero/core/proc"
|
||||
"github.com/tal-tech/go-zero/core/cmdline"
|
||||
"github.com/tal-tech/go-zero/core/collection"
|
||||
"github.com/tal-tech/go-zero/core/proc"
|
||||
)
|
||||
|
||||
const numItems = 1000000
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"zero/core/collection"
|
||||
"github.com/tal-tech/go-zero/core/collection"
|
||||
)
|
||||
|
||||
const interval = time.Minute
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"flag"
|
||||
"net/http"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/core/logx"
|
||||
"zero/core/service"
|
||||
"zero/example/tracing/remote/portal"
|
||||
"zero/rest"
|
||||
"zero/rest/httpx"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/service"
|
||||
"github.com/tal-tech/go-zero/example/tracing/remote/portal"
|
||||
"github.com/tal-tech/go-zero/rest"
|
||||
"github.com/tal-tech/go-zero/rest/httpx"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/tracing/remote/portal"
|
||||
"zero/example/tracing/remote/user"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/tracing/remote/portal"
|
||||
"github.com/tal-tech/go-zero/example/tracing/remote/user"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package portal
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -14,13 +14,13 @@ It has these top-level messages:
|
||||
*/
|
||||
package user
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import (
|
||||
context "golang.org/x/net/context"
|
||||
grpc "google.golang.org/grpc"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"zero/core/conf"
|
||||
"zero/example/tracing/remote/user"
|
||||
"zero/rpcx"
|
||||
"github.com/tal-tech/go-zero/core/conf"
|
||||
"github.com/tal-tech/go-zero/example/tracing/remote/user"
|
||||
"github.com/tal-tech/go-zero/rpcx"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user