store/service: use client passed in Init options (#1843)
This commit is contained in:
parent
0c19a87c89
commit
68927e875b
@ -43,6 +43,11 @@ func (s *serviceStore) Init(opts ...store.Option) error {
|
|||||||
s.Table = s.options.Table
|
s.Table = s.options.Table
|
||||||
s.Nodes = s.options.Nodes
|
s.Nodes = s.options.Nodes
|
||||||
|
|
||||||
|
if s.options.Client == nil {
|
||||||
|
s.options.Client = client.DefaultClient
|
||||||
|
}
|
||||||
|
s.Client = pb.NewStoreService("go.micro.store", s.options.Client)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user