docs(gw): enrich README.md

This commit is contained in:
JianBo He 2021-07-23 14:45:20 +08:00
parent 67bb8d0564
commit 80eb7f313d
2 changed files with 37 additions and 6 deletions

View File

@ -22,9 +22,31 @@
## ROADMAP ## ROADMAP
Gateway v0.1: Management support Gateway v0.1: "Basic Functionals"
- Management support
- Conn/Frame/Protocol Template
- Support Stomp/MQTT-SN/CoAP/LwM2M/ExProto
Gateway v0.2: Conn/Frame/Protocol Template Gateway v0.2: "Integration & Friendly Management"
- Hooks & Metrics & Statistic
- HTTP APIs
- Management in the cluster
- Integrate with AuthN
- Integrate with `emqx_config`
- Improve hocon config
- Mountpoint & ClientInfo's Metadata
- The Concept Review
Gateway v0.3: "Fault tolerance and high availability"
- The restart mechanism for gateway-instance
- Consistency of cluster state
- Configuration hot update
Gateway v1.0: "Best practices for each type of protocol"
- CoAP
- Stomp
- MQTT-SN
- LwM2M
### Compatible with EMQ X ### Compatible with EMQ X

View File

@ -246,15 +246,24 @@ open_session(_Type, false = _CleanStart,
{error, not_supported_now}. {error, not_supported_now}.
%% @private %% @private
create_session(_Type, ClientInfo, ConnInfo, CreateSessionFun) -> create_session(Type, ClientInfo, ConnInfo, CreateSessionFun) ->
try try
Session = emqx_gateway_utils:apply( Session = emqx_gateway_utils:apply(
CreateSessionFun, CreateSessionFun,
[ClientInfo, ConnInfo] [ClientInfo, ConnInfo]
), ),
%% TODO: v0.2 session metrics & hooks ok = emqx_gateway_metrics:inc(Type, 'session.created'),
%ok = emqx_metrics:inc('session.created'), SessionInfo = case is_record(Session, emqx_session) of
%ok = emqx_hooks:run('session.created', [ClientInfo, emqx_session:info(Session)]), true -> emqx_session:info(Session);
_ ->
case is_map(Session) of
false ->
throw(session_structure_should_be_map);
_ ->
Session
end
end,
ok = emqx_hooks:run('session.created', [ClientInfo, SessionInfo]),
Session Session
catch catch
Class : Reason : Stk -> Class : Reason : Stk ->