const event_fns = []; // Set endpoint options, takes a user object wich contains the userId wich is a hash formed from tunnel ip and public key function set_endpoint() { } event_fns[0] = set_endpoint return { event_fns: event_fns }