Add the default channels as described in RFC 0003
This commit is contained in:
parent
0d11b64a9b
commit
22d273aa97
22
eventbus.yml
22
eventbus.yml
|
@ -8,13 +8,15 @@ heartbeat: 30
|
||||||
#
|
#
|
||||||
# NOTE: there is a default "all" channel which is used to broadcast information
|
# NOTE: there is a default "all" channel which is used to broadcast information
|
||||||
# to all clients.
|
# to all clients.
|
||||||
channels:
|
#
|
||||||
# Stateful channels where clients may reconnect and pick up where they left
|
# WARN: Channels are not merged with the default configuration, and will overwrite
|
||||||
# off in the channel
|
# channels:
|
||||||
stateful:
|
# stateful:
|
||||||
- tasks
|
# - audit
|
||||||
- audit
|
# - tasks.for_auction
|
||||||
# Stateless channels are those which operate on a "pub/sub" model, if a
|
# - tasks.auction
|
||||||
# client misses a message, it's gone
|
# - tasks.bids
|
||||||
stateless:
|
# stateless:
|
||||||
- all
|
# - all
|
||||||
|
# - tasks.started
|
||||||
|
# - tasks.finished
|
||||||
|
|
|
@ -7,6 +7,7 @@ extern crate serde_json;
|
||||||
|
|
||||||
use actix::Message;
|
use actix::Message;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use serde_json::Value;
|
||||||
|
|
||||||
pub mod bus;
|
pub mod bus;
|
||||||
pub mod client;
|
pub mod client;
|
||||||
|
@ -35,5 +36,9 @@ pub enum Command {
|
||||||
* The channel the client wishes to unsubscribe from
|
* The channel the client wishes to unsubscribe from
|
||||||
*/
|
*/
|
||||||
channel: String,
|
channel: String,
|
||||||
}
|
},
|
||||||
|
Publish {
|
||||||
|
channel: String,
|
||||||
|
payload: Value,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,10 @@ heartbeat: 60
|
||||||
channels:
|
channels:
|
||||||
stateful:
|
stateful:
|
||||||
- audit
|
- audit
|
||||||
|
- tasks.for_auction
|
||||||
|
- tasks.auction
|
||||||
|
- tasks.bids
|
||||||
stateless:
|
stateless:
|
||||||
- all
|
- all
|
||||||
|
- tasks.started
|
||||||
|
- tasks.finished
|
||||||
|
|
Loading…
Reference in New Issue