Source File
generator_option.go
Belonging Package
github.com/pion/interceptor/pkg/nack
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage nackimport ()// GeneratorOption can be used to configure GeneratorInterceptor.type GeneratorOption func(r *GeneratorInterceptor) error// GeneratorSize sets the size of the interceptor.// Size must be one of: 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768.func ( uint16) GeneratorOption {return func( *GeneratorInterceptor) error {.size =return nil}}// GeneratorSkipLastN sets the number of packets (n-1 packets before the last received packets)//// to ignore when generating nack requests.func ( uint16) GeneratorOption {return func( *GeneratorInterceptor) error {.skipLastN =return nil}}// GeneratorMaxNacksPerPacket sets the maximum number of NACKs sent per missing packet, e.g. if set to 2, a missing// packet will only be NACKed at most twice. If set to 0 (default), max number of NACKs is unlimited.func ( uint16) GeneratorOption {return func( *GeneratorInterceptor) error {.maxNacksPerPacket =return nil}}// GeneratorLog sets a logger for the interceptor.func ( logging.LeveledLogger) GeneratorOption {return func( *GeneratorInterceptor) error {.log =return nil}}// GeneratorInterval sets the nack send interval for the interceptor.func ( time.Duration) GeneratorOption {return func( *GeneratorInterceptor) error {.interval =return nil}}// GeneratorStreamsFilter sets filter for generator streams.func ( func( *interceptor.StreamInfo) bool) GeneratorOption {return func( *GeneratorInterceptor) error {.streamsFilter =return nil}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |