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:
53
vendor/github.com/ipfs/go-datastore/batch.go
generated
vendored
Normal file
53
vendor/github.com/ipfs/go-datastore/batch.go
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
package datastore
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type op struct {
|
||||
delete bool
|
||||
value []byte
|
||||
}
|
||||
|
||||
// basicBatch implements the transaction interface for datastores who do
|
||||
// not have any sort of underlying transactional support
|
||||
type basicBatch struct {
|
||||
ops map[Key]op
|
||||
|
||||
target Datastore
|
||||
}
|
||||
|
||||
var _ Batch = (*basicBatch)(nil)
|
||||
|
||||
func NewBasicBatch(ds Datastore) Batch {
|
||||
return &basicBatch{
|
||||
ops: make(map[Key]op),
|
||||
target: ds,
|
||||
}
|
||||
}
|
||||
|
||||
func (bt *basicBatch) Put(ctx context.Context, key Key, val []byte) error {
|
||||
bt.ops[key] = op{value: val}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bt *basicBatch) Delete(ctx context.Context, key Key) error {
|
||||
bt.ops[key] = op{delete: true}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bt *basicBatch) Commit(ctx context.Context) error {
|
||||
var err error
|
||||
for k, op := range bt.ops {
|
||||
if op.delete {
|
||||
err = bt.target.Delete(ctx, k)
|
||||
} else {
|
||||
err = bt.target.Put(ctx, k, op.value)
|
||||
}
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user