@app.route('<STR_LIT>', methods=['<STR_LIT:POST>'])<EOL>def register_consumer():
global _consumers<EOL>hostname, port = request.form['<STR_LIT>'], request.form['<STR_LIT:port>']<EOL>app_name = _app_name_from_forwarding_info(hostname, port)<EOL>containers = get_dusty_containers([app_name], include_exited=True)<EOL>if not containers:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(app_name))<EOL><DEDENT>container = containers[<NUM_LIT:0>]<EOL>new_id = uuid1()<EOL>new_consumer = Consumer(container['<STR_LIT>'], datetime.utcnow())<EOL>_consumers[str(new_id)] = new_consumer<EOL>response = jsonify({'<STR_LIT>': app_name, '<STR_LIT>': new_id})<EOL>response.headers['<STR_LIT>'] = '<STR_LIT:*>'<EOL>response.headers['<STR_LIT>'] = '<STR_LIT>'<EOL>return response<EOL>
Given a hostname and port attempting to be accessed,
    return a unique consumer ID for accessing logs from
    the referenced container.