Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendReader ¶
type BackendReader interface {
// Read data (from a backend) based on a mac address
// and return DHCP headers and options, including netboot info.
GetByMac(context.Context, net.HardwareAddr) (*data.DHCP, *data.Netboot, error)
}
BackendReader is an interface that defines the method to read data from a backend.
type Handler ¶
type Handler struct {
Backend BackendReader
ExtraKernelParams []string
Logger logr.Logger
// MagicString is the string pattern that will be matched
// in the source iso before patching. The field can be set
// during build time by setting this field.
// Ref: https://github.com/tinkerbell/hook/blob/main/linuxkit-templates/hook.template.yaml
MagicString string
// SourceISO is the source url where the unmodified iso lives.
// It must be a valid url.URL{} object and must have a url.URL{}.Scheme of HTTP or HTTPS.
SourceISO string
Syslog string
TinkServerTLS bool
TinkServerGRPCAddr string
StaticIPAMEnabled bool
// contains filtered or unexported fields
}
Handler is a struct that contains the necessary fields to patch an ISO file with relevant information for the Tink worker.
func (*Handler) HandlerFunc ¶
func (h *Handler) HandlerFunc() (http.HandlerFunc, error)
HandlerFunc returns a reverse proxy HTTP handler function that performs ISO patching.
func (*Handler) RoundTrip ¶
RoundTrip is a method on the Handler struct that implements the http.RoundTripper interface. This method is called by the httputil.NewSingleHostReverseProxy to handle the incoming request. The method is responsible for validating the incoming request, reading the source ISO, patching the ISO.
Click to show internal directories.
Click to hide internal directories.