move to v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
1d5e795443
commit
ebd8ddf05b
@ -1,4 +1,4 @@
|
||||
# Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Doc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/unistack-org/micro/v3?tab=overview) [![Status](https://github.com/unistack-org/micro/workflows/build/badge.svg?branch=master)](https://github.com/unistack-org/micro/actions?query=workflow%3Abuild+branch%3Amaster+event%3Apush) [![Lint](https://goreportcard.com/badge/go.unistack.org/micro/v3)](https://goreportcard.com/report/go.unistack.org/micro/v3) [![Coverage](https://codecov.io/gh/unistack-org/micro/branch/v3/graph/badge.svg?token=OZPO2LP7VS)](https://codecov.io/gh/unistack-org/micro)
|
||||
# Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Doc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/go.unistack.org/micro/v4?tab=overview) [![Status](https://github.com/unistack-org/micro/workflows/build/badge.svg?branch=master)](https://github.com/unistack-org/micro/actions?query=workflow%3Abuild+branch%3Amaster+event%3Apush) [![Lint](https://goreportcard.com/badge/go.unistack.org/micro/v4)](https://goreportcard.com/report/go.unistack.org/micro/v4) [![Coverage](https://codecov.io/gh/unistack-org/micro/branch/v4/graph/badge.svg?token=OZPO2LP7VS)](https://codecov.io/gh/unistack-org/micro)
|
||||
|
||||
Micro is a standard library for microservices.
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Package broker is an interface used for asynchronous messaging
|
||||
package broker // import "go.unistack.org/micro/v3/broker"
|
||||
package broker // import "go.unistack.org/micro/v4/broker"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
// DefaultBroker default memory broker
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"context"
|
||||
"sync"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
maddr "go.unistack.org/micro/v3/util/addr"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
mnet "go.unistack.org/micro/v3/util/net"
|
||||
"go.unistack.org/micro/v3/util/rand"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
maddr "go.unistack.org/micro/v4/util/addr"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
mnet "go.unistack.org/micro/v4/util/net"
|
||||
"go.unistack.org/micro/v4/util/rand"
|
||||
)
|
||||
|
||||
type memoryBroker struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
func TestMemoryBatchBroker(t *testing.T) {
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options struct
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/util/backoff"
|
||||
"go.unistack.org/micro/v4/util/backoff"
|
||||
)
|
||||
|
||||
// BackoffFunc is the backoff call func
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Package client is an interface for an RPC client
|
||||
package client // import "go.unistack.org/micro/v3/client"
|
||||
package client // import "go.unistack.org/micro/v4/client"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"sort"
|
||||
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
)
|
||||
|
||||
// LookupFunc is used to lookup routes for a service
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
)
|
||||
|
||||
// DefaultCodecs will be used to encode/decode data
|
||||
|
@ -6,17 +6,17 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v3/selector/random"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
"go.unistack.org/micro/v4/selector/random"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options holds client options
|
||||
|
@ -3,7 +3,7 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
)
|
||||
|
||||
// RetryFunc that returning either false or a non-nil error will result in the call not being retried
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
)
|
||||
|
||||
func TestRetryAlways(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
)
|
||||
|
||||
type testRequest struct {
|
||||
|
@ -1,11 +1,11 @@
|
||||
// Package codec is an interface for encoding messages
|
||||
package codec // import "go.unistack.org/micro/v3/codec"
|
||||
package codec // import "go.unistack.org/micro/v4/codec"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
// Message types
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Unistack LLC
|
||||
// Copyright 2021-2023 Unistack LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,7 +17,7 @@ syntax = "proto3";
|
||||
package micro.codec;
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "go.unistack.org/micro/v3/codec;codec";
|
||||
option go_package = "go.unistack.org/micro/v4/codec;codec";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "MicroCodec";
|
||||
option java_package = "micro.codec";
|
||||
|
@ -3,9 +3,9 @@ package codec
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Option func
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package config is an interface for dynamic configuration.
|
||||
package config // import "go.unistack.org/micro/v3/config"
|
||||
package config // import "go.unistack.org/micro/v4/config"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
rutil "go.unistack.org/micro/v3/util/reflect"
|
||||
mtime "go.unistack.org/micro/v3/util/time"
|
||||
rutil "go.unistack.org/micro/v4/util/reflect"
|
||||
mtime "go.unistack.org/micro/v4/util/time"
|
||||
)
|
||||
|
||||
type defaultConfig struct {
|
||||
@ -169,7 +169,7 @@ func fillValue(value reflect.Value, val string) error {
|
||||
return err
|
||||
}
|
||||
value.Set(reflect.ValueOf(v))
|
||||
case value.Type().String() == "time.Duration" && value.Type().PkgPath() == "go.unistack.org/micro/v3/util/time":
|
||||
case value.Type().String() == "time.Duration" && value.Type().PkgPath() == "go.unistack.org/micro/v4/util/time":
|
||||
v, err := mtime.ParseDuration(val)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/config"
|
||||
mtime "go.unistack.org/micro/v3/util/time"
|
||||
"go.unistack.org/micro/v4/config"
|
||||
mtime "go.unistack.org/micro/v4/util/time"
|
||||
)
|
||||
|
||||
type cfg struct {
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options hold the config options
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Package errors provides a way to return detailed information
|
||||
// for an RPC request error. The error is normally JSON encoded.
|
||||
package errors // import "go.unistack.org/micro/v3/errors"
|
||||
package errors // import "go.unistack.org/micro/v4/errors"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Unistack LLC
|
||||
// Copyright 2021-2023 Unistack LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@ -17,7 +17,7 @@ syntax = "proto3";
|
||||
package micro.errors;
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option go_package = "go.unistack.org/micro/v3/errors;errors";
|
||||
option go_package = "go.unistack.org/micro/v4/errors;errors";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "MicroErrors";
|
||||
option java_package = "micro.errors";
|
||||
|
2
event.go
2
event.go
@ -3,7 +3,7 @@ package micro
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
)
|
||||
|
||||
// Event is used to publish messages to a topic
|
||||
|
@ -6,12 +6,12 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/silas/dag"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
type microFlow struct {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package flow is an interface used for saga pattern microservice workflow
|
||||
package flow // import "go.unistack.org/micro/v3/flow"
|
||||
package flow // import "go.unistack.org/micro/v4/flow"
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Option func
|
||||
|
@ -1,4 +1,4 @@
|
||||
package fsm // import "go.unistack.org/micro/v3/fsm"
|
||||
package fsm // import "go.unistack.org/micro/v4/fsm"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
)
|
||||
|
||||
func TestFSMStart(t *testing.T) {
|
||||
|
5
go.mod
5
go.mod
@ -1,8 +1,9 @@
|
||||
module go.unistack.org/micro/v3
|
||||
module go.unistack.org/micro/v4
|
||||
|
||||
go 1.19
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0
|
||||
github.com/imdario/mergo v0.3.14
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/silas/dag v0.0.0-20211117232152-9d50aa809f35
|
||||
|
2
go.sum
2
go.sum
@ -1,3 +1,5 @@
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
|
||||
github.com/imdario/mergo v0.3.14 h1:fOqeC1+nCuuk6PKQdg9YmosXX7Y7mHX6R/0ZldI9iHo=
|
||||
github.com/imdario/mergo v0.3.14/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package logger provides a log interface
|
||||
package logger // import "go.unistack.org/micro/v3/logger"
|
||||
package logger // import "go.unistack.org/micro/v4/logger"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
)
|
||||
|
||||
const sf = "0-+# "
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
)
|
||||
|
||||
func TestUnwrap(t *testing.T) {
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package metadata is a way of defining message headers
|
||||
package metadata // import "go.unistack.org/micro/v3/metadata"
|
||||
package metadata // import "go.unistack.org/micro/v4/metadata"
|
||||
|
||||
import (
|
||||
"net/textproto"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package meter is for instrumentation
|
||||
package meter // import "go.unistack.org/micro/v3/meter"
|
||||
package meter // import "go.unistack.org/micro/v4/meter"
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
@ -3,7 +3,7 @@ package meter
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
)
|
||||
|
||||
// Option powers the configuration for metrics implementations:
|
||||
|
@ -1,13 +1,13 @@
|
||||
package wrapper // import "go.unistack.org/micro/v3/meter/wrapper"
|
||||
package wrapper // import "go.unistack.org/micro/v4/meter/wrapper"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,4 +1,4 @@
|
||||
package mtls // import "go.unistack.org/micro/v3/mtls"
|
||||
package mtls // import "go.unistack.org/micro/v4/mtls"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Package network is for creating internetworks
|
||||
package network // import "go.unistack.org/micro/v3/network"
|
||||
package network // import "go.unistack.org/micro/v4/network"
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
)
|
||||
|
||||
// Error is network node errors
|
||||
|
@ -1,13 +1,13 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/network/tunnel"
|
||||
"go.unistack.org/micro/v3/proxy"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/network/tunnel"
|
||||
"go.unistack.org/micro/v4/proxy"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
// Option func
|
||||
|
@ -8,9 +8,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
maddr "go.unistack.org/micro/v3/util/addr"
|
||||
mnet "go.unistack.org/micro/v3/util/net"
|
||||
"go.unistack.org/micro/v3/util/rand"
|
||||
maddr "go.unistack.org/micro/v4/util/addr"
|
||||
mnet "go.unistack.org/micro/v4/util/net"
|
||||
"go.unistack.org/micro/v4/util/rand"
|
||||
)
|
||||
|
||||
type memorySocket struct {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options struct holds the transport options
|
||||
|
@ -1,11 +1,11 @@
|
||||
// Package transport is an interface for synchronous connection based communication
|
||||
package transport // import "go.unistack.org/micro/v3/network/transport"
|
||||
package transport // import "go.unistack.org/micro/v4/network/transport"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,15 +1,15 @@
|
||||
// Package broker is a tunnel broker
|
||||
package broker // import "go.unistack.org/micro/v3/network/tunnel/broker"
|
||||
package broker // import "go.unistack.org/micro/v4/network/tunnel/broker"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/network/tunnel"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/network/tunnel"
|
||||
)
|
||||
|
||||
type tunBroker struct {
|
||||
|
@ -3,11 +3,11 @@ package tunnel
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,8 +1,8 @@
|
||||
package transport
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/network/tunnel"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/network/tunnel"
|
||||
)
|
||||
|
||||
type tunListener struct {
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Package transport provides a tunnel transport
|
||||
package transport // import "go.unistack.org/micro/v3/network/tunnel/transport"
|
||||
package transport // import "go.unistack.org/micro/v4/network/tunnel/transport"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/network/tunnel"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/network/tunnel"
|
||||
)
|
||||
|
||||
type tunTransport struct {
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Package tunnel provides gre network tunnelling
|
||||
package tunnel // import "go.unistack.org/micro/v3/network/transport/tunnel"
|
||||
package tunnel // import "go.unistack.org/micro/v4/network/transport/tunnel"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
)
|
||||
|
||||
// DefaultTunnel contains default tunnel implementation
|
||||
|
22
options.go
22
options.go
@ -5,17 +5,17 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/config"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/config"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options for micro service
|
||||
|
@ -1,4 +1,4 @@
|
||||
package options // import "go.unistack.org/micro/v3/options"
|
||||
package options // import "go.unistack.org/micro/v4/options"
|
||||
|
||||
// Hook func interface
|
||||
type Hook interface{}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package http enables the http profiler
|
||||
package http // import "go.unistack.org/micro/v3/profiler/http"
|
||||
package http // import "go.unistack.org/micro/v4/profiler/http"
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"net/http/pprof"
|
||||
"sync"
|
||||
|
||||
profile "go.unistack.org/micro/v3/profiler"
|
||||
profile "go.unistack.org/micro/v4/profiler"
|
||||
)
|
||||
|
||||
type httpProfile struct {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package pprof provides a pprof profiler which writes output to /tmp/[name].{cpu,mem}.pprof
|
||||
package pprof // import "go.unistack.org/micro/v3/profiler/pprof"
|
||||
package pprof // import "go.unistack.org/micro/v4/profiler/pprof"
|
||||
|
||||
import (
|
||||
"os"
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
profile "go.unistack.org/micro/v3/profiler"
|
||||
profile "go.unistack.org/micro/v4/profiler"
|
||||
)
|
||||
|
||||
type profiler struct {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package profiler is for profilers
|
||||
package profiler // import "go.unistack.org/micro/v3/profiler"
|
||||
package profiler // import "go.unistack.org/micro/v4/profiler"
|
||||
|
||||
// Profiler interface
|
||||
type Profiler interface {
|
||||
|
@ -2,11 +2,11 @@
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options for proxy
|
||||
|
@ -1,10 +1,10 @@
|
||||
// Package proxy is a transparent proxy built on the micro/server
|
||||
package proxy // import "go.unistack.org/micro/v3/proxy"
|
||||
package proxy // import "go.unistack.org/micro/v4/proxy"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
)
|
||||
|
||||
// DefaultEndpoint holds default proxy address
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
// ExtractValue from reflect.Type from specified depth
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options holds options for register
|
||||
|
@ -1,11 +1,11 @@
|
||||
// Package register is an interface for service discovery
|
||||
package register // import "go.unistack.org/micro/v3/register"
|
||||
package register // import "go.unistack.org/micro/v4/register"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package dns resolves names to dns records
|
||||
package dns // import "go.unistack.org/micro/v3/resolver/dns"
|
||||
package dns // import "go.unistack.org/micro/v4/resolver/dns"
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// Resolver is a DNS network resolve
|
||||
|
@ -1,11 +1,11 @@
|
||||
// Package dnssrv resolves names to dns srv records
|
||||
package dnssrv // import "go.unistack.org/micro/v3/resolver/dnssrv"
|
||||
package dnssrv // import "go.unistack.org/micro/v4/resolver/dnssrv"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// Resolver is a DNS network resolve
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package http resolves names to network addresses using a http request
|
||||
package http // import "go.unistack.org/micro/v3/resolver/http"
|
||||
package http // import "go.unistack.org/micro/v4/resolver/http"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// nolint: golint,revive
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Package noop is a noop resolver
|
||||
package noop // import "go.unistack.org/micro/v3/resolver/noop"
|
||||
package noop // import "go.unistack.org/micro/v4/resolver/noop"
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// Resolver contains noop resolver
|
||||
|
@ -1,11 +1,11 @@
|
||||
// Package register resolves names using the micro register
|
||||
package register // import "go.unistack.org/micro/v3/resolver/registry"
|
||||
package register // import "go.unistack.org/micro/v4/resolver/registry"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// Resolver is a register network resolver
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package resolver resolves network names to addresses
|
||||
package resolver // import "go.unistack.org/micro/v3/resolver"
|
||||
package resolver // import "go.unistack.org/micro/v4/resolver"
|
||||
|
||||
// Resolver is network resolver. It's used to find network nodes
|
||||
// via the name to connect to. This is done based on Network.Name().
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Package static is a static resolver
|
||||
package static // import "go.unistack.org/micro/v3/resolver/static"
|
||||
package static // import "go.unistack.org/micro/v4/resolver/static"
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/resolver"
|
||||
"go.unistack.org/micro/v4/resolver"
|
||||
)
|
||||
|
||||
// Resolver returns a static list of nodes. In the event the node list
|
||||
|
@ -3,9 +3,9 @@ package router
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
// Options are router options
|
||||
|
@ -3,7 +3,7 @@ package router
|
||||
import (
|
||||
"hash/fnv"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package router provides a network routing control plane
|
||||
package router // import "go.unistack.org/micro/v3/router"
|
||||
package router // import "go.unistack.org/micro/v4/router"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package random // import "go.unistack.org/micro/v3/selector/random"
|
||||
package random // import "go.unistack.org/micro/v4/selector/random"
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v3/util/rand"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
"go.unistack.org/micro/v4/util/rand"
|
||||
)
|
||||
|
||||
type random struct{}
|
||||
|
@ -3,7 +3,7 @@ package random
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
)
|
||||
|
||||
func TestRandom(t *testing.T) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package roundrobin // import "go.unistack.org/micro/v3/selector/roundrobin"
|
||||
package roundrobin // import "go.unistack.org/micro/v4/selector/roundrobin"
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v3/util/rand"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
"go.unistack.org/micro/v4/util/rand"
|
||||
)
|
||||
|
||||
// NewSelector returns an initialised round robin selector
|
||||
|
@ -3,7 +3,7 @@ package roundrobin
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/selector"
|
||||
"go.unistack.org/micro/v4/selector"
|
||||
)
|
||||
|
||||
func TestRoundRobin(t *testing.T) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package selector is for node selection and load balancing
|
||||
package selector // import "go.unistack.org/micro/v3/selector"
|
||||
package selector // import "go.unistack.org/micro/v4/selector"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -1,6 +1,6 @@
|
||||
package server
|
||||
|
||||
import "go.unistack.org/micro/v3/errors"
|
||||
import "go.unistack.org/micro/v4/errors"
|
||||
|
||||
type Error struct {
|
||||
id string
|
||||
|
@ -3,7 +3,7 @@ package server
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
)
|
||||
|
||||
func TestError(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package server
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
)
|
||||
|
||||
type rpcHandler struct {
|
||||
|
@ -6,13 +6,13 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
maddr "go.unistack.org/micro/v3/util/addr"
|
||||
mnet "go.unistack.org/micro/v3/util/net"
|
||||
"go.unistack.org/micro/v3/util/rand"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
maddr "go.unistack.org/micro/v4/util/addr"
|
||||
mnet "go.unistack.org/micro/v4/util/net"
|
||||
"go.unistack.org/micro/v4/util/rand"
|
||||
)
|
||||
|
||||
// DefaultCodecs will be used to encode/decode
|
||||
|
@ -5,12 +5,12 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
)
|
||||
|
||||
type TestHandler struct {
|
||||
|
@ -7,16 +7,16 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/network/transport"
|
||||
"go.unistack.org/micro/v3/options"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v3/util/id"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/network/transport"
|
||||
"go.unistack.org/micro/v4/options"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
"go.unistack.org/micro/v4/util/id"
|
||||
)
|
||||
|
||||
// Option func
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/util/addr"
|
||||
"go.unistack.org/micro/v3/util/backoff"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/util/addr"
|
||||
"go.unistack.org/micro/v4/util/backoff"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,8 +1,8 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
)
|
||||
|
||||
type rpcMessage struct {
|
||||
|
@ -1,13 +1,13 @@
|
||||
// Package server is an interface for a micro server
|
||||
package server // import "go.unistack.org/micro/v3/server"
|
||||
package server // import "go.unistack.org/micro/v4/server"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
)
|
||||
|
||||
// DefaultServer default server
|
||||
|
@ -10,12 +10,12 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/errors"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/errors"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
)
|
||||
|
||||
const (
|
||||
|
22
service.go
22
service.go
@ -1,20 +1,20 @@
|
||||
// Package micro is a pluggable framework for microservices
|
||||
package micro // import "go.unistack.org/micro/v3"
|
||||
package micro // import "go.unistack.org/micro/v4"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/config"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/config"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Service is an interface that wraps the lower level components.
|
||||
|
@ -5,16 +5,16 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/config"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/config"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
type testItem struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/store"
|
||||
"go.unistack.org/micro/v4/store"
|
||||
)
|
||||
|
||||
func TestMemoryReInit(t *testing.T) {
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/codec"
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/codec"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options contains configuration for the Store
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package store is an interface for distributed data storage.
|
||||
package store // import "go.unistack.org/micro/v3/store"
|
||||
package store // import "go.unistack.org/micro/v4/store"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -3,9 +3,9 @@ package sync
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v3/meter"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
"go.unistack.org/micro/v4/meter"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
// Options holds the sync options
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package sync is an interface for distributed synchronization
|
||||
package sync // import "go.unistack.org/micro/v3/sync"
|
||||
package sync // import "go.unistack.org/micro/v4/sync"
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -3,7 +3,7 @@ package tracer
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.unistack.org/micro/v3/logger"
|
||||
"go.unistack.org/micro/v4/logger"
|
||||
)
|
||||
|
||||
type SpanStatus int
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package tracer provides an interface for distributed tracing
|
||||
package tracer // import "go.unistack.org/micro/v3/tracer"
|
||||
package tracer // import "go.unistack.org/micro/v4/tracer"
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -1,14 +1,14 @@
|
||||
// Package wrapper provides wrapper for Tracer
|
||||
package wrapper // import "go.unistack.org/micro/v3/tracer/wrapper"
|
||||
package wrapper // import "go.unistack.org/micro/v4/tracer/wrapper"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/server"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
"go.unistack.org/micro/v4/client"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/server"
|
||||
"go.unistack.org/micro/v4/tracer"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,4 +1,4 @@
|
||||
package addr // import "go.unistack.org/micro/v3/util/addr"
|
||||
package addr // import "go.unistack.org/micro/v4/util/addr"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Package backoff provides backoff functionality
|
||||
package backoff // import "go.unistack.org/micro/v3/util/backoff"
|
||||
package backoff // import "go.unistack.org/micro/v4/util/backoff"
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package buf // import "go.unistack.org/micro/v3/util/buf"
|
||||
package buf // import "go.unistack.org/micro/v4/util/buf"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package http // import "go.unistack.org/micro/v3/util/http"
|
||||
package http // import "go.unistack.org/micro/v4/util/http"
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -8,8 +8,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"go.unistack.org/micro/v3/metadata"
|
||||
"go.unistack.org/micro/v3/selector/random"
|
||||
"go.unistack.org/micro/v4/metadata"
|
||||
"go.unistack.org/micro/v4/selector/random"
|
||||
)
|
||||
|
||||
// Write sets the status and body on a http ResponseWriter
|
||||
|
@ -9,10 +9,10 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"go.unistack.org/micro/v3/register"
|
||||
"go.unistack.org/micro/v3/register/memory"
|
||||
"go.unistack.org/micro/v3/router"
|
||||
regRouter "go.unistack.org/micro/v3/router/register"
|
||||
"go.unistack.org/micro/v4/register"
|
||||
"go.unistack.org/micro/v4/register/memory"
|
||||
"go.unistack.org/micro/v4/router"
|
||||
regRouter "go.unistack.org/micro/v4/router/register"
|
||||
)
|
||||
|
||||
func TestRoundTripper(t *testing.T) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user