Add StateChanged(func(map[string]interface{}), more ...string) to client and server, to watch state updates with more customized detail, e.g. "completed:result" as default, e.g. pending:next\|task\|message\|result

This commit is contained in:
mindon
2022-10-19 11:11:05 +08:00
parent c08f142b56
commit dbe886c071
4 changed files with 138 additions and 8 deletions

View File

@@ -752,4 +752,7 @@ type Broker interface {
PublishCancelation(id string) error
WriteResult(qname, id string, data []byte) (n int, err error)
// StateChanged watch state updates, with more customized detail
StateChanged(handler func(map[string]interface{}), more ...string) error
}