You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using nats microservices and want to gracefull close the microservices.
how to achieve this ?
Stop listening to any further new request
Process the current pending request
Gracefully shutdown or close the connection
srv, err:=micro.AddService(nc, micro.Config{
Name: "thewildaigo", // this has no real use just for nameVersion: "0.0.1",
})
srv.AddEndpoint(
"ping",
micro.HandlerFunc(func(req micro.Request) {
time.Sleep(time.Second*10)
fmt.Println("test")
}),
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am using nats microservices and want to gracefull close the microservices.
how to achieve this ?
Beta Was this translation helpful? Give feedback.
All reactions