Skip to content

Commit 639081c

Browse files
committed
update telephony
Signed-off-by: shishir gowda <shishir@livekit.io>
1 parent 672acf9 commit 639081c

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

observability/telephonyobs/gen_reporter.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77
)
88

9-
const Version_AIHSTV8 = true
9+
const Version_LQKK2M0 = true
1010

1111
type KeyResolver interface {
1212
Resolve(string)
@@ -46,9 +46,20 @@ type CountryReporter interface {
4646
RegisterFunc(func(ts time.Time, tx CountryTx) bool)
4747
Tx(func(tx CountryTx))
4848
TxAt(time.Time, func(tx CountryTx))
49+
WithPhone(number string) PhoneReporter
50+
WithDeferredPhone() (PhoneReporter, KeyResolver)
51+
CountryTx
52+
}
53+
54+
type PhoneTx interface{}
55+
56+
type PhoneReporter interface {
57+
RegisterFunc(func(ts time.Time, tx PhoneTx) bool)
58+
Tx(func(tx PhoneTx))
59+
TxAt(time.Time, func(tx PhoneTx))
4960
WithCall(id string) CallReporter
5061
WithDeferredCall() (CallReporter, KeyResolver)
51-
CountryTx
62+
PhoneTx
5263
}
5364

5465
type CallTx interface {

observability/telephonyobs/gen_reporter_noop.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var (
1111
_ ProjectReporter = (*noopProjectReporter)(nil)
1212
_ CarrierReporter = (*noopCarrierReporter)(nil)
1313
_ CountryReporter = (*noopCountryReporter)(nil)
14+
_ PhoneReporter = (*noopPhoneReporter)(nil)
1415
_ CallReporter = (*noopCallReporter)(nil)
1516
)
1617

@@ -74,10 +75,26 @@ func NewNoopCountryReporter() CountryReporter {
7475
func (r *noopCountryReporter) RegisterFunc(f func(ts time.Time, tx CountryTx) bool) {}
7576
func (r *noopCountryReporter) Tx(f func(CountryTx)) {}
7677
func (r *noopCountryReporter) TxAt(ts time.Time, f func(CountryTx)) {}
77-
func (r *noopCountryReporter) WithCall(id string) CallReporter {
78+
func (r *noopCountryReporter) WithPhone(number string) PhoneReporter {
79+
return &noopPhoneReporter{}
80+
}
81+
func (r *noopCountryReporter) WithDeferredPhone() (PhoneReporter, KeyResolver) {
82+
return &noopPhoneReporter{}, noopKeyResolver{}
83+
}
84+
85+
type noopPhoneReporter struct{}
86+
87+
func NewNoopPhoneReporter() PhoneReporter {
88+
return &noopPhoneReporter{}
89+
}
90+
91+
func (r *noopPhoneReporter) RegisterFunc(f func(ts time.Time, tx PhoneTx) bool) {}
92+
func (r *noopPhoneReporter) Tx(f func(PhoneTx)) {}
93+
func (r *noopPhoneReporter) TxAt(ts time.Time, f func(PhoneTx)) {}
94+
func (r *noopPhoneReporter) WithCall(id string) CallReporter {
7895
return &noopCallReporter{}
7996
}
80-
func (r *noopCountryReporter) WithDeferredCall() (CallReporter, KeyResolver) {
97+
func (r *noopPhoneReporter) WithDeferredCall() (CallReporter, KeyResolver) {
8198
return &noopCallReporter{}, noopKeyResolver{}
8299
}
83100

observability/telephonyobs/gen_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ type Rollup string
3939

4040
const (
4141
RollupUndefined Rollup = ""
42-
RollupCountry Rollup = "country"
42+
RollupPhone Rollup = "phone"
4343
RollupCall Rollup = "call"
4444
)

0 commit comments

Comments
 (0)