Skip to content

Commit

Permalink
fix:修复demo中缺失import问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed Aug 13, 2024
1 parent 38020c6 commit 0e6d64a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions examples/quickstart/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"os/signal"
"strings"
"syscall"
"time"

"github.com/polarismesh/polaris-go"
)
Expand Down Expand Up @@ -123,22 +122,6 @@ func (svr *PolarisProvider) deregisterService() {
log.Printf("deregister successfully.")
}

func (svr *PolarisProvider) doHeartbeat() {
log.Printf("start to invoke heartbeat operation")
ticker := time.NewTicker(time.Duration(5 * time.Second))
for range ticker.C {
if !svr.isShutdown {
heartbeatRequest := &polaris.InstanceHeartbeatRequest{}
heartbeatRequest.Namespace = namespace
heartbeatRequest.Service = service
heartbeatRequest.Host = svr.host
heartbeatRequest.Port = svr.port
heartbeatRequest.ServiceToken = token
svr.provider.Heartbeat(heartbeatRequest)
}
}
}

func (svr *PolarisProvider) runMainLoop() {
ch := make(chan os.Signal, 1)
signal.Notify(ch, []os.Signal{
Expand Down

0 comments on commit 0e6d64a

Please sign in to comment.