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:
31
vendor/github.com/multiformats/go-multiaddr-fmt/.travis.yml
generated
vendored
Normal file
31
vendor/github.com/multiformats/go-multiaddr-fmt/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
os:
|
||||
- linux
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.12.x
|
||||
|
||||
env:
|
||||
global:
|
||||
- GOTFLAGS="-race"
|
||||
- IPFS_REUSEPORT=false
|
||||
matrix:
|
||||
- BUILD_DEPTYPE=gomod
|
||||
|
||||
|
||||
# disable travis install
|
||||
install:
|
||||
- true
|
||||
|
||||
script:
|
||||
- bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
|
||||
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $GOPATH/pkg/mod
|
||||
- /home/travis/.cache/go-build
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
21
vendor/github.com/multiformats/go-multiaddr-fmt/LICENSE
generated
vendored
Normal file
21
vendor/github.com/multiformats/go-multiaddr-fmt/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Jeromy Johnson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
34
vendor/github.com/multiformats/go-multiaddr-fmt/README.md
generated
vendored
Normal file
34
vendor/github.com/multiformats/go-multiaddr-fmt/README.md
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# multiaddr format
|
||||
A validation checker for multiaddrs. Some basic validators for common address
|
||||
types are provided, but creating your own combinations is easy.
|
||||
|
||||
Usage:
|
||||
```go
|
||||
a, _ := ma.NewMultiaddr("/ip4/5.2.67.3/tcp/1708")
|
||||
TCP.Matches(a) // returns true
|
||||
```
|
||||
|
||||
Making your own validators is easy, for example, the `Reliable` multiaddr is
|
||||
defined as follows:
|
||||
|
||||
```go
|
||||
// Define IP as either ipv4 or ipv6
|
||||
var IP = Or(Base(ma.P_IP4), Base(ma.P_IP6))
|
||||
|
||||
// Define TCP as 'tcp' on top of either ipv4 or ipv6
|
||||
var TCP = And(IP, Base(ma.P_TCP))
|
||||
|
||||
// Define UDP as 'udp' on top of either ipv4 or ipv6
|
||||
var UDP = And(IP, Base(ma.P_UDP))
|
||||
|
||||
// Define UTP as 'utp' on top of udp (on top of ipv4 or ipv6)
|
||||
var UTP = And(UDP, Base(ma.P_UTP))
|
||||
|
||||
// Now define a Reliable transport as either tcp or utp
|
||||
var Reliable = Or(TCP, UTP)
|
||||
|
||||
// From here, we can easily define multiaddrs for protocols that can run on top
|
||||
// of any 'reliable' transport (such as ipfs)
|
||||
```
|
||||
|
||||
NOTE: the above patterns are already implemented in package
|
||||
177
vendor/github.com/multiformats/go-multiaddr-fmt/patterns.go
generated
vendored
Normal file
177
vendor/github.com/multiformats/go-multiaddr-fmt/patterns.go
generated
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
package mafmt
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
)
|
||||
|
||||
// Define a dns4 format multiaddr
|
||||
var DNS4 = Base(ma.P_DNS4)
|
||||
|
||||
// Define a dns6 format multiaddr
|
||||
var DNS6 = Base(ma.P_DNS6)
|
||||
|
||||
// Define a dnsaddr, dns, dns4 or dns6 format multiaddr
|
||||
var DNS = Or(
|
||||
Base(ma.P_DNS),
|
||||
Base(ma.P_DNSADDR),
|
||||
DNS4,
|
||||
DNS6,
|
||||
)
|
||||
|
||||
// Define IP as either ipv4 or ipv6
|
||||
var IP = Or(Base(ma.P_IP4), Base(ma.P_IP6))
|
||||
|
||||
// Define TCP as 'tcp' on top of either ipv4 or ipv6, or dns equivalents.
|
||||
var TCP = Or(
|
||||
And(DNS, Base(ma.P_TCP)),
|
||||
And(IP, Base(ma.P_TCP)),
|
||||
)
|
||||
|
||||
// Define UDP as 'udp' on top of either ipv4 or ipv6, or dns equivalents.
|
||||
var UDP = Or(
|
||||
And(DNS, Base(ma.P_UDP)),
|
||||
And(IP, Base(ma.P_UDP)),
|
||||
)
|
||||
|
||||
// Define UTP as 'utp' on top of udp (on top of ipv4 or ipv6).
|
||||
var UTP = And(UDP, Base(ma.P_UTP))
|
||||
|
||||
// Define QUIC as 'quic' on top of udp (on top of ipv4 or ipv6)
|
||||
var QUIC = And(UDP, Base(ma.P_QUIC))
|
||||
|
||||
// Define unreliable transport as udp
|
||||
var Unreliable = Or(UDP)
|
||||
|
||||
// Now define a Reliable transport as either tcp or utp or quic
|
||||
var Reliable = Or(TCP, UTP, QUIC)
|
||||
|
||||
// P2P can run over any reliable underlying transport protocol
|
||||
var P2P = And(Reliable, Base(ma.P_P2P))
|
||||
|
||||
// IPFS can run over any reliable underlying transport protocol
|
||||
//
|
||||
// Deprecated: use P2P
|
||||
var IPFS = P2P
|
||||
|
||||
// Define http over TCP or DNS or http over DNS format multiaddr
|
||||
var HTTP = Or(
|
||||
And(TCP, Base(ma.P_HTTP)),
|
||||
And(IP, Base(ma.P_HTTP)),
|
||||
And(DNS, Base(ma.P_HTTP)),
|
||||
)
|
||||
|
||||
// Define https over TCP or DNS or https over DNS format multiaddr
|
||||
var HTTPS = Or(
|
||||
And(TCP, Base(ma.P_HTTPS)),
|
||||
And(IP, Base(ma.P_HTTPS)),
|
||||
And(DNS, Base(ma.P_HTTPS)),
|
||||
)
|
||||
|
||||
// Define p2p-webrtc-direct over HTTP or p2p-webrtc-direct over HTTPS format multiaddr
|
||||
var WebRTCDirect = Or(
|
||||
And(HTTP, Base(ma.P_P2P_WEBRTC_DIRECT)),
|
||||
And(HTTPS, Base(ma.P_P2P_WEBRTC_DIRECT)))
|
||||
|
||||
const (
|
||||
or = iota
|
||||
and = iota
|
||||
)
|
||||
|
||||
func And(ps ...Pattern) Pattern {
|
||||
return &pattern{
|
||||
Op: and,
|
||||
Args: ps,
|
||||
}
|
||||
}
|
||||
|
||||
func Or(ps ...Pattern) Pattern {
|
||||
return &pattern{
|
||||
Op: or,
|
||||
Args: ps,
|
||||
}
|
||||
}
|
||||
|
||||
type Pattern interface {
|
||||
Matches(ma.Multiaddr) bool
|
||||
partialMatch([]ma.Protocol) (bool, []ma.Protocol)
|
||||
String() string
|
||||
}
|
||||
|
||||
type pattern struct {
|
||||
Args []Pattern
|
||||
Op int
|
||||
}
|
||||
|
||||
func (ptrn *pattern) Matches(a ma.Multiaddr) bool {
|
||||
ok, rem := ptrn.partialMatch(a.Protocols())
|
||||
return ok && len(rem) == 0
|
||||
}
|
||||
|
||||
func (ptrn *pattern) partialMatch(pcs []ma.Protocol) (bool, []ma.Protocol) {
|
||||
switch ptrn.Op {
|
||||
case or:
|
||||
for _, a := range ptrn.Args {
|
||||
ok, rem := a.partialMatch(pcs)
|
||||
if ok {
|
||||
return true, rem
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
case and:
|
||||
if len(pcs) < len(ptrn.Args) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(ptrn.Args); i++ {
|
||||
ok, rem := ptrn.Args[i].partialMatch(pcs)
|
||||
if !ok {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
pcs = rem
|
||||
}
|
||||
|
||||
return true, pcs
|
||||
default:
|
||||
panic("unrecognized pattern operand")
|
||||
}
|
||||
}
|
||||
|
||||
func (ptrn *pattern) String() string {
|
||||
var sub []string
|
||||
for _, a := range ptrn.Args {
|
||||
sub = append(sub, a.String())
|
||||
}
|
||||
|
||||
switch ptrn.Op {
|
||||
case and:
|
||||
return strings.Join(sub, "/")
|
||||
case or:
|
||||
return "{" + strings.Join(sub, "|") + "}"
|
||||
default:
|
||||
panic("unrecognized pattern op!")
|
||||
}
|
||||
}
|
||||
|
||||
type Base int
|
||||
|
||||
func (p Base) Matches(a ma.Multiaddr) bool {
|
||||
pcs := a.Protocols()
|
||||
return pcs[0].Code == int(p) && len(pcs) == 1
|
||||
}
|
||||
|
||||
func (p Base) partialMatch(pcs []ma.Protocol) (bool, []ma.Protocol) {
|
||||
if len(pcs) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
if pcs[0].Code == int(p) {
|
||||
return true, pcs[1:]
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (p Base) String() string {
|
||||
return ma.ProtocolWithCode(int(p)).Name
|
||||
}
|
||||
Reference in New Issue
Block a user