server

package
v0.0.0-...-cfe5e5d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupported error = errors.New("Operation not supported")
	ErrRequestData  error = errors.New("Malformed request")
	ErrInvalidParam error = errors.New("Invalid parameter in request")
	ErrMissingKey   error = errors.New("Missing key for research")
)

Functions

This section is empty.

Types

type DNSMasqMgr

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

func NewDNSMasqMgr

func NewDNSMasqMgr(iprangeStr, hostsPath, leasesPath, journalPath string) (*DNSMasqMgr, error)

func NewDNSMasqMgrReadOnly

func NewDNSMasqMgrReadOnly(iprangeStr, hostsPath, leasesPath string) (*DNSMasqMgr, error)

func (*DNSMasqMgr) Close

func (dmm *DNSMasqMgr) Close() error

func (*DNSMasqMgr) DeleteAddress

func (dmm *DNSMasqMgr) DeleteAddress(ctx context.Context, req *pb.AddressRequest) (*pb.AddressReply, error)

func (*DNSMasqMgr) LookupAddress

func (dmm *DNSMasqMgr) LookupAddress(ctx context.Context, req *pb.AddressRequest) (*pb.AddressReply, error)

func (*DNSMasqMgr) RequestAddress

func (dmm *DNSMasqMgr) RequestAddress(ctx context.Context, req *pb.AddressRequest) (*pb.AddressReply, error)

func (*DNSMasqMgr) Store

func (dmm *DNSMasqMgr) Store() error

type JournalAddr

type JournalAddr struct {
	Hostname string `json:"hostname"`
	Macaddr  string `json:"mac"`
	Ipaddr   string `json:"ip"`
}

func (*JournalAddr) FromAddress

func (ja *JournalAddr) FromAddress(addr *pb.Address)

type JournalEntry

type JournalEntry struct {
	Action  string      `json:"action"`
	Address JournalAddr `json:"address"`
}

func FromAddress

func FromAddress(action string, addr *pb.Address) *JournalEntry

Directories

Path Synopsis
the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format
the package dhcphosts provides utilities to work with configuration in the dhcphosts (see man 8 dnsmasq) format

Jump to

Keyboard shortcuts

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