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) *Deadline
New returns a new Deadline with the provided timeout.
func (d *Deadline) Go(fn func(<-chan struct{}) error) error
Go executes the provided function with a done channel as parameter to signal the timeout.
Generated by godoc2md