pxe

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DHCPPacketBuffer int    = 1500
	DHCPPXEFile      string = "pxelinux.0" // this should probably be configurable
)
View Source
const (
	PXEStateURL = "type.googleapis.com/PXE.Client/State"
	SrvStateURL = "/Services/pxe/State"
)

Variables

View Source
var (
	ErrInvalidLengthPxemodule        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPxemodule          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPxemodule = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	SrvIfaceUrl          string   `protobuf:"bytes,1,opt,name=srv_iface_url,json=srvIfaceUrl,proto3" json:"srv_iface_url,omitempty"`
	SrvIpUrl             string   `protobuf:"bytes,2,opt,name=srv_ip_url,json=srvIpUrl,proto3" json:"srv_ip_url,omitempty"`
	IpUrl                string   `protobuf:"bytes,3,opt,name=ip_url,json=ipUrl,proto3" json:"ip_url,omitempty"`
	NmUrl                string   `protobuf:"bytes,4,opt,name=nm_url,json=nmUrl,proto3" json:"nm_url,omitempty"`
	MacUrl               string   `protobuf:"bytes,5,opt,name=mac_url,json=macUrl,proto3" json:"mac_url,omitempty"`
	SubnetUrl            string   `protobuf:"bytes,6,opt,name=subnet_url,json=subnetUrl,proto3" json:"subnet_url,omitempty"`
	TftpDir              string   `protobuf:"bytes,7,opt,name=tftp_dir,json=tftpDir,proto3" json:"tftp_dir,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetIpUrl

func (m *Config) GetIpUrl() string

func (*Config) GetMacUrl

func (m *Config) GetMacUrl() string

func (*Config) GetNmUrl

func (m *Config) GetNmUrl() string

func (*Config) GetSrvIfaceUrl

func (m *Config) GetSrvIfaceUrl() string

func (*Config) GetSrvIpUrl

func (m *Config) GetSrvIpUrl() string

func (*Config) GetSubnetUrl

func (m *Config) GetSubnetUrl() string

func (*Config) GetTftpDir

func (m *Config) GetTftpDir() string

func (*Config) Marshal

func (m *Config) Marshal() (dAtA []byte, err error)

func (*Config) MarshalTo

func (m *Config) MarshalTo(dAtA []byte) (int, error)

func (*Config) MarshalToSizedBuffer

func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size

func (m *Config) Size() (n int)

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal

func (m *Config) Unmarshal(dAtA []byte) error

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_MessageName

func (*Config) XXX_MessageName() string

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type PXE

type PXE struct {
	// contains filtered or unexported fields
}

PXE provides PXE-boot capabilities

func (*PXE) ConfigURL

func (*PXE) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*PXE) Entry

func (px *PXE) Entry()

Entry is the module's executable entrypoint

func (*PXE) Init

func (px *PXE) Init(api types.ModuleAPIClient)

Init is used to intialize an executable module prior to entrypoint

func (*PXE) Name

func (*PXE) Name() string

Name returns the FQDN of the module

func (*PXE) NewConfig

func (*PXE) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*PXE) NodeCreate

func (px *PXE) NodeCreate(n types.Node) (e error)

NodeCreate creates a new node in our node pool -- concurrency safe

func (*PXE) NodeDelete

func (px *PXE) NodeDelete(qb nodeQueryBy, q string)

NodeDelete deletes a node that we know about -- cuncurrency safe

func (*PXE) NodeGet

func (px *PXE) NodeGet(qb nodeQueryBy, q string) (n types.Node)

NodeGet gets a node that we know about -- concurrency safe

func (*PXE) SetDiscoveryChan

func (px *PXE) SetDiscoveryChan(c chan<- types.Event)

SetDiscoveryChan sets the current discovery channel this is generally done by the API

func (*PXE) SetMutationChan

func (px *PXE) SetMutationChan(c <-chan types.Event)

SetMutationChan sets the current mutation channel this is generally done by the API

func (*PXE) StartDHCP

func (px *PXE) StartDHCP(iface string, ip net.IP)

StartDHCP starts up the DHCP service

func (*PXE) StartTFTP

func (px *PXE) StartTFTP(ip net.IP)

StartTFTP starts up the TFTP service

func (*PXE) Stop

func (px *PXE) Stop()

Stop should perform a graceful exit

func (*PXE) UpdateConfig

func (px *PXE) UpdateConfig(cfg proto.Message) (e error)

UpdateConfig updates the running config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL