// Error is the default error class for the package.
varError=errs.Class("metabase-verify")
funcmain(){
log:=zap.L()
root:=&cobra.Command{
Use:"metainfo-loop-verify",
}
IncludeProfiling(root)
root.AddCommand(VerifyCommand(log))
process.Exec(root)
}
// VerifyCommand creates command for running verifications.
funcVerifyCommand(log*zap.Logger)*cobra.Command{
varmetabaseDBstring
varignoreVersionMismatchbool
varverifyConfigverify.Config
cmd:=&cobra.Command{
Use:"run",
Short:"run metabase verification",
}
flag:=cmd.Flags()
flag.StringVar(&metabaseDB,"metabasedb","","connection URL for MetabaseDB")
_=cmd.MarkFlagRequired("metabasedb")
flag.BoolVar(&ignoreVersionMismatch,"ignore-version-mismatch",false,"ignore version mismatch")
flag.DurationVar(&verifyConfig.Loop.CoalesceDuration,"loop.coalesce-duration",5*time.Second,"how long to wait for new observers before starting iteration")
flag.Float64Var(&verifyConfig.Loop.RateLimit,"loop.rate-limit",0,"rate limit (default is 0 which is unlimited segments per second)")
flag.IntVar(&verifyConfig.Loop.ListLimit,"loop.list-limit",2500,"how many items to query in a batch")
flag.Int64Var(&verifyConfig.ProgressPrintFrequency,"progress-frequency",1000000,"how often should we print progress (every object)")