Integrate BACKBEAT SDK and resolve KACHING license validation
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>
This commit is contained in:
29
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/conn.go
generated
vendored
Normal file
29
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/conn.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
package metricshelper
|
||||
|
||||
import ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
var transports = [...]int{ma.P_CIRCUIT, ma.P_WEBRTC, ma.P_WEBRTC_DIRECT, ma.P_WEBTRANSPORT, ma.P_QUIC, ma.P_QUIC_V1, ma.P_WSS, ma.P_WS, ma.P_TCP}
|
||||
|
||||
func GetTransport(a ma.Multiaddr) string {
|
||||
for _, t := range transports {
|
||||
if _, err := a.ValueForProtocol(t); err == nil {
|
||||
return ma.ProtocolWithCode(t).Name
|
||||
}
|
||||
}
|
||||
return "other"
|
||||
}
|
||||
|
||||
func GetIPVersion(addr ma.Multiaddr) string {
|
||||
version := "unknown"
|
||||
ma.ForEach(addr, func(c ma.Component) bool {
|
||||
if c.Protocol().Code == ma.P_IP4 {
|
||||
version = "ip4"
|
||||
return false
|
||||
} else if c.Protocol().Code == ma.P_IP6 {
|
||||
version = "ip6"
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
return version
|
||||
}
|
||||
14
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/dir.go
generated
vendored
Normal file
14
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/dir.go
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package metricshelper
|
||||
|
||||
import "github.com/libp2p/go-libp2p/core/network"
|
||||
|
||||
func GetDirection(dir network.Direction) string {
|
||||
switch dir {
|
||||
case network.DirOutbound:
|
||||
return "outbound"
|
||||
case network.DirInbound:
|
||||
return "inbound"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
26
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/pool.go
generated
vendored
Normal file
26
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/pool.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package metricshelper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const capacity = 8
|
||||
|
||||
var stringPool = sync.Pool{New: func() any {
|
||||
s := make([]string, 0, capacity)
|
||||
return &s
|
||||
}}
|
||||
|
||||
func GetStringSlice() *[]string {
|
||||
s := stringPool.Get().(*[]string)
|
||||
*s = (*s)[:0]
|
||||
return s
|
||||
}
|
||||
|
||||
func PutStringSlice(s *[]string) {
|
||||
if c := cap(*s); c < capacity {
|
||||
panic(fmt.Sprintf("expected a string slice with capacity 8 or greater, got %d", c))
|
||||
}
|
||||
stringPool.Put(s)
|
||||
}
|
||||
20
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/registerer.go
generated
vendored
Normal file
20
vendor/github.com/libp2p/go-libp2p/p2p/metricshelper/registerer.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package metricshelper
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// RegisterCollectors registers the collectors with reg ignoring
|
||||
// reregistration error and panics on any other error
|
||||
func RegisterCollectors(reg prometheus.Registerer, collectors ...prometheus.Collector) {
|
||||
for _, c := range collectors {
|
||||
err := reg.Register(c)
|
||||
if err != nil {
|
||||
if ok := errors.As(err, &prometheus.AlreadyRegisteredError{}); !ok {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user