A Server boots machines using a Booter.
| 153 | |
| 154 | // A Server boots machines using a Booter. |
| 155 | type Server struct { |
| 156 | Booter Booter |
| 157 | |
| 158 | // Address to listen on, or empty for all interfaces. |
| 159 | Address string |
| 160 | // HTTP port for boot services. |
| 161 | HTTPPort int |
| 162 | // HTTP port for human-readable information. Can be the same as |
| 163 | // HTTPPort. |
| 164 | HTTPStatusPort int |
| 165 | |
| 166 | // Ipxe lists the supported bootable Firmwares, and their |
| 167 | // associated ipxe binary. |
| 168 | Ipxe map[Firmware][]byte |
| 169 | |
| 170 | // Log receives logs on Pixiecore's operation. If nil, logging |
| 171 | // is suppressed. |
| 172 | Log func(subsystem, msg string) |
| 173 | // Debug receives extensive logging on Pixiecore's internals. Very |
| 174 | // useful for debugging, but very verbose. |
| 175 | Debug func(subsystem, msg string) |
| 176 | |
| 177 | // These ports can technically be set for testing, but the |
| 178 | // protocols burned in firmware on the client side hardcode these, |
| 179 | // so if you change them in production, nothing will work. |
| 180 | DHCPPort int |
| 181 | TFTPPort int |
| 182 | PXEPort int |
| 183 | |
| 184 | // Listen for DHCP traffic without binding to the DHCP port. This |
| 185 | // enables coexistence of Pixiecore with another DHCP server. |
| 186 | // |
| 187 | // Currently only supported on Linux. |
| 188 | DHCPNoBind bool |
| 189 | |
| 190 | // Read UI assets from this path, rather than use the builtin UI |
| 191 | // assets. Used for development of Pixiecore. |
| 192 | UIAssetsDir string |
| 193 | |
| 194 | errs chan error |
| 195 | |
| 196 | eventsMu sync.Mutex |
| 197 | events map[string][]machineEvent |
| 198 | } |
| 199 | |
| 200 | // Serve listens for machines attempting to boot, and uses Booter to |
| 201 | // help them. |
nothing calls this directly
no outgoing calls
no test coverage detected