Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
// Name returns the name of the handler
Name() string
// ServeDHCP is a HandlerFunc and called for each DHCPv4 request. See HandlerFunc
// for more information
ServeDHCP(ctx context.Context, req *dhcpv4.DHCPv4, resp *dhcpv4.DHCPv4) error
}
Handler for DHCP requests created by a plugin factory (see Plugin). Each handler is responsible of calling the next handling in the chain which was passed to Plugin
type HandlerFunc ¶
HandlerFunc allows to easily wrap a function as a Handler type The provided context will always have a lease.Database assigned to it. A reference to the database can be loaded by using lease.GetDatabase(ctx)
func (HandlerFunc) Name ¶
func (fn HandlerFunc) Name() string
Name returns "HandlerFunc" and implements the Handler interface
Click to show internal directories.
Click to hide internal directories.