-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Some time ago we discussed with @Wondertan that at some point we'll need some kind of service that can manage our services.
The first use case, that it could handle is simplifying our ServiceBreaker. TLDR: ServiceBreaker wraps some of our services and stops them once BEFP appeared. But it has one disadvantage - each service has to create its pubsub subscription over the BEFP topic. But we can have a service that creates a single subscription, waits for the BEFP, and then stops all respective services. This is only one use case that I can imagine rn, but I'm sure we can find more in the future.
type Service interface {
Attach(topic string, stop func(context.Context) error) error
Detach(topic string) error
}