summaryrefslogtreecommitdiff
path: root/controller.go
blob: 020ea4dd93ff9179b126f23c47804b3fecee1d81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package roadrunner

// Controller observes pool state and decides if any worker must be destroyed.
type Controller interface {
	// Lock controller on given pool instance.
	Attach(p Pool) Controller

	// Detach pool watching.
	Detach()
}

// Attacher defines the ability to attach rr controller.
type Attacher interface {
	// Attach attaches controller to the service.
	Attach(c Controller)
}