midwayjs / midway-faas

🔱 A simple and lightweight serverless framework
MIT License
389 stars 40 forks source link

refactor: core store get support no name #180

Closed echosoar closed 4 years ago

echosoar commented 4 years ago

command core getStore support only by store key

gitpod-io[bot] commented 4 years ago

Lxxyx commented 4 years ago

和 @legendecas 讨论了一下,getStore 的第二个参数用于控制全局 Store 可能会更合理。

this.getStore(key: string, scope = 'global')

当不传该参数时,默认为读取全局 Store 和设置全局 Store