well-goknown/vendor/github.com/fiatjaf/eventstore/negentropy.go
2024-11-11 14:56:01 -05:00

13 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{}{})
}