本文整理汇总了Golang中github.com/FactomProject/factomd/state.State.RpcPass方法的典型用法代码示例。如果您正苦于以下问题:Golang State.RpcPass方法的具体用法?Golang State.RpcPass怎么用?Golang State.RpcPass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/FactomProject/factomd/state.State
的用法示例。
在下文中一共展示了State.RpcPass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: NetStart
//.........这里部分代码省略.........
s.TimeOffset = primitives.NewTimestampFromMilliseconds(uint64(timeOffset))
s.StartDelayLimit = startDelay * 1000
s.Journaling = journaling
if 999 < portOverride { // The command line flag exists and seems reasonable.
s.SetPort(portOverride)
}
if blkTime != 0 {
s.DirectoryBlockInSeconds = blkTime
} else {
blkTime = s.DirectoryBlockInSeconds
}
if follower {
leader = false
}
if leader {
follower = false
}
if !follower && !leader {
panic("Not a leader or a follower")
}
if journal != "" {
cnt = 1
}
if rpcUser != "" {
s.RpcUser = rpcUser
}
if rpcPassword != "" {
s.RpcPass = rpcPassword
}
if factomdTLS == true {
s.FactomdTLSEnable = true
}
if factomdLocations != "" {
if len(s.FactomdLocations) > 0 {
s.FactomdLocations += ","
}
s.FactomdLocations += factomdLocations
}
fmt.Println(">>>>>>>>>>>>>>>>")
fmt.Println(">>>>>>>>>>>>>>>> Net Sim Start!")
fmt.Println(">>>>>>>>>>>>>>>>")
fmt.Println(">>>>>>>>>>>>>>>> Listening to Node", listenTo)
fmt.Println(">>>>>>>>>>>>>>>>")
AddInterruptHandler(func() {
fmt.Print("<Break>\n")
fmt.Print("Gracefully shutting down the server...\n")
for _, fnode := range fnodes {
fmt.Print("Shutting Down: ", fnode.State.FactomNodeName, "\r\n")
fnode.State.ShutdownChan <- 0
}
if enableNet {
p2pNetwork.NetworkStop()
// NODE_TALK_FIX
p2pProxy.stopProxy()
}
fmt.Print("Waiting...\r\n")