iothub
iothub copied to clipboard
Support for Asynchronous handling of Direct Methods
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.