chore: tunnel recorder & slight refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-27 17:49:59 -04:00
parent 20c1388cf4
commit 0722e5f032
17 changed files with 725 additions and 285 deletions

18
store/context.go Normal file
View File

@@ -0,0 +1,18 @@
package store
import (
"context"
)
type contextKey struct{}
var recordIDKey = contextKey{}
func withRecord(ctx context.Context, rec *TunnelRecord) context.Context {
return context.WithValue(ctx, recordIDKey, rec)
}
func getRecord(ctx context.Context) (*TunnelRecord, bool) {
id, ok := ctx.Value(recordIDKey).(*TunnelRecord)
return id, ok
}