diff --git a/examples/quickstart/provider/main.go b/examples/quickstart/provider/main.go index cbeaa20f..ea7dc25c 100644 --- a/examples/quickstart/provider/main.go +++ b/examples/quickstart/provider/main.go @@ -27,7 +27,6 @@ import ( "os/signal" "strings" "syscall" - "time" "github.com/polarismesh/polaris-go" ) @@ -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{