You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/common/cmd/push.go

23 lines
462 B

2 years ago
package cmd
import (
"OpenIM/internal/push"
"OpenIM/internal/startrpc"
"OpenIM/pkg/common/config"
"github.com/spf13/cobra"
)
type PushCmd struct {
2 years ago
*AuthCmd
2 years ago
}
func NewPushCmd() *PushCmd {
2 years ago
return &PushCmd{NewAuthCmd()}
2 years ago
}
2 years ago
func (r *PushCmd) AddPush() {
2 years ago
r.Command.RunE = func(cmd *cobra.Command, args []string) error {
2 years ago
return startrpc.Start(r.getPortFlag(cmd), config.Config.RpcRegisterName.OpenImPushName, r.getPrometheusPortFlag(cmd), push.Start)
2 years ago
}
}