package main import ( "time" "go-micro.dev/v4" "go-micro.dev/v4/util/log" ) func main() { service := micro.NewService( micro.Name("com.example.srv.foo"), micro.RegisterTTL(time.Second*30), micro.RegisterInterval(time.Second*15), ) service.Init() if err := service.Run(); err != nil { log.Fatal(err) } }