func New(cfg Config) goresilience.Runner {
	return NewMiddleware(cfg)(nil)
}
New will wrap a execution unit that will cut the execution of
a runner when some time passes using the context.
use 0 timeout for default timeout.
package timeout
import (
	"context"
	"time"
	"github.com/slok/goresilience"
	"github.com/slok/goresilience/errors"
	"github.com/slok/goresilience/metrics"
)
const (
	defaultTimeout = 1 * time.Second
)
type Config struct {
	Timeout time.Duration
	Cancel bool
}
func (c *Config) defaults() {
	if c.Timeout <= 0 {
		c.Timeout = defaultTimeout
	}
}
type result struct {
	fallback bool
	err      error
}