package
0.0.0-20230306073224-9a47451aa932
Repository: https://github.com/jeevic/lego.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
初始化数据.
注册实例.
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
控制写入安全的级别 分为应答式写入以及非应答式写入对于强一致性场景,建议w>1或者等于majority,以及journal为true,否则w=0在副本集的情形下,建议通过配置文件来修改w以及设置wtimeout,以避免由于某个节点挂起导致无法应答{ w: <value>, j: <boolean>, wtimeout: <number> }w: w:1(应答式写入) 要求确认操作已经传播到指定的单个mongod实例或副本集主实例(缺省为1)但是对于尝试向已关闭的套接字写入或者网络故障会返回异常信息 w:>1(用于副本集环境) 该值用于设定写入节点的数目,包括主节点 "majority"(大多数) 适用于集群架构,要求写入操作已经传递到绝大多数投票节点以及主节点后进行应答 <tag set> 要求写入操作已经传递到指定tag标记副本集中的成员后进行应答 j : 该选项要求确认写操作已经写入journal日志之后应答客户端(需要开启journal功能) wtimeout: 该选项指定一个时间限制,以防止写操作无限制被阻塞导致无法应答给客户端 @see https://blog.csdn.net/leshami/article/details/52913705 @see https://docs.mongodb.com/manual/reference/write-concern/WriteConcern.