This commit is contained in:
wangchuxiao
2023-03-08 13:34:12 +08:00
parent 107f4c950b
commit f8ad35a6f7
24 changed files with 209 additions and 125 deletions
+25
View File
@@ -0,0 +1,25 @@
package cmd
import (
"OpenIM/internal/msgtransfer"
"github.com/spf13/cobra"
)
type MsgTransferCmd struct {
*RootCmd
}
func NewMsgTransferCmd() MsgTransferCmd {
return MsgTransferCmd{NewRootCmd()}
}
func (m *MsgTransferCmd) addRunE() {
m.Command.RunE = func(cmd *cobra.Command, args []string) error {
return msgtransfer.StartTransfer(m.getPrometheusPortFlag(cmd))
}
}
func (m *MsgTransferCmd) Exec() error {
m.addRunE()
return m.Execute()
}