-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently the api does not allow passing context instead of timeouts. My suggestion is to refactor long running methods to their *WithContext
alternative and change the existing methods to call those with background context. While this is a large request, I think it is really needed with many applications.
Example:
func (a *Adapter) Connect(address Address, params ConnectionParams) (d Device, e error) {
d, e = a.ConnectWithContext(context.Background(), address, params)
return
}
func (a *Adapter) ConnectWithContext(ctx context.Context, address Address, params ConnectionParams) (Device, error) {
// actual implementation
}
cheinema, r0bj and acouvreur
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request