MCPcopy Create free account
hub / github.com/CloudOrc/SolidUI / init_snakemq

Function init_snakemq

solidui/kernel_program/utils.py:38–48  ·  view source on GitHub ↗
(ident, init_type="listen")

Source from the content-addressed store, hash-verified

36
37
38def init_snakemq(ident, init_type="listen"):
39 link = snakemq.link.Link()
40 packeter = snakemq.packeter.Packeter(link)
41 messaging = snakemq.messaging.Messaging(ident, "", packeter)
42 if init_type == "listen":
43 link.add_listener((f"{slip}", config.SNAKEMQ_PORT))
44 elif init_type == "connect":
45 link.add_connector((f"{scip}", config.SNAKEMQ_PORT))
46 else:
47 raise Exception("Unsupported init type.")
48 return messaging, link
49
50
51def response_format(code=0, msg="success", data={}, success=True, failed=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected