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 ( import (
"errors" "errors"
"regexp" "regexp"
"strings" "strings"
"github.com/unistack-org/micro/v3/metadata" "go.unistack.org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/register" "go.unistack.org/micro/v3/register"
"github.com/unistack-org/micro/v3/server" "go.unistack.org/micro/v3/server"
) )
// nolint: revive // nolint: revive

View File

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

View File

@ -1,9 +1,9 @@
package handler package handler
import ( import (
"github.com/unistack-org/micro/v3/api/router" "go.unistack.org/micro/v3/api/router"
"github.com/unistack-org/micro/v3/client" "go.unistack.org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
) )
// DefaultMaxRecvSize specifies max recv size for handler // 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 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 ( import (
"errors" "errors"
"net/http" "net/http"
"strings" "strings"
"github.com/unistack-org/micro/v3/api/resolver" "go.unistack.org/micro/v3/api/resolver"
) )
// Resolver struct // Resolver struct

View File

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

View File

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

View File

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

View File

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

View File

@ -1,14 +1,14 @@
// Package subdomain is a resolver which uses the subdomain to determine the domain to route to. It // 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. // 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 ( import (
"net" "net"
"net/http" "net/http"
"strings" "strings"
"github.com/unistack-org/micro/v3/api/resolver" "go.unistack.org/micro/v3/api/resolver"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"golang.org/x/net/publicsuffix" "golang.org/x/net/publicsuffix"
) )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@ import (
"context" "context"
"time" "time"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/metadata" "go.unistack.org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/store" "go.unistack.org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
) )
// NewOptions creates Options struct from slice of options // 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 is an interface used for asynchronous messaging
package broker package broker // import "go.unistack.org/micro/v3/broker"
import ( import (
"context" "context"
"errors" "errors"
"github.com/unistack-org/micro/v3/metadata" "go.unistack.org/micro/v3/metadata"
) )
// DefaultBroker default memory broker // DefaultBroker default memory broker

View File

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

View File

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

View File

@ -5,11 +5,11 @@ import (
"crypto/tls" "crypto/tls"
"time" "time"
"github.com/unistack-org/micro/v3/codec" "go.unistack.org/micro/v3/codec"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/register" "go.unistack.org/micro/v3/register"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
) )
// Options struct // Options struct

View File

@ -1,5 +1,5 @@
// Package build is for building source into a package // 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 // Build is an interface for building packages
type Build interface { type Build interface {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ package client
import ( import (
"context" "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 // 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 package client
import ( import (
"github.com/unistack-org/micro/v3/codec" "go.unistack.org/micro/v3/codec"
) )
type testRequest struct { type testRequest struct {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
// Package errors provides a way to return detailed information // Package errors provides a way to return detailed information
// for an RPC request error. The error is normally JSON encoded. // for an RPC request error. The error is normally JSON encoded.
package errors package errors // import "go.unistack.org/micro/v3/errors"
import ( import (
"encoding/json" "encoding/json"

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@ import (
"context" "context"
"time" "time"
"github.com/unistack-org/micro/v3/client" "go.unistack.org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/store" "go.unistack.org/micro/v3/store"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
) )
// Option func // Option func

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@ package meter
import ( import (
"context" "context"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
) )
// Option powers the configuration for metrics implementations: // 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 ( import (
"context" "context"
"fmt" "fmt"
"time" "time"
"github.com/unistack-org/micro/v3/client" "go.unistack.org/micro/v3/client"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/server" "go.unistack.org/micro/v3/server"
) )
var ( 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 is for creating internetworks
package network package network // import "go.unistack.org/micro/v3/network"
import ( import (
"github.com/unistack-org/micro/v3/client" "go.unistack.org/micro/v3/client"
"github.com/unistack-org/micro/v3/server" "go.unistack.org/micro/v3/server"
) )
// Error is network node errors // Error is network node errors

View File

@ -1,13 +1,13 @@
package network package network
import ( import (
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/network/tunnel" "go.unistack.org/micro/v3/network/tunnel"
"github.com/unistack-org/micro/v3/proxy" "go.unistack.org/micro/v3/proxy"
"github.com/unistack-org/micro/v3/router" "go.unistack.org/micro/v3/router"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
"github.com/unistack-org/micro/v3/util/id" "go.unistack.org/micro/v3/util/id"
) )
// Option func // Option func

View File

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

View File

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

View File

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

View File

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

View File

@ -3,11 +3,11 @@ package tunnel
import ( import (
"time" "time"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/network/transport" "go.unistack.org/micro/v3/network/transport"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
"github.com/unistack-org/micro/v3/util/id" "go.unistack.org/micro/v3/util/id"
) )
var ( var (

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
// Package http enables the http profiler // Package http enables the http profiler
package http package http // import "go.unistack.org/micro/v3/profiler/http"
import ( import (
"context" "context"
@ -7,7 +7,7 @@ import (
"net/http/pprof" "net/http/pprof"
"sync" "sync"
profile "github.com/unistack-org/micro/v3/profiler" profile "go.unistack.org/micro/v3/profiler"
) )
type httpProfile struct { 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 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 ( import (
"os" "os"
@ -9,7 +9,7 @@ import (
"sync" "sync"
"time" "time"
profile "github.com/unistack-org/micro/v3/profiler" profile "go.unistack.org/micro/v3/profiler"
) )
type profiler struct { type profiler struct {

View File

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

View File

@ -2,11 +2,11 @@
package proxy package proxy
import ( import (
"github.com/unistack-org/micro/v3/client" "go.unistack.org/micro/v3/client"
"github.com/unistack-org/micro/v3/logger" "go.unistack.org/micro/v3/logger"
"github.com/unistack-org/micro/v3/meter" "go.unistack.org/micro/v3/meter"
"github.com/unistack-org/micro/v3/router" "go.unistack.org/micro/v3/router"
"github.com/unistack-org/micro/v3/tracer" "go.unistack.org/micro/v3/tracer"
) )
// Options for proxy // Options for proxy

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,11 @@
// Package dnssrv resolves names to dns srv records // Package dnssrv resolves names to dns srv records
package dnssrv package dnssrv // import "go.unistack.org/micro/v3/resolver/dnssrv"
import ( import (
"fmt" "fmt"
"net" "net"
"github.com/unistack-org/micro/v3/resolver" "go.unistack.org/micro/v3/resolver"
) )
// Resolver is a DNS network resolve // 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 resolves names to network addresses using a http request
package http package http // import "go.unistack.org/micro/v3/resolver/http"
import ( import (
"encoding/json" "encoding/json"
@ -8,7 +8,7 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"github.com/unistack-org/micro/v3/resolver" "go.unistack.org/micro/v3/resolver"
) )
// nolint: golint,revive // nolint: golint,revive

View File

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

View File

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

View File

@ -1,5 +1,5 @@
// Package resolver resolves network names to addresses // 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 // Resolver is network resolver. It's used to find network nodes
// via the name to connect to. This is done based on Network.Name(). // 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 is a static resolver
package static package static // import "go.unistack.org/micro/v3/resolver/static"
import ( 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 // Resolver returns a static list of nodes. In the event the node list

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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