Example #1
0
// NewBuilder returns a new Builder instance backed by b. It also wraps it with
// cancellation and closes the logs when the build finishes.
func NewBuilder(b builder.Builder) *Builder {
	return &Builder{
		builder: builder.CloseWriter(b),
		Timeout: DefaultTimeout,
	}
}
Example #2
0
// New returns a new Conveyor instance.
func New(b builder.Builder) *Conveyor {
	return &Conveyor{
		Builder: builder.WithCancel(builder.CloseWriter(b)),
		Timeout: DefaultTimeout,
	}
}