SetOnCreate sets the OnCreate callback and invokes it for every pool already created.
(onCreate func(PoolID, *Pool))
| 234 | |
| 235 | // SetOnCreate sets the OnCreate callback and invokes it for every pool already created. |
| 236 | func (m *Pools) SetOnCreate(onCreate func(PoolID, *Pool)) { |
| 237 | m.OnCreate = onCreate |
| 238 | for i, p := range m.pools { |
| 239 | onCreate(i, p) |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | // String returns a string representation of all pools. |
| 244 | func (m *Pools) String() string { |