mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
* core/identity: add data store for thread-safe storage of sessions and users * wip * add test * wip * clean up context * fix nil session error * add stop message * remove log * use origin context * use base context for manager calls * use manager context for syncers too * add runtime flag * rename legacy lease * add comment * use NotSame * add comment * Update internal/identity/manager/manager.go Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com> * lint --------- Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
32 lines
997 B
Go
32 lines
997 B
Go
package config
|
|
|
|
import "golang.org/x/exp/maps"
|
|
|
|
var (
|
|
// RuntimeFlagGRPCDatabrokerKeepalive enables gRPC keepalive to the databroker service
|
|
RuntimeFlagGRPCDatabrokerKeepalive = runtimeFlag("grpc_databroker_keepalive", false)
|
|
|
|
// RuntimeFlagMatchAnyIncomingPort enables ignoring the incoming port when matching routes
|
|
RuntimeFlagMatchAnyIncomingPort = runtimeFlag("match_any_incoming_port", true)
|
|
|
|
// RuntimeFlagLegacyIdentityManager enables the legacy identity manager
|
|
RuntimeFlagLegacyIdentityManager = runtimeFlag("legacy_identity_manager", false)
|
|
)
|
|
|
|
// RuntimeFlag is a runtime flag that can flip on/off certain features
|
|
type RuntimeFlag string
|
|
|
|
// RuntimeFlags is a map of runtime flags
|
|
type RuntimeFlags map[RuntimeFlag]bool
|
|
|
|
func runtimeFlag(txt string, def bool) RuntimeFlag {
|
|
key := RuntimeFlag(txt)
|
|
defaultRuntimeFlags[key] = def
|
|
return key
|
|
}
|
|
|
|
var defaultRuntimeFlags = map[RuntimeFlag]bool{}
|
|
|
|
func DefaultRuntimeFlags() RuntimeFlags {
|
|
return maps.Clone(defaultRuntimeFlags)
|
|
}
|