Major integrations and fixes: - Added BACKBEAT SDK integration for P2P operation timing - Implemented beat-aware status tracking for distributed operations - Added Docker secrets support for secure license management - Resolved KACHING license validation via HTTPS/TLS - Updated docker-compose configuration for clean stack deployment - Disabled rollback policies to prevent deployment failures - Added license credential storage (CHORUS-DEV-MULTI-001) Technical improvements: - BACKBEAT P2P operation tracking with phase management - Enhanced configuration system with file-based secrets - Improved error handling for license validation - Clean separation of KACHING and CHORUS deployment stacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
748 B
Go
43 lines
748 B
Go
package webtransport
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/quic-go/quic-go"
|
|
)
|
|
|
|
type closeFunc func()
|
|
|
|
// The streamsMap manages the streams of a single QUIC connection.
|
|
// Note that several WebTransport sessions can share one QUIC connection.
|
|
type streamsMap struct {
|
|
mx sync.Mutex
|
|
m map[quic.StreamID]closeFunc
|
|
}
|
|
|
|
func newStreamsMap() *streamsMap {
|
|
return &streamsMap{m: make(map[quic.StreamID]closeFunc)}
|
|
}
|
|
|
|
func (s *streamsMap) AddStream(id quic.StreamID, close closeFunc) {
|
|
s.mx.Lock()
|
|
s.m[id] = close
|
|
s.mx.Unlock()
|
|
}
|
|
|
|
func (s *streamsMap) RemoveStream(id quic.StreamID) {
|
|
s.mx.Lock()
|
|
delete(s.m, id)
|
|
s.mx.Unlock()
|
|
}
|
|
|
|
func (s *streamsMap) CloseSession() {
|
|
s.mx.Lock()
|
|
defer s.mx.Unlock()
|
|
|
|
for _, cl := range s.m {
|
|
cl()
|
|
}
|
|
s.m = nil
|
|
}
|