pipxe

package
v0.0.0-...-8c43e32 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PxeURL      = "type.googleapis.com/RPi3.Pi/Pxe"
	SrvStateURL = "/Services/pipxe/State"
	MACVendor   = "b8:27:eb"
)

Variables

View Source
var (
	ErrInvalidLengthPipxe        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPipxe          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPipxe = 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"`
	ArpDeadline          string   `protobuf:"bytes,8,opt,name=arp_deadline,json=arpDeadline,proto3" json:"arp_deadline,omitempty"`
	DhcpRetry            uint32   `protobuf:"varint,9,opt,name=dhcp_retry,json=dhcpRetry,proto3" json:"dhcp_retry,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Config) Descriptor

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

func (*Config) GetArpDeadline

func (m *Config) GetArpDeadline() string

func (*Config) GetDhcpRetry

func (m *Config) GetDhcpRetry() uint32

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 PiPXE

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

PiPXE provides PXE-boot capabilities for Raspberry Pis

func (*PiPXE) ConfigURL

func (*PiPXE) ConfigURL() string

ConfigURL gives the any resolver URL for the config

func (*PiPXE) Entry

func (px *PiPXE) Entry()

Entry is the module's executable entrypoint

func (*PiPXE) Init

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

Init is used to intialize an executable module prior to entrypoint

func (*PiPXE) Name

func (*PiPXE) Name() string

Name returns the FQDN of the module

func (*PiPXE) NewConfig

func (*PiPXE) NewConfig() proto.Message

NewConfig returns a fully initialized default config

func (*PiPXE) NodeCreate

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

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

func (*PiPXE) NodeDelete

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

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

func (*PiPXE) NodeGet

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

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

func (*PiPXE) SetDiscoveryChan

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

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

func (*PiPXE) SetMutationChan

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

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

func (*PiPXE) StartDHCP

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

StartDHCP starts up the DHCP service

func (*PiPXE) StartTFTP

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

StartTFTP starts up the TFTP service

func (*PiPXE) Stop

func (px *PiPXE) Stop()

Stop should perform a graceful exit

func (*PiPXE) UpdateConfig

func (px *PiPXE) 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