2014-06-21 21:22:38 +00:00
|
|
|
package pubsub
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Opts struct {
|
|
|
|
// Timeout sets the expiration date for the channel,
|
|
|
|
// at which time it will be closed and transmission will
|
|
|
|
// stop. A zero value for means the channel will not timeout.
|
|
|
|
Timeout time.Duration
|
|
|
|
|
|
|
|
// Record indicates the channel should record the channel
|
|
|
|
// activity and playback the full history to subscribers.
|
|
|
|
Record bool
|
|
|
|
}
|
|
|
|
|
|
|
|
var DefaultOpts = &Opts{
|
|
|
|
Timeout: 0,
|
|
|
|
Record: false,
|
|
|
|
}
|
2014-06-22 09:04:07 +00:00
|
|
|
|
|
|
|
var ConsoleOpts = &Opts{
|
2014-07-12 02:10:18 +00:00
|
|
|
Timeout: time.Minute * 120,
|
2014-06-22 09:04:07 +00:00
|
|
|
Record: true,
|
|
|
|
}
|