add comments for wrappers
This commit is contained in:
		| @@ -4,10 +4,18 @@ import ( | |||||||
| 	"golang.org/x/net/context" | 	"golang.org/x/net/context" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | // HandlerFunc represents a single method of a handler. It's used primarily | ||||||
|  | // for the wrappers. What's handed to the actual method is the concrete | ||||||
|  | // request and response types. | ||||||
| type HandlerFunc func(ctx context.Context, req Request, rsp interface{}) error | type HandlerFunc func(ctx context.Context, req Request, rsp interface{}) error | ||||||
|  |  | ||||||
|  | // SubscriberFunc represents a single method of a subscriber. It's used primarily | ||||||
|  | // for the wrappers. What's handed to the actual method is the concrete | ||||||
|  | // publication message. | ||||||
| type SubscriberFunc func(ctx context.Context, msg Publication) error | type SubscriberFunc func(ctx context.Context, msg Publication) error | ||||||
|  |  | ||||||
|  | // HandlerWrapper wraps the HandlerFunc and returns the equivalent | ||||||
| type HandlerWrapper func(HandlerFunc) HandlerFunc | type HandlerWrapper func(HandlerFunc) HandlerFunc | ||||||
|  |  | ||||||
|  | // SubscriberWrapper wraps the SubscriberFunc and returns the equivalent | ||||||
| type SubscriberWrapper func(SubscriberFunc) SubscriberFunc | type SubscriberWrapper func(SubscriberFunc) SubscriberFunc | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user