Merge pull request #1144 from unistack-org/v2
fix import paths for v2 release
This commit is contained in:
commit
21e0932339
@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type discordConn struct {
|
type discordConn struct {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/bwmarrin/discordgo"
|
"github.com/bwmarrin/discordgo"
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
"github.com/nlopes/slack"
|
"github.com/nlopes/slack"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
"github.com/nlopes/slack"
|
"github.com/nlopes/slack"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/forestgiant/sliceutil"
|
"github.com/forestgiant/sliceutil"
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
tgbotapi "gopkg.in/telegram-bot-api.v4"
|
tgbotapi "gopkg.in/telegram-bot-api.v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
"github.com/micro/go-micro/agent/input"
|
"github.com/micro/go-micro/v2/agent/input"
|
||||||
tgbotapi "gopkg.in/telegram-bot-api.v4"
|
tgbotapi "gopkg.in/telegram-bot-api.v4"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/agent/proto/bot.proto
|
// source: github.com/micro/go-micro/v2/agent/proto/bot.proto
|
||||||
|
|
||||||
package go_micro_bot
|
package go_micro_bot
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterFile("github.com/micro/go-micro/agent/proto/bot.proto", fileDescriptor_018e8d5b14a89d12)
|
proto.RegisterFile("github.com/micro/go-micro/v2/agent/proto/bot.proto", fileDescriptor_018e8d5b14a89d12)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_018e8d5b14a89d12 = []byte{
|
var fileDescriptor_018e8d5b14a89d12 = []byte{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/agent/proto/bot.proto
|
// source: github.com/micro/go-micro/v2/agent/proto/bot.proto
|
||||||
|
|
||||||
package go_micro_bot
|
package go_micro_bot
|
||||||
|
|
||||||
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
client "github.com/micro/go-micro/client"
|
client "github.com/micro/go-micro/v2/client"
|
||||||
server "github.com/micro/go-micro/server"
|
server "github.com/micro/go-micro/v2/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/server"
|
"github.com/micro/go-micro/v2/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Endpoint is a mapping between an RPC method and HTTP endpoint
|
// Endpoint is a mapping between an RPC method and HTTP endpoint
|
||||||
|
@ -4,13 +4,13 @@ package api
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
goapi "github.com/micro/go-micro/api"
|
goapi "github.com/micro/go-micro/v2/api"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
api "github.com/micro/go-micro/api/proto"
|
api "github.com/micro/go-micro/v2/api/proto"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/util/ctx"
|
"github.com/micro/go-micro/v2/util/ctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiHandler struct {
|
type apiHandler struct {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
api "github.com/micro/go-micro/api/proto"
|
api "github.com/micro/go-micro/v2/api/proto"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func requestToProto(r *http.Request) (*api.Request, error) {
|
func requestToProto(r *http.Request) (*api.Request, error) {
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/util/ctx"
|
"github.com/micro/go-micro/v2/util/ctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type event struct {
|
type event struct {
|
||||||
|
@ -12,9 +12,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
proto "github.com/micro/go-micro/api/proto"
|
proto "github.com/micro/go-micro/v2/api/proto"
|
||||||
"github.com/micro/go-micro/util/ctx"
|
"github.com/micro/go-micro/v2/util/ctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type event struct {
|
type event struct {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,11 +6,11 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/api/router"
|
"github.com/micro/go-micro/v2/api/router"
|
||||||
regRouter "github.com/micro/go-micro/api/router/registry"
|
regRouter "github.com/micro/go-micro/v2/api/router/registry"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/registry/memory"
|
"github.com/micro/go-micro/v2/registry/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testHttp(t *testing.T, path, service, ns string) {
|
func testHttp(t *testing.T, path, service, ns string) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro"
|
"github.com/micro/go-micro/v2"
|
||||||
"github.com/micro/go-micro/api/router"
|
"github.com/micro/go-micro/v2/api/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -10,17 +10,17 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/joncalhoun/qson"
|
"github.com/joncalhoun/qson"
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
proto "github.com/micro/go-micro/api/internal/proto"
|
proto "github.com/micro/go-micro/v2/api/internal/proto"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/codec/jsonrpc"
|
"github.com/micro/go-micro/v2/codec/jsonrpc"
|
||||||
"github.com/micro/go-micro/codec/protorpc"
|
"github.com/micro/go-micro/v2/codec/protorpc"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/util/ctx"
|
"github.com/micro/go-micro/v2/util/ctx"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
go_api "github.com/micro/go-micro/api/proto"
|
go_api "github.com/micro/go-micro/v2/api/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRequestPayloadFromRequest(t *testing.T) {
|
func TestRequestPayloadFromRequest(t *testing.T) {
|
||||||
|
@ -11,9 +11,9 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
"github.com/micro/go-micro/api/handler"
|
"github.com/micro/go-micro/v2/api/handler"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/api/proto/api.proto
|
// source: github.com/micro/go-micro/v2/api/proto/api.proto
|
||||||
|
|
||||||
package go_api
|
package go_api
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterFile("github.com/micro/go-micro/api/proto/api.proto", fileDescriptor_7b6696ef87ec1943)
|
proto.RegisterFile("github.com/micro/go-micro/v2/api/proto/api.proto", fileDescriptor_7b6696ef87ec1943)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_7b6696ef87ec1943 = []byte{
|
var fileDescriptor_7b6696ef87ec1943 = []byte{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/api/proto/api.proto
|
// source: github.com/micro/go-micro/v2/api/proto/api.proto
|
||||||
|
|
||||||
package go_api
|
package go_api
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct{}
|
type Resolver struct{}
|
||||||
|
@ -4,7 +4,7 @@ package host
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct{}
|
type Resolver struct{}
|
||||||
|
@ -4,7 +4,7 @@ package micro
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// default resolver for legacy purposes
|
// default resolver for legacy purposes
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct{}
|
type Resolver struct{}
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct{}
|
type Resolver struct{}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/api/resolver"
|
"github.com/micro/go-micro/v2/api/resolver"
|
||||||
"github.com/micro/go-micro/api/resolver/micro"
|
"github.com/micro/go-micro/v2/api/resolver/micro"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -11,10 +11,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
"github.com/micro/go-micro/api/router"
|
"github.com/micro/go-micro/v2/api/router"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/registry/cache"
|
"github.com/micro/go-micro/v2/registry/cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
// router is the default router
|
// router is the default router
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetNamespace(t *testing.T) {
|
func TestSetNamespace(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ package router
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api"
|
"github.com/micro/go-micro/v2/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Router is used to determine an endpoint for a request
|
// Router is used to determine an endpoint for a request
|
||||||
|
@ -5,7 +5,7 @@ package autocert
|
|||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/server/acme"
|
"github.com/micro/go-micro/v2/api/server/acme"
|
||||||
"golang.org/x/crypto/acme/autocert"
|
"golang.org/x/crypto/acme/autocert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/server/acme"
|
"github.com/micro/go-micro/v2/api/server/acme"
|
||||||
)
|
)
|
||||||
|
|
||||||
type certmagicProvider struct {
|
type certmagicProvider struct {
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
"github.com/go-acme/lego/v3/providers/dns/cloudflare"
|
"github.com/go-acme/lego/v3/providers/dns/cloudflare"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
"github.com/micro/go-micro/api/server/acme"
|
"github.com/micro/go-micro/v2/api/server/acme"
|
||||||
cfstore "github.com/micro/go-micro/store/cloudflare"
|
cfstore "github.com/micro/go-micro/v2/store/cloudflare"
|
||||||
"github.com/micro/go-micro/sync/lock/memory"
|
"github.com/micro/go-micro/v2/sync/lock/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCertMagic(t *testing.T) {
|
func TestCertMagic(t *testing.T) {
|
||||||
|
@ -10,8 +10,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
"github.com/micro/go-micro/store"
|
"github.com/micro/go-micro/v2/store"
|
||||||
"github.com/micro/go-micro/sync/lock"
|
"github.com/micro/go-micro/v2/sync/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// File represents a "File" that will be stored in store.Store - the contents and last modified time
|
// File represents a "File" that will be stored in store.Store - the contents and last modified time
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/gorilla/handlers"
|
"github.com/gorilla/handlers"
|
||||||
"github.com/micro/go-micro/api/server"
|
"github.com/micro/go-micro/v2/api/server"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type httpServer struct {
|
type httpServer struct {
|
||||||
|
@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/api/server/acme"
|
"github.com/micro/go-micro/v2/api/server/acme"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(o *Options)
|
type Option func(o *Options)
|
||||||
|
@ -10,10 +10,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec/json"
|
"github.com/micro/go-micro/v2/codec/json"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/util/addr"
|
"github.com/micro/go-micro/v2/util/addr"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
"github.com/nats-io/nats-server/v2/server"
|
"github.com/nats-io/nats-server/v2/server"
|
||||||
nats "github.com/nats-io/nats.go"
|
nats "github.com/nats-io/nats.go"
|
||||||
)
|
)
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
maddr "github.com/micro/go-micro/util/addr"
|
maddr "github.com/micro/go-micro/v2/util/addr"
|
||||||
mnet "github.com/micro/go-micro/util/net"
|
mnet "github.com/micro/go-micro/v2/util/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memoryBroker struct {
|
type memoryBroker struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMemoryBroker(t *testing.T) {
|
func TestMemoryBroker(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package nats
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setSubscribeOption returns a function to setup a context with given value
|
// setSubscribeOption returns a function to setup a context with given value
|
||||||
|
@ -11,11 +11,11 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/codec/json"
|
"github.com/micro/go-micro/v2/codec/json"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/util/addr"
|
"github.com/micro/go-micro/v2/util/addr"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
"github.com/nats-io/nats-server/v2/server"
|
"github.com/nats-io/nats-server/v2/server"
|
||||||
nats "github.com/nats-io/nats.go"
|
nats "github.com/nats-io/nats.go"
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
nats "github.com/nats-io/nats.go"
|
nats "github.com/nats-io/nats.go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package nats
|
package nats
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
nats "github.com/nats-io/nats.go"
|
nats "github.com/nats-io/nats.go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
client "github.com/micro/go-micro/client"
|
client "github.com/micro/go-micro/v2/client"
|
||||||
server "github.com/micro/go-micro/server"
|
server "github.com/micro/go-micro/v2/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
pb "github.com/micro/go-micro/broker/service/proto"
|
pb "github.com/micro/go-micro/v2/broker/service/proto"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type serviceBroker struct {
|
type serviceBroker struct {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
pb "github.com/micro/go-micro/broker/service/proto"
|
pb "github.com/micro/go-micro/v2/broker/service/proto"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type serviceSub struct {
|
type serviceSub struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client is the interface used to make requests to services.
|
// Client is the interface used to make requests to services.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/codec/bytes"
|
"github.com/micro/go-micro/v2/codec/bytes"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
raw "github.com/micro/go-micro/codec/bytes"
|
raw "github.com/micro/go-micro/v2/codec/bytes"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/metadata"
|
"github.com/micro/go-micro/v2/metadata"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials"
|
"google.golang.org/grpc/credentials"
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/registry/memory"
|
"github.com/micro/go-micro/v2/registry/memory"
|
||||||
pgrpc "google.golang.org/grpc"
|
pgrpc "google.golang.org/grpc"
|
||||||
pb "google.golang.org/grpc/examples/helloworld/helloworld"
|
pb "google.golang.org/grpc/examples/helloworld/helloworld"
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type grpcEvent struct {
|
type grpcEvent struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
)
|
)
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type grpcRequest struct {
|
type grpcRequest struct {
|
||||||
|
@ -3,8 +3,8 @@ package grpc
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/codec/bytes"
|
"github.com/micro/go-micro/v2/codec/bytes"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
package mucp
|
package mucp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewClient returns a new micro client interface
|
// NewClient returns a new micro client interface
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCallOptions(t *testing.T) {
|
func TestCallOptions(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package client
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// note that returning either false or a non-nil error will result in the call not being retried
|
// note that returning either false or a non-nil error will result in the call not being retried
|
||||||
|
@ -9,16 +9,16 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
raw "github.com/micro/go-micro/codec/bytes"
|
raw "github.com/micro/go-micro/v2/codec/bytes"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/metadata"
|
"github.com/micro/go-micro/v2/metadata"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
"github.com/micro/go-micro/util/buf"
|
"github.com/micro/go-micro/v2/util/buf"
|
||||||
"github.com/micro/go-micro/util/pool"
|
"github.com/micro/go-micro/v2/util/pool"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcClient struct {
|
type rpcClient struct {
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/registry/memory"
|
"github.com/micro/go-micro/v2/registry/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestRegistry() registry.Registry {
|
func newTestRegistry() registry.Registry {
|
||||||
|
@ -4,16 +4,16 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
errs "errors"
|
errs "errors"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
raw "github.com/micro/go-micro/codec/bytes"
|
raw "github.com/micro/go-micro/v2/codec/bytes"
|
||||||
"github.com/micro/go-micro/codec/grpc"
|
"github.com/micro/go-micro/v2/codec/grpc"
|
||||||
"github.com/micro/go-micro/codec/json"
|
"github.com/micro/go-micro/v2/codec/json"
|
||||||
"github.com/micro/go-micro/codec/jsonrpc"
|
"github.com/micro/go-micro/v2/codec/jsonrpc"
|
||||||
"github.com/micro/go-micro/codec/proto"
|
"github.com/micro/go-micro/v2/codec/proto"
|
||||||
"github.com/micro/go-micro/codec/protorpc"
|
"github.com/micro/go-micro/v2/codec/protorpc"
|
||||||
"github.com/micro/go-micro/errors"
|
"github.com/micro/go-micro/v2/errors"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcRequest struct {
|
type rpcRequest struct {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcResponse struct {
|
type rpcResponse struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Implements the streamer interface
|
// Implements the streamer interface
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package selector
|
package selector
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,8 +3,8 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/registry/cache"
|
"github.com/micro/go-micro/v2/registry/cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
type registrySelector struct {
|
type registrySelector struct {
|
||||||
|
@ -3,7 +3,7 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry/memory"
|
"github.com/micro/go-micro/v2/registry/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRegistrySelector(t *testing.T) {
|
func TestRegistrySelector(t *testing.T) {
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type dnsSelector struct {
|
type dnsSelector struct {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package selector
|
package selector
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FilterEndpoint is an endpoint based Select Filter which will
|
// FilterEndpoint is an endpoint based Select Filter which will
|
||||||
|
@ -3,7 +3,7 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFilterEndpoint(t *testing.T) {
|
func TestFilterEndpoint(t *testing.T) {
|
||||||
|
@ -3,7 +3,7 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Set the registry cache ttl
|
// Set the registry cache ttl
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
package registry
|
package registry
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewSelector returns a new registry selector
|
// NewSelector returns a new registry selector
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/router"
|
"github.com/micro/go-micro/v2/router"
|
||||||
pb "github.com/micro/go-micro/router/service/proto"
|
pb "github.com/micro/go-micro/v2/router/service/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type routerSelector struct {
|
type routerSelector struct {
|
||||||
|
@ -4,7 +4,7 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Selector builds on the registry as a mechanism to pick nodes
|
// Selector builds on the registry as a mechanism to pick nodes
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
package static
|
package static
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// staticSelector is a static selector
|
// staticSelector is a static selector
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -3,7 +3,7 @@ package selector
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStrategies(t *testing.T) {
|
func TestStrategies(t *testing.T) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/client/proto/client.proto
|
// source: github.com/micro/go-micro/v2/client/proto/client.proto
|
||||||
|
|
||||||
package go_micro_client
|
package go_micro_client
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterFile("github.com/micro/go-micro/client/proto/client.proto", fileDescriptor_d418333f021a3308)
|
proto.RegisterFile("github.com/micro/go-micro/v2/client/proto/client.proto", fileDescriptor_d418333f021a3308)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_d418333f021a3308 = []byte{
|
var fileDescriptor_d418333f021a3308 = []byte{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/client/proto/client.proto
|
// source: github.com/micro/go-micro/v2/client/proto/client.proto
|
||||||
|
|
||||||
package go_micro_client
|
package go_micro_client
|
||||||
|
|
||||||
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
client "github.com/micro/go-micro/client"
|
client "github.com/micro/go-micro/v2/client"
|
||||||
server "github.com/micro/go-micro/server"
|
server "github.com/micro/go-micro/v2/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -3,7 +3,7 @@ package client
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CallFunc represents the individual call func
|
// CallFunc represents the individual call func
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type clientCodec struct {
|
type clientCodec struct {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type jsonCodec struct {
|
type jsonCodec struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type serverCodec struct {
|
type serverCodec struct {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type flusher interface {
|
type flusher interface {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/micro/go-micro/codec"
|
"github.com/micro/go-micro/v2/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
@ -7,54 +7,54 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/debug/trace"
|
"github.com/micro/go-micro/v2/debug/trace"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/runtime"
|
"github.com/micro/go-micro/v2/runtime"
|
||||||
"github.com/micro/go-micro/server"
|
"github.com/micro/go-micro/v2/server"
|
||||||
"github.com/micro/go-micro/store"
|
"github.com/micro/go-micro/v2/store"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/v2/util/log"
|
||||||
|
|
||||||
// clients
|
// clients
|
||||||
cgrpc "github.com/micro/go-micro/client/grpc"
|
cgrpc "github.com/micro/go-micro/v2/client/grpc"
|
||||||
cmucp "github.com/micro/go-micro/client/mucp"
|
cmucp "github.com/micro/go-micro/v2/client/mucp"
|
||||||
|
|
||||||
// servers
|
// servers
|
||||||
"github.com/micro/cli/v2"
|
"github.com/micro/cli/v2"
|
||||||
sgrpc "github.com/micro/go-micro/server/grpc"
|
sgrpc "github.com/micro/go-micro/v2/server/grpc"
|
||||||
smucp "github.com/micro/go-micro/server/mucp"
|
smucp "github.com/micro/go-micro/v2/server/mucp"
|
||||||
|
|
||||||
// brokers
|
// brokers
|
||||||
"github.com/micro/go-micro/broker/memory"
|
"github.com/micro/go-micro/v2/broker/memory"
|
||||||
"github.com/micro/go-micro/broker/nats"
|
"github.com/micro/go-micro/v2/broker/nats"
|
||||||
brokerSrv "github.com/micro/go-micro/broker/service"
|
brokerSrv "github.com/micro/go-micro/v2/broker/service"
|
||||||
|
|
||||||
// registries
|
// registries
|
||||||
"github.com/micro/go-micro/registry/etcd"
|
"github.com/micro/go-micro/v2/registry/etcd"
|
||||||
kreg "github.com/micro/go-micro/registry/kubernetes"
|
kreg "github.com/micro/go-micro/v2/registry/kubernetes"
|
||||||
"github.com/micro/go-micro/registry/mdns"
|
"github.com/micro/go-micro/v2/registry/mdns"
|
||||||
rmem "github.com/micro/go-micro/registry/memory"
|
rmem "github.com/micro/go-micro/v2/registry/memory"
|
||||||
regSrv "github.com/micro/go-micro/registry/service"
|
regSrv "github.com/micro/go-micro/v2/registry/service"
|
||||||
|
|
||||||
// selectors
|
// selectors
|
||||||
"github.com/micro/go-micro/client/selector/dns"
|
"github.com/micro/go-micro/v2/client/selector/dns"
|
||||||
"github.com/micro/go-micro/client/selector/router"
|
"github.com/micro/go-micro/v2/client/selector/router"
|
||||||
"github.com/micro/go-micro/client/selector/static"
|
"github.com/micro/go-micro/v2/client/selector/static"
|
||||||
|
|
||||||
// transports
|
// transports
|
||||||
thttp "github.com/micro/go-micro/transport/http"
|
thttp "github.com/micro/go-micro/v2/transport/http"
|
||||||
tmem "github.com/micro/go-micro/transport/memory"
|
tmem "github.com/micro/go-micro/v2/transport/memory"
|
||||||
|
|
||||||
// stores
|
// stores
|
||||||
memStore "github.com/micro/go-micro/store/memory"
|
memStore "github.com/micro/go-micro/v2/store/memory"
|
||||||
svcStore "github.com/micro/go-micro/store/service"
|
svcStore "github.com/micro/go-micro/v2/store/service"
|
||||||
|
|
||||||
// tracers
|
// tracers
|
||||||
// jTracer "github.com/micro/go-micro/debug/trace/jaeger"
|
// jTracer "github.com/micro/go-micro/v2/debug/trace/jaeger"
|
||||||
memTracer "github.com/micro/go-micro/debug/trace/memory"
|
memTracer "github.com/micro/go-micro/v2/debug/trace/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cmd interface {
|
type Cmd interface {
|
||||||
|
@ -3,15 +3,15 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/broker"
|
"github.com/micro/go-micro/v2/broker"
|
||||||
"github.com/micro/go-micro/client"
|
"github.com/micro/go-micro/v2/client"
|
||||||
"github.com/micro/go-micro/client/selector"
|
"github.com/micro/go-micro/v2/client/selector"
|
||||||
"github.com/micro/go-micro/debug/trace"
|
"github.com/micro/go-micro/v2/debug/trace"
|
||||||
"github.com/micro/go-micro/registry"
|
"github.com/micro/go-micro/v2/registry"
|
||||||
"github.com/micro/go-micro/runtime"
|
"github.com/micro/go-micro/v2/runtime"
|
||||||
"github.com/micro/go-micro/server"
|
"github.com/micro/go-micro/v2/server"
|
||||||
"github.com/micro/go-micro/store"
|
"github.com/micro/go-micro/v2/store"
|
||||||
"github.com/micro/go-micro/transport"
|
"github.com/micro/go-micro/v2/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -4,10 +4,10 @@ package config
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/config/loader"
|
"github.com/micro/go-micro/v2/config/loader"
|
||||||
"github.com/micro/go-micro/config/reader"
|
"github.com/micro/go-micro/v2/config/reader"
|
||||||
"github.com/micro/go-micro/config/source"
|
"github.com/micro/go-micro/v2/config/source"
|
||||||
"github.com/micro/go-micro/config/source/file"
|
"github.com/micro/go-micro/v2/config/source/file"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config is an interface abstraction for dynamic configuration
|
// Config is an interface abstraction for dynamic configuration
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/config/loader"
|
"github.com/micro/go-micro/v2/config/loader"
|
||||||
"github.com/micro/go-micro/config/loader/memory"
|
"github.com/micro/go-micro/v2/config/loader/memory"
|
||||||
"github.com/micro/go-micro/config/reader"
|
"github.com/micro/go-micro/v2/config/reader"
|
||||||
"github.com/micro/go-micro/config/reader/json"
|
"github.com/micro/go-micro/v2/config/reader/json"
|
||||||
"github.com/micro/go-micro/config/source"
|
"github.com/micro/go-micro/v2/config/source"
|
||||||
)
|
)
|
||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
|
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