move all imports to own domain

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-10-02 19:55:07 +03:00
parent ada59119cc
commit 5eb0e56373
152 changed files with 378 additions and 454 deletions

View File

@ -1,13 +1,13 @@
package api
package api // import "go.unistack.org/micro/v3/api"
import (
"errors"
"regexp"
"strings"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/server"
)
// nolint: revive

View File

@ -1,5 +1,5 @@
// Package handler provides http handlers
package handler
package handler // import "go.unistack.org/micro/v3/api/handler"
import (
"net/http"

View File

@ -1,9 +1,9 @@
package handler
import (
"github.com/unistack-org/micro/v3/api/router"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger"
"go.unistack.org/micro/v3/api/router"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
)
// DefaultMaxRecvSize specifies max recv size for handler

View File

@ -1,12 +1,12 @@
// Package grpc resolves a grpc service like /greeter.Say/Hello to greeter service
package grpc
package grpc // import "go.unistack.org/micro/v3/api/resolver/grpc"
import (
"errors"
"net/http"
"strings"
"github.com/unistack-org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/api/resolver"
)
// Resolver struct

View File

@ -1,10 +1,10 @@
// Package host resolves using http host
package host
package host // import "go.unistack.org/micro/v3/api/resolver/host"
import (
"net/http"
"github.com/unistack-org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/api/resolver"
)
type hostResolver struct {

View File

@ -3,7 +3,7 @@ package resolver
import (
"context"
"github.com/unistack-org/micro/v3/register"
"go.unistack.org/micro/v3/register"
)
// Options struct

View File

@ -1,11 +1,11 @@
// Package path resolves using http path
package path
package path // import "go.unistack.org/micro/v3/api/resolver/path"
import (
"net/http"
"strings"
"github.com/unistack-org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/api/resolver"
)
// Resolver the path resolver

View File

@ -1,5 +1,5 @@
// Package resolver resolves a http request to an endpoint
package resolver
package resolver // import "go.unistack.org/micro/v3/api/resolver"
import (
"errors"

View File

@ -1,14 +1,14 @@
// Package subdomain is a resolver which uses the subdomain to determine the domain to route to. It
// offloads the endpoint resolution to a child resolver which is provided in New.
package subdomain
package subdomain // import "go.unistack.org/micro/v3/api/resolver/subdomain"
import (
"net"
"net/http"
"strings"
"github.com/unistack-org/micro/v3/api/resolver"
"github.com/unistack-org/micro/v3/logger"
"go.unistack.org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/logger"
"golang.org/x/net/publicsuffix"
)

View File

@ -5,7 +5,7 @@ import (
"net/url"
"testing"
"github.com/unistack-org/micro/v3/api/resolver/vpath"
"go.unistack.org/micro/v3/api/resolver/vpath"
)
func TestResolve(t *testing.T) {

View File

@ -1,5 +1,5 @@
// Package vpath resolves using http path and recognised versioned urls
package vpath
package vpath // import "go.unistack.org/micro/v3/api/resolver/vpath"
import (
"errors"
@ -7,7 +7,7 @@ import (
"regexp"
"strings"
"github.com/unistack-org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/api/resolver"
)
// NewResolver creates new vpath api resolver

View File

@ -3,10 +3,10 @@ package router
import (
"context"
"github.com/unistack-org/micro/v3/api/resolver"
"github.com/unistack-org/micro/v3/api/resolver/vpath"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/register"
"go.unistack.org/micro/v3/api/resolver"
"go.unistack.org/micro/v3/api/resolver/vpath"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/register"
)
// Options holds the options for api router

View File

@ -1,10 +1,10 @@
// Package router provides api service routing
package router
package router // import "go.unistack.org/micro/v3/api/router"
import (
"net/http"
"github.com/unistack-org/micro/v3/api"
"go.unistack.org/micro/v3/api"
)
// DefaultRouter contains default router implementation

View File

@ -1,12 +1,12 @@
// Package auth provides authentication and authorization capability
package auth
package auth // import "go.unistack.org/micro/v3/auth"
import (
"context"
"errors"
"time"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
const (

View File

@ -1,7 +1,7 @@
package auth
import (
"github.com/unistack-org/micro/v3/util/id"
"go.unistack.org/micro/v3/util/id"
)
type noopAuth struct {

View File

@ -4,11 +4,11 @@ import (
"context"
"time"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/tracer"
)
// NewOptions creates Options struct from slice of options

View File

@ -1,11 +1,11 @@
// Package broker is an interface used for asynchronous messaging
package broker
package broker // import "go.unistack.org/micro/v3/broker"
import (
"context"
"errors"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
// DefaultBroker default memory broker

View File

@ -4,12 +4,12 @@ import (
"context"
"sync"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata"
maddr "github.com/unistack-org/micro/v3/util/addr"
"github.com/unistack-org/micro/v3/util/id"
mnet "github.com/unistack-org/micro/v3/util/net"
"github.com/unistack-org/micro/v3/util/rand"
"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"
)
type memoryBroker struct {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
func TestMemoryBatchBroker(t *testing.T) {

View File

@ -5,11 +5,11 @@ import (
"crypto/tls"
"time"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/tracer"
"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"
)
// Options struct

View File

@ -1,5 +1,5 @@
// Package build is for building source into a package
package build
package build // import "go.unistack.org/micro/v3/build"
// Build is an interface for building packages
type Build interface {

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/unistack-org/micro/v3/util/backoff"
"go.unistack.org/micro/v3/util/backoff"
)
// BackoffFunc is the backoff call func

View File

@ -1,12 +1,12 @@
// Package client is an interface for an RPC client
package client
package client // import "go.unistack.org/micro/v3/client"
import (
"context"
"time"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
)
var (

View File

@ -4,8 +4,8 @@ import (
"context"
"sort"
"github.com/unistack-org/micro/v3/errors"
"github.com/unistack-org/micro/v3/router"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/router"
)
// LookupFunc is used to lookup routes for a service

View File

@ -3,10 +3,10 @@ package client
import (
"context"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/errors"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/metadata"
)
// DefaultCodecs will be used to encode/decode data

View File

@ -5,16 +5,16 @@ import (
"crypto/tls"
"time"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/router"
"github.com/unistack-org/micro/v3/selector"
"github.com/unistack-org/micro/v3/selector/random"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"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"
)
// Options holds client options

View File

@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/unistack-org/micro/v3/errors"
"go.unistack.org/micro/v3/errors"
)
// RetryFunc that returning either false or a non-nil error will result in the call not being retried

View File

@ -1,7 +1,7 @@
package client
import (
"github.com/unistack-org/micro/v3/codec"
"go.unistack.org/micro/v3/codec"
)
type testRequest struct {

View File

@ -1,11 +1,11 @@
// Package codec is an interface for encoding messages
package codec
package codec // import "go.unistack.org/micro/v3/codec"
import (
"errors"
"io"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
// Message types

View File

@ -3,9 +3,9 @@ package codec
import (
"context"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
)
// Option func

View File

@ -1,5 +1,5 @@
// Package config is an interface for dynamic configuration.
package config
package config // import "go.unistack.org/micro/v3/config"
import (
"context"

View File

@ -8,7 +8,7 @@ import (
"strings"
"github.com/imdario/mergo"
rutil "github.com/unistack-org/micro/v3/util/reflect"
rutil "go.unistack.org/micro/v3/util/reflect"
)
type defaultConfig struct {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/unistack-org/micro/v3/config"
"go.unistack.org/micro/v3/config"
)
type Cfg struct {

View File

@ -4,10 +4,10 @@ import (
"context"
"time"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
)
// Options hold the config options

View File

@ -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
package errors // import "go.unistack.org/micro/v3/errors"
import (
"encoding/json"

View File

@ -3,7 +3,7 @@ package micro
import (
"context"
"github.com/unistack-org/micro/v3/client"
"go.unistack.org/micro/v3/client"
)
// Event is used to publish messages to a topic

View File

@ -7,12 +7,12 @@ import (
"sync"
"github.com/silas/dag"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/util/id"
"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"
)
type microFlow struct {

View File

@ -1,5 +1,5 @@
// Package flow is an interface used for saga pattern microservice workflow
package flow
package flow // import "go.unistack.org/micro/v3/flow"
import (
"context"
@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
var (

View File

@ -4,11 +4,11 @@ import (
"context"
"time"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer"
"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"
)
// Option func

View File

@ -6,7 +6,7 @@ import (
"context"
"time"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/server"
)
// Function is a one time executing Service

View File

@ -8,7 +8,7 @@ import (
"sync"
"testing"
"github.com/unistack-org/micro/v3/register"
"go.unistack.org/micro/v3/register"
)
func TestFunction(t *testing.T) {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/unistack-org/micro/v3
module go.unistack.org/micro/v3
go 1.16

View File

@ -1,5 +1,5 @@
// Package logger provides a log interface
package logger
package logger // import "go.unistack.org/micro/v3/logger"
import (
"context"

View File

@ -1,10 +1,10 @@
package logger
package logger // import "go.unistack.org/micro/v3/logger/wrapper"
import (
"context"
"reflect"
rutil "github.com/unistack-org/micro/v3/util/reflect"
rutil "go.unistack.org/micro/v3/util/reflect"
)
// LogFunc function used for Log method

View File

@ -5,9 +5,9 @@ import (
"context"
"fmt"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/server"
)
var (

View File

@ -1,5 +1,5 @@
// Package metadata is a way of defining message headers
package metadata
package metadata // import "go.unistack.org/micro/v3/metadata"
import (
"net/textproto"

View File

@ -1,12 +1,12 @@
package handler
package handler // import "go.unistack.org/micro/v3/meter/handler"
import (
"bytes"
"context"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/errors"
"github.com/unistack-org/micro/v3/meter"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/meter"
)
// guard to fail early

View File

@ -7,8 +7,8 @@ package handler
import (
context "context"
api "github.com/unistack-org/micro/v3/api"
codec "github.com/unistack-org/micro/v3/codec"
api "go.unistack.org/micro/v3/api"
codec "go.unistack.org/micro/v3/codec"
)
var (

View File

@ -7,9 +7,9 @@ package handler
import (
context "context"
api "github.com/unistack-org/micro/v3/api"
codec "github.com/unistack-org/micro/v3/codec"
server "github.com/unistack-org/micro/v3/server"
api "go.unistack.org/micro/v3/api"
codec "go.unistack.org/micro/v3/codec"
server "go.unistack.org/micro/v3/server"
)
type meterServer struct {

View File

@ -1,5 +1,5 @@
// Package meter is for instrumentation
package meter
package meter // import "go.unistack.org/micro/v3/meter"
import (
"io"

View File

@ -3,7 +3,7 @@ package meter
import (
"context"
"github.com/unistack-org/micro/v3/logger"
"go.unistack.org/micro/v3/logger"
)
// Option powers the configuration for metrics implementations:

View File

@ -1,13 +1,13 @@
package wrapper
package wrapper // import "go.unistack.org/micro/v3/meter/wrapper"
import (
"context"
"fmt"
"time"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/server"
)
var (

1
micro.go Normal file
View File

@ -0,0 +1 @@
package micro // import "go.unistack.org/micro/v3"

View File

@ -1,35 +0,0 @@
// +build ignore
// Package model is an interface for data modelling
package model
// Model provides an interface for data modelling
type Model interface {
// Initialise options
Init(...Option) error
// NewEntity creates a new entity to store or access
NewEntity(name string, value interface{}) Entity
// Create a value
Create(Entity) error
// Read values
Read(...ReadOption) ([]Entity, error)
// Update the value
Update(Entity) error
// Delete an entity
Delete(...DeleteOption) error
// Implementation of the model
String() string
}
type Entity interface {
// Unique id of the entity
Id() string
// Name of the entity
Name() string
// The value associated with the entity
Value() interface{}
// Attributes of the entity
Attributes() map[string]interface{}
// Read a value as a concrete type
Read(v interface{}) error
}

View File

@ -1,41 +0,0 @@
// +build ignore
// Package model is an interface for data modelling
package model
import (
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/sync"
)
type Options struct {
// Database to write to
Database string
// for serialising
Codec codec.Codec
// for locking
Sync sync.Sync
// for storage
Store store.Store
// for logger
Logger logger.Logger
}
type Option func(o *Options)
// Logger sets the logger
func Logger(l logger.Logger) Option {
return func(o *Options) {
o.Logger = l
}
}
type ReadOptions struct{}
type ReadOption func(o *ReadOptions)
type DeleteOptions struct{}
type DeleteOption func(o *DeleteOptions)

View File

@ -1,9 +1,9 @@
// Package network is for creating internetworks
package network
package network // import "go.unistack.org/micro/v3/network"
import (
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/server"
)
// Error is network node errors

View File

@ -1,13 +1,13 @@
package network
import (
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/network/tunnel"
"github.com/unistack-org/micro/v3/proxy"
"github.com/unistack-org/micro/v3/router"
"github.com/unistack-org/micro/v3/tracer"
"github.com/unistack-org/micro/v3/util/id"
"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"
)
// Option func

View File

@ -8,9 +8,9 @@ import (
"sync"
"time"
maddr "github.com/unistack-org/micro/v3/util/addr"
mnet "github.com/unistack-org/micro/v3/util/net"
"github.com/unistack-org/micro/v3/util/rand"
maddr "go.unistack.org/micro/v3/util/addr"
mnet "go.unistack.org/micro/v3/util/net"
"go.unistack.org/micro/v3/util/rand"
)
type memorySocket struct {

View File

@ -5,10 +5,10 @@ import (
"crypto/tls"
"time"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
)
// Options struct holds the transport options

View File

@ -1,11 +1,11 @@
// Package transport is an interface for synchronous connection based communication
package transport
package transport // import "go.unistack.org/micro/v3/network/transport"
import (
"context"
"time"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
var (

View File

@ -1,15 +1,15 @@
// Package broker is a tunnel broker
package broker
package broker // import "go.unistack.org/micro/v3/network/tunnel/broker"
import (
"context"
"fmt"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/network/tunnel"
"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"
)
type tunBroker struct {

View File

@ -3,11 +3,11 @@ package tunnel
import (
"time"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/tracer"
"github.com/unistack-org/micro/v3/util/id"
"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"
)
var (

View File

@ -1,8 +1,8 @@
package transport
import (
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/network/tunnel"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/tunnel"
)
type tunListener struct {

View File

@ -1,12 +1,12 @@
// Package transport provides a tunnel transport
package transport
package transport // import "go.unistack.org/micro/v3/network/tunnel/transport"
import (
"context"
"fmt"
"github.com/unistack-org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/network/tunnel"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/tunnel"
)
type tunTransport struct {

View File

@ -1,12 +1,12 @@
// Package tunnel provides gre network tunnelling
package tunnel
package tunnel // import "go.unistack.org/micro/v3/network/transport/tunnel"
import (
"context"
"errors"
"time"
"github.com/unistack-org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/transport"
)
// DefaultTunnel contains default tunnel implementation

View File

@ -5,18 +5,18 @@ import (
"fmt"
"time"
"github.com/unistack-org/micro/v3/auth"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/config"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/router"
"github.com/unistack-org/micro/v3/server"
"github.com/unistack-org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/auth"
"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"
)
// Options for micro service

View File

@ -1,5 +1,5 @@
// Package http enables the http profiler
package http
package http // import "go.unistack.org/micro/v3/profiler/http"
import (
"context"
@ -7,7 +7,7 @@ import (
"net/http/pprof"
"sync"
profile "github.com/unistack-org/micro/v3/profiler"
profile "go.unistack.org/micro/v3/profiler"
)
type httpProfile struct {

View File

@ -1,5 +1,5 @@
// Package pprof provides a pprof profiler which writes output to /tmp/[name].{cpu,mem}.pprof
package pprof
package pprof // import "go.unistack.org/micro/v3/profiler/pprof"
import (
"os"
@ -9,7 +9,7 @@ import (
"sync"
"time"
profile "github.com/unistack-org/micro/v3/profiler"
profile "go.unistack.org/micro/v3/profiler"
)
type profiler struct {

View File

@ -1,5 +1,5 @@
// Package profiler is for profilers
package profiler
package profiler // import "go.unistack.org/micro/v3/profiler"
// Profiler interface
type Profiler interface {

View File

@ -2,11 +2,11 @@
package proxy
import (
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/router"
"github.com/unistack-org/micro/v3/tracer"
"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"
)
// Options for proxy

View File

@ -1,10 +1,10 @@
// Package proxy is a transparent proxy built on the micro/server
package proxy
package proxy // import "go.unistack.org/micro/v3/proxy"
import (
"context"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/server"
)
// DefaultEndpoint holds default proxy address

View File

@ -6,7 +6,7 @@ import (
"unicode"
"unicode/utf8"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
// ExtractValue from reflect.Type from specified depth

View File

@ -6,8 +6,8 @@ import (
"sync"
"time"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/util/id"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/util/id"
)
var (

View File

@ -5,9 +5,9 @@ import (
"crypto/tls"
"time"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter"
"github.com/unistack-org/micro/v3/tracer"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
)
// Options holds options for register

View File

@ -1,11 +1,11 @@
// Package register is an interface for service discovery
package register
package register // import "go.unistack.org/micro/v3/register"
import (
"context"
"errors"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
const (

View File

@ -1,5 +1,5 @@
// Package dns resolves names to dns records
package dns
package dns // import "go.unistack.org/micro/v3/resolver/dns"
import (
"context"
@ -7,7 +7,7 @@ import (
"sync"
"time"
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/resolver"
)
// Resolver is a DNS network resolve

View File

@ -1,11 +1,11 @@
// Package dnssrv resolves names to dns srv records
package dnssrv
package dnssrv // import "go.unistack.org/micro/v3/resolver/dnssrv"
import (
"fmt"
"net"
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/resolver"
)
// Resolver is a DNS network resolve

View File

@ -1,5 +1,5 @@
// Package http resolves names to network addresses using a http request
package http
package http // import "go.unistack.org/micro/v3/resolver/http"
import (
"encoding/json"
@ -8,7 +8,7 @@ import (
"net/http"
"net/url"
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/resolver"
)
// nolint: golint,revive

View File

@ -1,8 +1,8 @@
// Package noop is a noop resolver
package noop
package noop // import "go.unistack.org/micro/v3/resolver/noop"
import (
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/resolver"
)
// Resolver contains noop resolver

View File

@ -1,11 +1,11 @@
// Package register resolves names using the micro register
package register
package register // import "go.unistack.org/micro/v3/resolver/registry"
import (
"context"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/resolver"
)
// Resolver is a register network resolver

View File

@ -1,5 +1,5 @@
// Package resolver resolves network names to addresses
package resolver
package resolver // import "go.unistack.org/micro/v3/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().

View File

@ -1,8 +1,8 @@
// Package static is a static resolver
package static
package static // import "go.unistack.org/micro/v3/resolver/static"
import (
"github.com/unistack-org/micro/v3/resolver"
"go.unistack.org/micro/v3/resolver"
)
// Resolver returns a static list of nodes. In the event the node list

View File

@ -3,9 +3,9 @@ package router
import (
"context"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/register"
"github.com/unistack-org/micro/v3/util/id"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/util/id"
)
// Options are router options

View File

@ -3,7 +3,7 @@ package router
import (
"hash/fnv"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
var (

View File

@ -1,5 +1,5 @@
// Package router provides a network routing control plane
package router
package router // import "go.unistack.org/micro/v3/router"
import (
"errors"

View File

@ -4,8 +4,8 @@ import (
"context"
"io"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
)
// Options configure runtime

View File

@ -1,11 +1,11 @@
// Package runtime is a service runtime manager
package runtime
package runtime // import "go.unistack.org/micro/v3/runtime"
import (
"errors"
"time"
"github.com/unistack-org/micro/v3/metadata"
"go.unistack.org/micro/v3/metadata"
)
// ErrAlreadyExists error

View File

@ -1,8 +1,8 @@
package random
package random // import "go.unistack.org/micro/v3/selector/random"
import (
"github.com/unistack-org/micro/v3/selector"
"github.com/unistack-org/micro/v3/util/rand"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/util/rand"
)
type random struct{}

View File

@ -3,7 +3,7 @@ package random
import (
"testing"
"github.com/unistack-org/micro/v3/selector"
"go.unistack.org/micro/v3/selector"
)
func TestRandom(t *testing.T) {

View File

@ -1,8 +1,8 @@
package roundrobin
package roundrobin // import "go.unistack.org/micro/v3/selector/roundrobin"
import (
"github.com/unistack-org/micro/v3/selector"
"github.com/unistack-org/micro/v3/util/rand"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/util/rand"
)
// NewSelector returns an initialised round robin selector

View File

@ -3,7 +3,7 @@ package roundrobin
import (
"testing"
"github.com/unistack-org/micro/v3/selector"
"go.unistack.org/micro/v3/selector"
)
func TestRoundRobin(t *testing.T) {

View File

@ -1,5 +1,5 @@
// Package selector is for node selection and load balancing
package selector
package selector // import "go.unistack.org/micro/v3/selector"
import (
"errors"

View File

@ -1,6 +1,6 @@
package server
import "github.com/unistack-org/micro/v3/errors"
import "go.unistack.org/micro/v3/errors"
type Error struct {
id string

View File

@ -3,7 +3,7 @@ package server
import (
"testing"
"github.com/unistack-org/micro/v3/errors"
"go.unistack.org/micro/v3/errors"
)
func TestError(t *testing.T) {

View File

@ -3,7 +3,7 @@ package server
import (
"reflect"
"github.com/unistack-org/micro/v3/register"
"go.unistack.org/micro/v3/register"
)
type rpcHandler struct {

View File

@ -1,10 +1,10 @@
package health
package health // import "go.unistack.org/micro/v3/server/health"
import (
"context"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/errors"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
)
var _ HealthServer = &Handler{}

View File

@ -7,8 +7,8 @@ package health
import (
context "context"
api "github.com/unistack-org/micro/v3/api"
codec "github.com/unistack-org/micro/v3/codec"
api "go.unistack.org/micro/v3/api"
codec "go.unistack.org/micro/v3/codec"
)
var (

View File

@ -7,9 +7,9 @@ package health
import (
context "context"
api "github.com/unistack-org/micro/v3/api"
codec "github.com/unistack-org/micro/v3/codec"
server "github.com/unistack-org/micro/v3/server"
api "go.unistack.org/micro/v3/api"
codec "go.unistack.org/micro/v3/codec"
server "go.unistack.org/micro/v3/server"
)
type healthServer struct {

View File

@ -6,13 +6,13 @@ import (
"sync"
"time"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger"
"github.com/unistack-org/micro/v3/register"
maddr "github.com/unistack-org/micro/v3/util/addr"
mnet "github.com/unistack-org/micro/v3/util/net"
"github.com/unistack-org/micro/v3/util/rand"
"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"
)
// DefaultCodecs will be used to encode/decode

View File

@ -5,11 +5,11 @@ import (
"fmt"
"testing"
"github.com/unistack-org/micro/v3/broker"
"github.com/unistack-org/micro/v3/client"
"github.com/unistack-org/micro/v3/codec"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/server"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/server"
)
type TestHandler struct {

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