Files
timmy-config/go/pkg/mod/github.com/fiatjaf/eventstore@v0.16.2/negentropy.go
2026-03-31 20:02:01 +00:00

14 lines
305 B
Go

package eventstore
import "context"
var negentropySessionKey = struct{}{}
func IsNegentropySession(ctx context.Context) bool {
return ctx.Value(negentropySessionKey) != nil
}
func SetNegentropy(ctx context.Context) context.Context {
return context.WithValue(ctx, negentropySessionKey, struct{}{})
}