Liking cljdoc? Tell your friends :D

unleash-client-clojure.context

Create and configure builders that build instances of UnleashContext.

Create and configure builders that build instances of UnleashContext.
raw docstring

add-propertyclj

(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.
sourceraw docstring

app-nameclj

(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.
sourceraw docstring

buildclj

(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.
sourceraw docstring

environmentclj

(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.
sourceraw docstring

get-app-nameclj

(get-app-name ctx)

Returns the app's name from the context.

Returns the app's name from the context.
sourceraw docstring

get-by-nameclj

(get-by-name ctx contextName)

Returns a context property, explicitly looking for:

  • environment
  • appName
  • userId
  • sessionId
  • remoteAddress Otherwise, behaves as 'get-property'.
Returns a context property, explicitly looking for:
- environment
- appName
- userId
- sessionId
- remoteAddress
Otherwise, behaves as 'get-property'.
sourceraw docstring

get-environmentclj

(get-environment ctx)

Returns the environment from the context.

Returns the environment from the context.
sourceraw docstring

get-propertyclj

(get-property ctx property-name)

Returns a context property

Returns a context property
sourceraw docstring

get-remote-addressclj

(get-remote-address ctx)

Returns the remote address from the context.

Returns the remote address from the context.
sourceraw docstring

get-session-idclj

(get-session-id ctx)

Returns the session ID from the context.

Returns the session ID from the context.
sourceraw docstring

get-user-idclj

(get-user-id ctx)

Returns the user ID from the context.

Returns the user ID from the context.
sourceraw docstring

remote-addressclj

(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.
sourceraw docstring

session-idclj

(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.
sourceraw docstring

user-idclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close