rpcclient

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close() error
	Device() DeviceRequest
	Lease() LeaseRequest
	Network() NetworkRequest
	Server() ServerRequest
}

func Connect

func Connect(network, address string) (Client, error)

Connect creates a new RPC client connection to specified network address.

type DeviceRPCRequest

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

func (*DeviceRPCRequest) Blacklist

func (d *DeviceRPCRequest) Blacklist(mac net.HardwareAddr) error

func (*DeviceRPCRequest) Delete

func (d *DeviceRPCRequest) Delete(mac net.HardwareAddr) error

func (*DeviceRPCRequest) Get

func (*DeviceRPCRequest) Register

func (d *DeviceRPCRequest) Register(mac net.HardwareAddr) error

func (*DeviceRPCRequest) RemoveBlacklist

func (d *DeviceRPCRequest) RemoveBlacklist(mac net.HardwareAddr) error

func (*DeviceRPCRequest) Unregister

func (d *DeviceRPCRequest) Unregister(mac net.HardwareAddr) error

type DeviceRequest

type DeviceRequest interface {
	Get(mac net.HardwareAddr) (*models.Device, error)
	Register(mac net.HardwareAddr) error
	Unregister(mac net.HardwareAddr) error
	Blacklist(mac net.HardwareAddr) error
	RemoveBlacklist(mac net.HardwareAddr) error
	Delete(mac net.HardwareAddr) error
}

type LeaseRPCRequest

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

func (*LeaseRPCRequest) Get

func (l *LeaseRPCRequest) Get(ip net.IP) (*models.Lease, error)

func (*LeaseRPCRequest) GetAllFromNetwork

func (l *LeaseRPCRequest) GetAllFromNetwork(name string) ([]*models.Lease, error)

type LeaseRequest

type LeaseRequest interface {
	GetAllFromNetwork(name string) ([]*models.Lease, error)
	Get(ip net.IP) (*models.Lease, error)
}

type NetworkRPCRequest

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

func (*NetworkRPCRequest) GetNameList

func (n *NetworkRPCRequest) GetNameList() ([]string, error)

type NetworkRequest

type NetworkRequest interface {
	GetNameList() ([]string, error)
}

type RPCClient

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

Client is an RPC client connection to the managed DHCP server

func (*RPCClient) Close

func (c *RPCClient) Close() error

Close the RPC connection

func (*RPCClient) Device

func (c *RPCClient) Device() DeviceRequest

Device creates a new request to the Device service.

func (*RPCClient) Lease

func (c *RPCClient) Lease() LeaseRequest

Lease creates a new request to the Lease service.

func (*RPCClient) Network

func (c *RPCClient) Network() NetworkRequest

Network creates a new request to the Network service.

func (*RPCClient) Server

func (c *RPCClient) Server() ServerRequest

Server creates a new request to the Server service.

type ServerRPCRequest

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

func (*ServerRPCRequest) GetPoolStats

func (s *ServerRPCRequest) GetPoolStats() ([]*stats.PoolStat, error)

type ServerRequest

type ServerRequest interface {
	GetPoolStats() ([]*stats.PoolStat, error)
}

Jump to

Keyboard shortcuts

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