refact(worker): update worker porxy handler signature to return an error (#1536)

Instead of requiring the each proxy handler to handle the webSocket
connection closure.  On error the worker handler will appropriately
close the connection and event any errors.
This commit is contained in:
Louis Ruch authored and GitHub committed 2021-09-17 11:48:44 -07:00
1 parent c82d37bfba
commit 6a92e08928
5 files changed
+28 -39

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ func (c Config) Validate() error {
// Handler is the type that all proxies need to implement to be called by the worker
// when a new client connection is created.
type Handler func(ctx context.Context, config Config, opt ...Option)
type Handler func(ctx context.Context, config Config, opt ...Option) error
var (
// handlers is the map of registered handlers