bec_lib.tests.utils.ConnectorMock#
- class ConnectorMock(bootstrap_server='localhost:0000', store_data=True)[source]#
Bases:
ConnectorBase
Methods
Delete a key
Execute a pipeline
Get a value
Get keys that match the pattern
send an error as log
send a log message
send a warning
Push a message to the left of the list
Get a range of values from the list
Set a value in the list at the given index
Create a pipeline for batch operations
Poll for new messages, receive them and execute callbacks
producer
raise_alarm
Raise a warning
Send a raw message without using the BECMessage class
Register a callback for a topic or pattern
Push a message to the right of the list
Send a message
Set a value
Set a value and publish it
Shutdown the connector
Unregister a callback for a topic or pattern
Add a message to the stream
Read from the stream
Read from the stream
- log_message(msg)#
send a log message
- log_warning(msg)#
send a warning
- lset(topic: str, index: int, msgs: str, pipe=None) None [source]#
Set a value in the list at the given index
- raise_warning(msg)#
Raise a warning
- set_and_publish(topic, msg, pipe=None, expire: int | None = None)[source]#
Set a value and publish it