feat: Waku v2 bridge

Issue #12610
This commit is contained in:
Michal Iskierko
2023-11-12 13:29:38 +01:00
parent 56e7bd01ca
commit 6d31343205
6716 changed files with 1982502 additions and 5891 deletions

30
vendor/github.com/pion/interceptor/registry.go generated vendored Normal file
View File

@@ -0,0 +1,30 @@
package interceptor
// Registry is a collector for interceptors.
type Registry struct {
factories []Factory
}
// Add adds a new Interceptor to the registry.
func (r *Registry) Add(f Factory) {
r.factories = append(r.factories, f)
}
// Build constructs a single Interceptor from a InterceptorRegistry
func (r *Registry) Build(id string) (Interceptor, error) {
if len(r.factories) == 0 {
return &NoOp{}, nil
}
interceptors := []Interceptor{}
for _, f := range r.factories {
i, err := f.NewInterceptor(id)
if err != nil {
return nil, err
}
interceptors = append(interceptors, i)
}
return NewChain(interceptors), nil
}