2019-12-30 18:33:21 +00:00
|
|
|
package micro
|
|
|
|
|
|
|
|
import (
|
2020-01-30 14:39:00 +03:00
|
|
|
"github.com/micro/go-micro/v2/client"
|
|
|
|
"github.com/micro/go-micro/v2/debug/trace"
|
|
|
|
"github.com/micro/go-micro/v2/server"
|
|
|
|
"github.com/micro/go-micro/v2/store"
|
2019-12-30 18:33:21 +00:00
|
|
|
|
|
|
|
// set defaults
|
2020-01-30 14:39:00 +03:00
|
|
|
gcli "github.com/micro/go-micro/v2/client/grpc"
|
|
|
|
memTrace "github.com/micro/go-micro/v2/debug/trace/memory"
|
|
|
|
gsrv "github.com/micro/go-micro/v2/server/grpc"
|
2020-04-07 16:43:43 +02:00
|
|
|
memoryStore "github.com/micro/go-micro/v2/store/memory"
|
2019-12-30 18:33:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
// default client
|
|
|
|
client.DefaultClient = gcli.NewClient()
|
|
|
|
// default server
|
|
|
|
server.DefaultServer = gsrv.NewServer()
|
2020-01-10 19:13:55 +00:00
|
|
|
// default store
|
2020-04-07 16:43:43 +02:00
|
|
|
store.DefaultStore = memoryStore.NewStore()
|
2020-01-29 22:40:43 +00:00
|
|
|
// set default trace
|
|
|
|
trace.DefaultTracer = memTrace.NewTracer()
|
2019-12-30 18:33:21 +00:00
|
|
|
}
|