src/modules/session.js
/**
 * Assign a session to the log event, create it if necessary.
 */
Assign a session to the log event, create it if necessary.
Assign a session to the log event create it if necessary .
function sessionHandler({ type, gap, id }) {
  return stream => {
    return event => {
      const sessId = id(event.get('data'));
      if (sessId !== undefined) {
        const sess = session.assign({
          type: type,
          id: sessId,
          time: event.get('time'),
          gap: gap,
        });
        stream(event.setIn(['data', 'session'], sess));
      }
    };
  };
}
function sessionHandler ( { type , gap , id } ) { return stream => { return event => { const sessId = id ( event . get ( 'data' ) ) ; if ( sessId !== undefined ) { const sess = session . assign ( { type : type , id : sessId , time : event . get ( 'time' ) , gap : gap , } ) ; stream ( event . setIn ( [ 'data' , 'session' ] , sess ) ) ; } } ; } ; }
Assign a session to the log event, create it if necessary.
Assign a session to the log event create it if necessary .