Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.14 KB

Readme.md

File metadata and controls

33 lines (23 loc) · 1.14 KB

Bindings

Bindings provide a common way to trigger an application with events from external systems, or invoke an external system with optional data payloads. Bindings are great for event-driven, on-demand compute and help reduce boilerplate code.

To get started with bindings visit the How To Guide.

To view all the currently supported bindings visit: Dapr bindings.

For detailed binding specs visit Dapr binding specs.

Implementing a new binding

A compliant binding needs to implement one or more interfaces, depending on the type of binding (Input or Output):

Input binding:

type InputBinding interface {
	Init(metadata Metadata) error
	Read(handler func(*ReadResponse) error) error
}

Output binding:

type OutputBinding interface {
	Init(metadata Metadata) error
	Write(req *WriteRequest) error
}

A spec is also needed in Dapr docs.