1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-05-31 21:59:42 +02:00

22 lines
347 B
Go
Raw Normal View History

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