summaryrefslogtreecommitdiff
path: root/controller.go
blob: 2079f0522e796f9ae96af010a2337bbdd9902b8b (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)
}