Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultReadTimeout = 30 * time.Second
)
Variables ¶
View Source
var ( ErrConsumerAlreadyRegistered = errors.New("consumer with the given name is already registered") ErrNoMatchingConsumerRegistered = errors.New("no consumer with given key is registered") DefaultRecordingOptions = RecordingOptions{ ReadTimeout: DefaultReadTimeout, Promiscuous: false, } )
View Source
var ErrTransportStillRunning = errors.New("transport to consumers did not stop in time")
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder interface { io.Closer AvailableDevices() (devices []Device, err error) Subscriptions() (subscriptions []Subscription) StartRecording(ctx context.Context, device string, consumer Consumer) (result *StartRecordingResult, err error) StartRecordingWithOptions( ctx context.Context, device string, consumer Consumer, opts RecordingOptions, ) (result *StartRecordingResult, err error) StopRecording(consumerKey string) (err error) }
func NewRecorder ¶
func NewRecorder() Recorder
type RecordingOptions ¶
type StartRecordingResult ¶ added in v0.5.1
type StartRecordingResult struct {
ConsumerKey string
}
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.