swupdater

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SWUpdater

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

SWUpdater represents a software updater.

func NewSWUpdater

func NewSWUpdater(hostName string, port uint16, notifications chan SWUpdaterNotification) *SWUpdater

NewSWUpdater creates a new instance of SWUpdater with the specified host name and port.

func (*SWUpdater) Restart added in v2.6.0

func (s *SWUpdater) Restart(timeout time.Duration) error

Restart reboots the device by sending a POST request to the restart endpoint.

func (*SWUpdater) Update

func (s *SWUpdater) Update(filename string, connectionTimeout, timeout time.Duration) error

Update uploads a software image and waits for the update process to finish. It takes a filename string and a timeout duration as parameters. It returns an error if the upload fails, or if the operation times out.

type SWUpdaterNotification

type SWUpdaterNotification map[string]string

Jump to

Keyboard shortcuts

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