Update input_binding.go (#12)

This commit is contained in:
Yaron Schneider 2019-09-27 14:49:25 -07:00 committed by GitHub
parent 4d99dd07cd
commit 8dacdab522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
package bindings package bindings
// InputBinding is the interface to define a binding that triggers on incoming events
type InputBinding interface { type InputBinding interface {
Init(metadata Metadata) error // Init passes connection and properties metadata to the binding implementation
Read(handler func(*ReadResponse) error) error Init(metadata Metadata) error
// Read is a blocking method that triggers the callback function whenever an event arrives
Read(handler func(*ReadResponse) error) error
} }