mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
23 lines
462 B
Go
23 lines
462 B
Go
package cmd
|
|
|
|
import (
|
|
"OpenIM/internal/push"
|
|
"OpenIM/internal/startrpc"
|
|
"OpenIM/pkg/common/config"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
type PushCmd struct {
|
|
*AuthCmd
|
|
}
|
|
|
|
func NewPushCmd() *PushCmd {
|
|
return &PushCmd{NewAuthCmd()}
|
|
}
|
|
|
|
func (r *PushCmd) AddPush() {
|
|
r.Command.RunE = func(cmd *cobra.Command, args []string) error {
|
|
return startrpc.Start(r.getPortFlag(cmd), config.Config.RpcRegisterName.OpenImPushName, r.getPrometheusPortFlag(cmd), push.Start)
|
|
}
|
|
}
|