Skip to content

Commit 9d7c0ca

Browse files
committed
Rename and deprecated rfc8888 package
1 parent b94d244 commit 9d7c0ca

File tree

9 files changed

+54
-10
lines changed

9 files changed

+54
-10
lines changed

pkg/rfc8888/interceptor.go renamed to pkg/ccfb/interceptor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
// Package rfc8888 provides an interceptor that generates congestion control
4+
// Package ccfb provides an interceptor that generates congestion control
55
// feedback reports as defined by RFC 8888.
6-
package rfc8888
6+
package ccfb
77

88
import (
99
"sync"
@@ -26,7 +26,7 @@ type SenderInterceptorFactory struct {
2626
func (s *SenderInterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error) {
2727
senderInterceptor := &SenderInterceptor{
2828
NoOp: interceptor.NoOp{},
29-
log: logging.NewDefaultLoggerFactory().NewLogger("rfc8888_interceptor"),
29+
log: logging.NewDefaultLoggerFactory().NewLogger("ccfb_interceptor"),
3030
lock: sync.Mutex{},
3131
wg: sync.WaitGroup{},
3232
recorder: NewRecorder(),

pkg/rfc8888/interceptor_test.go renamed to pkg/ccfb/interceptor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import (
77
"testing"

pkg/rfc8888/option.go renamed to pkg/ccfb/option.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import "time"
77

pkg/rfc8888/recorder.go renamed to pkg/ccfb/recorder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import (
77
"time"

pkg/rfc8888/recorder_test.go renamed to pkg/ccfb/recorder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import (
77
"testing"

pkg/rfc8888/stream_log.go renamed to pkg/ccfb/stream_log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import (
77
"time"

pkg/rfc8888/stream_log_test.go renamed to pkg/ccfb/stream_log_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import (
77
"testing"

pkg/rfc8888/ticker.go renamed to pkg/ccfb/ticker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
22
// SPDX-License-Identifier: MIT
33

4-
package rfc8888
4+
package ccfb
55

66
import "time"
77

pkg/rfc8888/rfc8888.go

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// SPDX-FileCopyrightText: 2025 The Pion community <https://pion.ly>
2+
// SPDX-License-Identifier: MIT
3+
4+
// Package rfc8888 is deprecated. Use ccfb instead.
5+
package rfc8888
6+
7+
import (
8+
"time"
9+
10+
"github.com/pion/interceptor/pkg/ccfb"
11+
)
12+
13+
type TickerFactory = ccfb.TickerFactory
14+
15+
type SenderInterceptorFactory = ccfb.SenderInterceptorFactory
16+
17+
func NewSenderInterceptor(opts ...Option) (*SenderInterceptorFactory, error) {
18+
oo := []ccfb.Option{}
19+
oo = append(oo, opts...)
20+
21+
return ccfb.NewSenderInterceptor(oo...)
22+
}
23+
24+
type SenderInterceptor = ccfb.SenderInterceptor
25+
26+
type Option = ccfb.Option
27+
28+
func SenderTicker(f TickerFactory) Option {
29+
return ccfb.SenderTicker(f)
30+
}
31+
32+
func SenderNow(f func() time.Time) Option {
33+
return ccfb.SenderNow(f)
34+
}
35+
36+
func SendInterval(interval time.Duration) Option {
37+
return ccfb.SendInterval(interval)
38+
}
39+
40+
type Recorder = ccfb.Recorder
41+
42+
func NewRecorder() *Recorder {
43+
return ccfb.NewRecorder()
44+
}

0 commit comments

Comments
 (0)