示例#1
0
 def __init__(self):
     self._lock = ReadWriteLock()
     self._initialized = False
     self._items = defaultdict(dict)
示例#2
0
 def __init__(self):
     self._lock = ReadWriteLock()
     self._initialized = False
     self._features = {}
示例#3
0
from .util import log

__version__ = VERSION

__LONG_SCALE__ = float(0xFFFFFFFFFFFFFFF)

__BUILTINS__ = [
    "key", "ip", "country", "email", "firstName", "lastName", "avatar", "name",
    "anonymous"
]
"""Settings."""
start_wait = 5

__client = None
__config = Config()
__lock = ReadWriteLock()


def set_config(config):
    """Sets the configuration for the shared SDK client instance.

    If this is called prior to :func:`ldclient.get()`, it stores the configuration that will be used when the
    client is initialized. If it is called after the client has already been initialized, the client will be
    re-initialized with the new configuration (this will result in the next call to :func:`ldclient.get()`
    returning a new client instance).

    :param ldclient.config.Config config: the client configuration
    """
    global __config
    global __client
    global __lock
示例#4
0
 def __init__(self):
     """Constructs an instance of InMemoryFeatureStore.
     """
     self._lock = ReadWriteLock()
     self._initialized = False
     self._items = defaultdict(dict)