Pass client to more of the runtime

This commit is contained in:
Ben Toogood
2020-05-11 17:57:39 +01:00
parent f892b41299
commit efb64b7dbb
10 changed files with 56 additions and 20 deletions

View File

@@ -219,12 +219,16 @@ func NewStore(opts ...store.Option) store.Store {
o(&options)
}
if options.Client == nil {
options.Client = client.DefaultClient
}
service := &serviceStore{
options: options,
Database: options.Database,
Table: options.Table,
Nodes: options.Nodes,
Client: pb.NewStoreService("go.micro.store", client.DefaultClient),
Client: pb.NewStoreService("go.micro.store", options.Client),
}
return service