func (b *backendInstance) addTimeout(
	ctx context.Context) (context.Context, context.CancelFunc) {
	if ctx == nil {
		ctx = context.Background()
	}
	return context.WithTimeout(ctx,
		time.Duration(b.cfg.Timeout)*time.Millisecond)
}
func (b *backendInstance) addTimeout(
	ctx context.Context) (context.Context, context.CancelFunc) {
	if ctx == nil {
		ctx = context.Background()
	}
	return context.WithTimeout(ctx,
		time.Duration(b.cfg.Timeout)*time.Millisecond)
}
func ( b * backendInstance ) addTimeout ( ctx context . Context ) ( context . Context , context . CancelFunc ) { if ctx == nil { ctx = context . Background ( ) } return context . WithTimeout ( ctx , time . Duration ( b . cfg . Timeout ) * time . Millisecond ) }
// addTimeout adds timeout to context.
addTimeout adds timeout to context .