micro/defaults.go

26 lines
679 B
Go
Raw Normal View History

2019-12-30 21:33:21 +03:00
package micro
import (
"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 21:33:21 +03:00
// set defaults
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"
fileStore "github.com/micro/go-micro/v2/store/file"
2019-12-30 21:33:21 +03:00
)
func init() {
// default client
client.DefaultClient = gcli.NewClient()
// default server
server.DefaultServer = gsrv.NewServer()
// default store
store.DefaultStore = fileStore.NewStore()
2020-01-30 01:40:43 +03:00
// set default trace
trace.DefaultTracer = memTrace.NewTracer()
2019-12-30 21:33:21 +03:00
}