new Mongos(servers, options){Mongos}
| Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| servers | Array.<Server> | A seedlist of servers participating in the replicaset. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options | object | null | optional Optional settings. 
 | 
- Deprecated
- Yes
 
Properties:
| Name | Type | Description | 
|---|---|---|
| parserType | string | the parser type used (c++ or js). | 
Fires:
- Mongos#event:connect
- Mongos#event:ha
- Mongos#event:joined
- Mongos#event:left
- Mongos#event:fullsetup
- Mongos#event:open
- Mongos#event:close
- Mongos#event:error
- Mongos#event:timeout
- Mongos#event:parseError
- Mongos#event:commandStarted
- Mongos#event:commandSucceeded
- Mongos#event:commandFailed
Returns:
Mongos instance.Events
- 
    close
- 
    
    
    Mongos close event Type:- object
 
- 
    commandFailed
- 
    
    
    An event emitted indicating a command failed, if command monitoring is enabled Type:- object
 
- 
    commandStarted
- 
    
    
    An event emitted indicating a command was started, if command monitoring is enabled Type:- object
 
- 
    commandSucceeded
- 
    
    
    An event emitted indicating a command succeeded, if command monitoring is enabled Type:- object
 
- 
    connect
- 
    
    
    A mongos connect event, used to verify that the connection is up and running Type:
- 
    error
- 
    
    
    Mongos error event, emitted if there is an error listener. Type:
- 
    fullsetup
- 
    
    
    Mongos fullsetup event, emitted when all proxies in the topology have been connected to. Type:
- 
    
    
    The mongos high availability event Type:- function
 Name Type Description typestring The stage in the high availability event (start|end) data.norepeatboolean This is a repeating high availability process or a single execution only data.idnumber The id for this high availability request data.stateobject An object containing the information about the current replicaset 
- 
    joined
- 
    
    
    A server member joined the mongos set Type:- function
 Name Type Description typestring The type of member that joined (primary|secondary|arbiter) serverServer The server object that joined 
- 
    
    
    A server member left the mongos set Type:- function
 Name Type Description typestring The type of member that left (primary|secondary|arbiter) serverServer The server object that left 
- 
    
    
    Mongos open event, emitted when mongos can start processing commands. Type:
- 
    parseError
- 
    
    
    Mongos parseError event Type:- object
 
- 
    timeout
- 
    
    
    Mongos timeout event Type:- object