grid
grid copied to clipboard
Optionally pass in Context to Server New
It might be helpful to be able to pass in a context to grid server so an an outside agent can cancel it? And or the context used in Server is a child of parent context?
https://github.com/lytics/grid/blob/master/server.go#L47
That seems ok to me. So the change would be to use the provided when creating this [context]:(https://github.com/lytics/grid/blob/master/server.go#L109) instead of a context.Background
.
I'd suggest passing in the "providedcontext via the
Cfg` struct to make it optional? The Cfg is available on the server struct when this packages ctx is created and has helpers to ensure defaults values.