How to use the riffle.SetFabric function in Riffle

To help you get started, we’ve selected a few Riffle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github exis-io / Exis / python / pyRiffle / exis.py View on Github external
def main():
    args = parse_args()

    ws_url = os.environ.get("WS_URL", "ws://localhost:8000/ws")
    domain = os.environ.get("DOMAIN", "xs")

    if args['--debug']:
        riffle.SetLogLevelDebug()

    if not args['--quiet']:
        print("Node:   {}".format(ws_url))
        print("Domain: {}".format(domain))
        print("---")

    riffle.SetFabric(ws_url)
    ExisSession(domain, args).join()
github exis-io / Exis / python / stress / stress.py View on Github external
def CreateDomains(url, suffix="", domain="xs.demo.stress"):
    riffle.SetFabric(url)
    s = riffle.Domain(domain)
    client = Stressor("client" + suffix, superdomain=s)
    backend = Stressor("backend" + suffix, superdomain=s)
    return client, backend