Create and configure builders that build instances of UnleashContext.
Create and configure builders that build instances of UnleashContext.
(add-property name value)
Expects a property name-value pair. Returns a function that expects an UnleashContext$Builder, and adds the key-value pair to the context's properties.
Expects a property name-value pair. Returns a function that expects an UnleashContext$Builder, and adds the key-value pair to the context's properties.
(app-name app-name)
Expects an application's name. Returns a function that expects an UnleashContext$Builder, and sets the appName property of the builder.
Expects an application's name. Returns a function that expects an UnleashContext$Builder, and sets the appName property of the builder.
(build & builder-param-setters)
Expects to be applied with a variadic number of arguments, each of which is a function that expects an UnleashContext$Builder instance. Returns an instance of UnleashContext that had all of its parameters set by said functions.
Using this building pattern allows users to manipulate the builder instance in ways that aren't implemented in this library by passing a function that expects an UnleashContext$Builder.
Example: (build (app-name "test-app") (environment "STG"))
The UnleashContext instance can be attached to an Unleash client via unleash-client-clojure.builder/unleash-context-provider.
Expects to be applied with a variadic number of arguments, each of which is a function that expects an UnleashContext$Builder instance. Returns an instance of UnleashContext that had all of its parameters set by said functions. Using this building pattern allows users to manipulate the builder instance in ways that aren't implemented in this library by passing a function that expects an UnleashContext$Builder. Example: (build (app-name "test-app") (environment "STG")) The UnleashContext instance can be attached to an Unleash client via unleash-client-clojure.builder/unleash-context-provider.
(environment environment)
Expects an application environment. Returns a function that expects an UnleashContext$Builder, and sets the environment property of the builder.
Expects an application environment. Returns a function that expects an UnleashContext$Builder, and sets the environment property of the builder.
(get-app-name ctx)
Returns the app's name from the context.
Returns the app's name from the context.
(get-by-name ctx contextName)
Returns a context property, explicitly looking for:
Returns a context property, explicitly looking for: - environment - appName - userId - sessionId - remoteAddress Otherwise, behaves as 'get-property'.
(get-environment ctx)
Returns the environment from the context.
Returns the environment from the context.
(get-property ctx property-name)
Returns a context property
Returns a context property
(get-remote-address ctx)
Returns the remote address from the context.
Returns the remote address from the context.
(get-session-id ctx)
Returns the session ID from the context.
Returns the session ID from the context.
(get-user-id ctx)
Returns the user ID from the context.
Returns the user ID from the context.
(remote-address address)
Expects a remote address (IP address). Used by RemoteAddressStrategy. Returns a function that expects an UnleashContext$Builder, and sets the remoteAddress property of the builder.
Expects a remote address (IP address). Used by RemoteAddressStrategy. Returns a function that expects an UnleashContext$Builder, and sets the remoteAddress property of the builder.
(session-id id)
Expects a session ID. Returns a function that expects an UnleashContext$Builder, and sets the sessionId property of the builder.
Expects a session ID. Returns a function that expects an UnleashContext$Builder, and sets the sessionId property of the builder.
(user-id id)
Expects a user ID. Returns a function that expects an UnleashContext$Builder, and sets the userId property of the builder.
Expects a user ID. Returns a function that expects an UnleashContext$Builder, and sets the userId property of the builder.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close