iothub icon indicating copy to clipboard operation
iothub copied to clipboard

Support for Asynchronous handling of Direct Methods

Open z-br opened this issue 5 years ago • 0 comments

Because of how The Direct Method handler is implemented, there is no opportunity for asynchrony without blocking concurrent or future direct method requests. Ideally, instead of :

type DirectMethodHandler func(p map[string]interface{}) (map[string]interface{}, error)

It was something like:

type DirectMethodHandler func(input map[string]interface{},completion func(map[string]interface{}, error))

Or something channel based.

z-br avatar Jun 01 '20 19:06 z-br