This commit is contained in:
Asim Aslam 2020-01-24 21:31:57 +00:00
parent 49cc022ca2
commit 2b1844971c
3 changed files with 9 additions and 4 deletions

View File

@ -10,7 +10,6 @@ import (
"github.com/google/uuid"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/util/pool"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/codec"
raw "github.com/micro/go-micro/codec/bytes"
@ -19,6 +18,7 @@ import (
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/util/buf"
"github.com/micro/go-micro/util/pool"
)
type rpcClient struct {

View File

@ -246,12 +246,12 @@ var (
}
DefaultRuntimes = map[string]func(...runtime.Option) runtime.Runtime{
"local": runtime.NewRuntime,
"local": runtime.NewRuntime,
}
DefaultStores = map[string]func(...store.Option) store.Store{
"memory": memStore.NewStore,
"service": svcStore.NewStore,
"memory": memStore.NewStore,
"service": svcStore.NewStore,
}
// used for default selection as the fall back

View File

@ -36,6 +36,11 @@ type Span struct {
type spanKey struct{}
var (
// Default tracer
DefaultTrace = NewTrace()
)
// FromContext returns a span from context
func FromContext(ctx context.Context) (*Span, bool) {
s, ok := ctx.Value(spanKey{}).(*Span)