// Package handler holds the interface that backends implement, handlers take in, and the top level dhcpServer package passes to handlers. package handler import ( "context" "dhcp/internal/dhcpServer/data" "net" ) // BackendReader is the interface for getting data from a macAndIPXE. // // Backends implement this interface to provide dhcpServer and Netboot data to the handlers. type BackendReader interface { // Read data (from a macAndIPXE) based on a mac address // and return dhcpServer headers and options, including netboot info. GetByMac(context.Context, net.HardwareAddr, string) (*data.DHCP, error) GetByIP(context.Context, net.IP, string) (*data.DHCP, error) }