1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00
This commit is contained in:
Asim Aslam 2020-05-01 00:25:17 +01:00
parent c76a5e608d
commit e8105d22ad

View File

@ -47,6 +47,13 @@ func (s *serviceStore) Init(opts ...store.Option) error {
func (s *serviceStore) Context() context.Context {
ctx := context.Background()
md := make(metadata.Metadata)
if len(s.Database) > 0 {
md["Micro-Database"] = s.Database
}
if len(s.Table) > 0 {
md["Micro-Table"] = s.Table
}
return metadata.NewContext(ctx, md)
}