G
G
Georgy Pugachev2020-05-18 16:29:09
go
Georgy Pugachev, 2020-05-18 16:29:09

How to open and close other applications/services from Golang?

Hello, I am writing a balancer program in Golang, which, depending on the load, will start and stop other services (which are also written in Golang), allowing you to do horizontal scaling.
How to open and close other applications/services from Golang?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-05-18
@firedragon

https://golang.org/pkg/syscall/ see all system calls in all languages ​​are similar, you essentially need to call the list of processes, filter them out and send a signal to convert to Islam. However, if you run them yourself, then you will already have pid. There are also functions for determining the processor load and other things.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question