ContextKeys

Standard keys for FlippingExecutionContext parameters.

These constants provide consistent, type-safe key names for commonly used context parameters. Using these keys instead of raw strings helps prevent typos and enables IDE auto-completion.

Example usage:

val context = FlippingExecutionContext(
ContextKeys.USER_ID to "user-123",
ContextKeys.REGION to "EU"
)

val userId = context.get<String>(ContextKeys.USER_ID)

See also

Properties

Link copied to clipboard

Key for the client hostname making the request. Used by ClientFilterStrategy for client-based feature filtering.

Link copied to clipboard
const val ENVIRONMENT: String

Key for the application environment (e.g., "production", "staging", "development"). Useful for environment-specific feature toggles.

Link copied to clipboard
const val REGION: String

Key for the geographic region (e.g., "EU", "US", "APAC"). Useful for region-based feature rollouts.

Link copied to clipboard

Key for the server hostname handling the request. Used by ServerFilterStrategy for server-based feature filtering, useful for canary deployments or instance-specific features.

Link copied to clipboard
const val USER_ID: String

Key for the user's unique identifier. Used by strategies like UserPonderationStrategy for consistent user bucketing.

Link copied to clipboard
const val USER_NAME: String

Key for the user's display name.