A Booter provides boot instructions and files for machines. Due to the stateless nature of various boot protocols, BootSpec() will be called multiple times in the course of a single boot attempt.
| 117 | // will be called multiple times in the course of a single boot |
| 118 | // attempt. |
| 119 | type Booter interface { |
| 120 | // The given MAC address wants to know what it should |
| 121 | // boot. What should Pixiecore make it boot? |
| 122 | // |
| 123 | // Returning an error or a nil BootSpec will make Pixiecore ignore |
| 124 | // the client machine's request. |
| 125 | BootSpec(m Machine) (*Spec, error) |
| 126 | // Get the bytes corresponding to an ID given in Spec. |
| 127 | // |
| 128 | // Additionally returns the total number of bytes in the |
| 129 | // ReadCloser, or -1 if the size is unknown. Be warned, returning |
| 130 | // -1 will make the boot process orders of magnitude slower due to |
| 131 | // poor ipxe behavior. |
| 132 | ReadBootFile(id ID) (io.ReadCloser, int64, error) |
| 133 | // Write the given Reader to an ID given in Spec. |
| 134 | WriteBootFile(id ID, body io.Reader) error |
| 135 | } |
| 136 | |
| 137 | // Firmware describes a kind of firmware attempting to boot. |
| 138 | // |
no outgoing calls
no test coverage detected