Fix typo in diode.NewWriter argument name (#254)
This commit is contained in:
parent
9e51190d47
commit
72acd6cfe8
|
@ -48,7 +48,7 @@ type Writer struct {
|
||||||
// used.
|
// used.
|
||||||
//
|
//
|
||||||
// See code.cloudfoundry.org/go-diodes for more info on diode.
|
// See code.cloudfoundry.org/go-diodes for more info on diode.
|
||||||
func NewWriter(w io.Writer, size int, poolInterval time.Duration, f Alerter) Writer {
|
func NewWriter(w io.Writer, size int, pollInterval time.Duration, f Alerter) Writer {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
dw := Writer{
|
dw := Writer{
|
||||||
w: w,
|
w: w,
|
||||||
|
@ -59,9 +59,9 @@ func NewWriter(w io.Writer, size int, poolInterval time.Duration, f Alerter) Wri
|
||||||
f = func(int) {}
|
f = func(int) {}
|
||||||
}
|
}
|
||||||
d := diodes.NewManyToOne(size, diodes.AlertFunc(f))
|
d := diodes.NewManyToOne(size, diodes.AlertFunc(f))
|
||||||
if poolInterval > 0 {
|
if pollInterval > 0 {
|
||||||
dw.d = diodes.NewPoller(d,
|
dw.d = diodes.NewPoller(d,
|
||||||
diodes.WithPollingInterval(poolInterval),
|
diodes.WithPollingInterval(pollInterval),
|
||||||
diodes.WithPollingContext(ctx))
|
diodes.WithPollingContext(ctx))
|
||||||
} else {
|
} else {
|
||||||
dw.d = diodes.NewWaiter(d,
|
dw.d = diodes.NewWaiter(d,
|
||||||
|
|
Loading…
Reference in New Issue