closing commit before branching out Multiplex
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"channel":"agents:42",
|
||||
"packet":{
|
||||
"eventType": "age",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"color": "#0F0"
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"channel":"requests:gps","packet":{"action":"TIME","sender":"steinic","reqid":"9d3bcb2e-ef1d-4620-86ff-5c0b0f4063f7"}}
|
||||
@@ -1,62 +1,14 @@
|
||||
{
|
||||
"sequenceDelay": 500,
|
||||
"sequenceLoop":10,
|
||||
"sequence":[
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "moving",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"attrs": {
|
||||
"x": "10",
|
||||
"y": "10"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "0",
|
||||
"y": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "moving",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"attrs": {
|
||||
"x": "800",
|
||||
"y": "30"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "moving",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"attrs": {
|
||||
"x": "800",
|
||||
"y": "500"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "moving",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"attrs": {
|
||||
"x": "10",
|
||||
"y": "500"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
]
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"sequenceDelay": 500,
|
||||
"sequenceLoop":10,
|
||||
"sequence":[
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "-5",
|
||||
"y": "5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "-5",
|
||||
"y": "-5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "-5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "5",
|
||||
"z": "2"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "5",
|
||||
"z": "0"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"channel":"gps:agents",
|
||||
"packet":{
|
||||
"eventType": "moving",
|
||||
"eventType": "move",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"attrs": {
|
||||
"x": "950",
|
||||
"y": "650"
|
||||
"coords": {
|
||||
"x": "5",
|
||||
"y": "5"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"channel":"agents:42",
|
||||
"packet":{
|
||||
"eventType": "polarize",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"color": "#F00"
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
@@ -199,21 +199,6 @@ module.exports = class RedisConnexion {
|
||||
return(matches.length > 0);
|
||||
}
|
||||
|
||||
async getUserRoles(uid){
|
||||
let roles = []
|
||||
|
||||
//TODO : Maybe do better...? (check in DB ?)
|
||||
if(uid.startsWith('backend-')){
|
||||
roles = [uid.substr(8)]
|
||||
} else {
|
||||
let rawPayload = await this.redisGet(uid, this.config.redis.authTokenPrefix)
|
||||
let payload = JSON.parse(rawPayload)
|
||||
if(payload && payload.roles) roles = payload.roles
|
||||
}
|
||||
if(this.debug) console.log(`Got roles for ${uid} => ${roles}`)
|
||||
return(roles)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ if(argv.file){
|
||||
} else console.error('Bad file format !?', fileData)
|
||||
}
|
||||
await rediscnx.redisClient.disconnect()
|
||||
}
|
||||
} else { console.error('Cannot open file !')}
|
||||
} else {
|
||||
let dialog = new Dialog(dialogData, selectors)
|
||||
dialog.start('step1').then(answers => {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"Xpass": "yj465sqfCTA0bKDw3zEYg8OqYl9Tv",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"basePrefix": "messageBus:",
|
||||
"authTokenPrefix": "authorizer:message_bus_user_"
|
||||
"basePrefix": "messageBus:"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"channel":"agents:42",
|
||||
"packet":{
|
||||
"eventType": "rotate",
|
||||
"payload": {
|
||||
"aid": "agent42",
|
||||
"facing": {
|
||||
"y": "45"
|
||||
}
|
||||
},
|
||||
"sender": "steinic"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user