 9bdcbe0447
			
		
	
	9bdcbe0447
	
	
	
		
			
			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>
		
			
				
	
	
		
			47 lines
		
	
	
		
			788 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			788 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| /*
 | |
| 	The `shared` package defines helper types and functions used
 | |
| 	internally by all the other refmt packages; it is not user-facing.
 | |
| */
 | |
| package shared
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| 
 | |
| 	. "github.com/polydawn/refmt/tok"
 | |
| )
 | |
| 
 | |
| type TokenSource interface {
 | |
| 	Step(fillme *Token) (done bool, err error)
 | |
| }
 | |
| 
 | |
| type TokenSink interface {
 | |
| 	Step(consume *Token) (done bool, err error)
 | |
| }
 | |
| 
 | |
| type TokenPump struct {
 | |
| 	TokenSource
 | |
| 	TokenSink
 | |
| }
 | |
| 
 | |
| func (p TokenPump) Run() error {
 | |
| 	var tok Token
 | |
| 	var srcDone, sinkDone bool
 | |
| 	var err error
 | |
| 	for {
 | |
| 		srcDone, err = p.TokenSource.Step(&tok)
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		sinkDone, err = p.TokenSink.Step(&tok)
 | |
| 		if err != nil {
 | |
| 			return err
 | |
| 		}
 | |
| 		if srcDone {
 | |
| 			if sinkDone {
 | |
| 				return nil
 | |
| 			}
 | |
| 			return fmt.Errorf("src at end of item but sink expects more")
 | |
| 		}
 | |
| 	}
 | |
| }
 |