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:
21
vendor/github.com/libp2p/go-libp2p-asn-util/LICENSE
generated
vendored
Normal file
21
vendor/github.com/libp2p/go-libp2p-asn-util/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Protocol Labs, Inc.
|
||||
|
||||
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.
|
||||
48
vendor/github.com/libp2p/go-libp2p-asn-util/README.md
generated
vendored
Normal file
48
vendor/github.com/libp2p/go-libp2p-asn-util/README.md
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# go-libp2p-asn-util
|
||||
===
|
||||
|
||||
[](http://protocol.ai)
|
||||
[](http://github.com/libp2p/libp2p)
|
||||
|
||||
A library to lookup the ASN(Autonomous System Number) for an IP address. It uses the IPv6 to ASN database downloaded from https://iptoasn.com/.
|
||||
Supports ONLY IPv6 addresses for now.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [Documentation](#documentation)
|
||||
- [Contribute](#contribute)
|
||||
- [License](#license)
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
go get github.com/libp2p/go-libp2p-asn-util
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
import (
|
||||
asn "github.com/libp2p/go-libp2p-asn-util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
store, err := asn.NewAsnStore()
|
||||
|
||||
asNumber,err := store.AsnForIP(net.ParseIP("2a03:2880:f003:c07:face:b00c::2"))
|
||||
}
|
||||
```
|
||||
|
||||
## Contribute
|
||||
|
||||
Feel free to join in. All welcome. Open an [issue](https://github.com/libp2p/go-libp2p-asn/issues)!
|
||||
|
||||
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
---
|
||||
95
vendor/github.com/libp2p/go-libp2p-asn-util/asn.go
generated
vendored
Normal file
95
vendor/github.com/libp2p/go-libp2p-asn-util/asn.go
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
package asnutil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"sync"
|
||||
|
||||
"github.com/libp2p/go-cidranger"
|
||||
)
|
||||
|
||||
var Store *lazyAsnStore
|
||||
|
||||
func init() {
|
||||
Store = &lazyAsnStore{}
|
||||
}
|
||||
|
||||
type networkWithAsn struct {
|
||||
nn net.IPNet
|
||||
asn string
|
||||
}
|
||||
|
||||
func (e *networkWithAsn) Network() net.IPNet {
|
||||
return e.nn
|
||||
}
|
||||
|
||||
type asnStore struct {
|
||||
cr cidranger.Ranger
|
||||
}
|
||||
|
||||
// AsnForIPv6 returns the AS number for the given IPv6 address.
|
||||
// If no mapping exists for the given IP, this function will
|
||||
// return an empty ASN and a nil error.
|
||||
func (a *asnStore) AsnForIPv6(ip net.IP) (string, error) {
|
||||
if ip.To16() == nil {
|
||||
return "", errors.New("ONLY IPv6 addresses supported for now")
|
||||
}
|
||||
|
||||
ns, err := a.cr.ContainingNetworks(ip)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to find matching networks for the given ip: %w", err)
|
||||
}
|
||||
|
||||
if len(ns) == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// longest prefix match
|
||||
n := ns[len(ns)-1].(*networkWithAsn)
|
||||
return n.asn, nil
|
||||
}
|
||||
|
||||
func newAsnStore() (*asnStore, error) {
|
||||
cr := cidranger.NewPCTrieRanger()
|
||||
|
||||
for _, v := range ipv6CidrToAsnPairList {
|
||||
_, nn, err := net.ParseCIDR(v.cidr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse CIDR %s: %w", v.cidr, err)
|
||||
}
|
||||
|
||||
if err := cr.Insert(&networkWithAsn{*nn, v.asn}); err != nil {
|
||||
return nil, fmt.Errorf("failed to insert CIDR %s in Trie store: %w", v.cidr, err)
|
||||
}
|
||||
}
|
||||
|
||||
return &asnStore{cr}, nil
|
||||
}
|
||||
|
||||
// lazyAsnStore builds the underlying trie on first call to AsnForIPv6.
|
||||
// Alternatively, Init can be called to manually trigger initialization.
|
||||
type lazyAsnStore struct {
|
||||
store *asnStore
|
||||
once sync.Once
|
||||
}
|
||||
|
||||
// AsnForIPv6 returns the AS number for the given IPv6 address.
|
||||
// If no mapping exists for the given IP, this function will
|
||||
// return an empty ASN and a nil error.
|
||||
func (a *lazyAsnStore) AsnForIPv6(ip net.IP) (string, error) {
|
||||
a.once.Do(a.init)
|
||||
return a.store.AsnForIPv6(ip)
|
||||
}
|
||||
|
||||
func (a *lazyAsnStore) Init() {
|
||||
a.once.Do(a.init)
|
||||
}
|
||||
|
||||
func (a *lazyAsnStore) init() {
|
||||
store, err := newAsnStore()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
a.store = store
|
||||
}
|
||||
5
vendor/github.com/libp2p/go-libp2p-asn-util/doc.go
generated
vendored
Normal file
5
vendor/github.com/libp2p/go-libp2p-asn-util/doc.go
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// Package asnutil provides a mapping lookup for IPv6 ASNs.
|
||||
package asnutil
|
||||
|
||||
//go:generate go run ./generate/
|
||||
//go:generate go fmt ./...
|
||||
79014
vendor/github.com/libp2p/go-libp2p-asn-util/ipv6_asn_map.gen.go
generated
vendored
Normal file
79014
vendor/github.com/libp2p/go-libp2p-asn-util/ipv6_asn_map.gen.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
vendor/github.com/libp2p/go-libp2p-asn-util/version.json
generated
vendored
Normal file
3
vendor/github.com/libp2p/go-libp2p-asn-util/version.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "v0.3.0"
|
||||
}
|
||||
Reference in New Issue
Block a user