1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-23 17:53:05 +02:00

22 lines
349 B
Go
Raw Normal View History

2020-12-26 15:17:20 +00:00
package main
import (
"time"
"github.com/micro/go-micro/v2"
"github.com/micro/go-micro/v2/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)
}
}