import "github.com/andy2046/gopie/pkg/deadline"
Package deadline implements Deadline pattern.
var ErrTimeout = errors.New("time out executing function")ErrTimeout is the error for deadline timeout.
type Deadline struct {
// contains filtered or unexported fields
}Deadline represents the deadline.
func New(timeout time.Duration) *DeadlineNew returns a new Deadline with the provided timeout.
func (d *Deadline) Go(fn func(<-chan struct{}) error) errorGo executes the provided function with a done channel as parameter to signal the timeout.
Generated by godoc2md