Publishes the data to the event stream.

def publish(self, key, data):
        '''
        Publishes the data to the event stream.
        '''
        publish_data = {key: data}
        self.handler.send(salt.utils.json.dumps(publish_data), False)