Create writes a marker file on the given path to indicate that a component is going to be scaled down in the future. The presence of this file means that a component should perform some operations specified by the component itself before being shutdown.
(p string)
| 21 | // going to be scaled down in the future. The presence of this file means that a component |
| 22 | // should perform some operations specified by the component itself before being shutdown. |
| 23 | func Create(p string) error { |
| 24 | return atomicfs.CreateFile(p, strings.NewReader(time.Now().UTC().Format(time.RFC3339))) |
| 25 | } |
| 26 | |
| 27 | // Remove removes the shutdown marker file on the given path if it exists. |
| 28 | func Remove(p string) error { |
no test coverage detected