diff options
-rw-r--r-- | pool.go | 3 | ||||
-rw-r--r-- | state.go | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -16,6 +16,9 @@ type Pool interface { // Exec one task with given payload and context, returns result or error. Exec(rqs *Payload) (rsp *Payload, err error) + // Workers returns worker list associated with the pool. + Workers() (workers []*Worker) + // Destroy all underlying workers (but let them to complete the task). Destroy() } @@ -1,6 +1,7 @@ package roadrunner import ( + "fmt" "sync" "sync/atomic" "time" @@ -8,6 +9,8 @@ import ( // State represents worker status and updated time. type State interface { + fmt.Stringer + // Value returns state value Value() int64 |