Documentation
¶
Index ¶
- type Device
- func (device *Device) GetBandwidthDown() int64
- func (device *Device) GetBandwidthUp() int64
- func (device *Device) GetInternalIP() string
- func (device *Device) GetNodeID(ctx context.Context) (string, error)
- func (device *Device) GetNodeInfo(ctx context.Context) (types.NodeInfo, error)
- func (device *Device) SetBandwidthUp(bandwidthUp int64)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device represents a device and its properties
func NewDevice ¶
func NewDevice(nodeID, internalIP string, bandwidthUp, bandwidthDown int64, storage Storage) *Device
NewDevice creates a new Device instance with the specified properties.
func (*Device) GetBandwidthDown ¶
GetBandwidthDown returns the bandwidth download limit for the device.
func (*Device) GetBandwidthUp ¶
GetBandwidthUp returns the bandwidth upload limit for the device.
func (*Device) GetInternalIP ¶
GetInternalIP returns the internal IP address for the device.
func (*Device) GetNodeInfo ¶
GetNodeInfo returns information about the device as a NodeInfo struct.
func (*Device) SetBandwidthUp ¶
SetBandwidthUp sets the bandwidth upload limit for the device.
Click to show internal directories.
Click to hide internal directories.