Documentation
¶
Overview ¶
Package devicelink transports update records over authenticated encryption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConfiguration = errors.New("device link: invalid configuration") ErrProtocol = errors.New("device link: invalid protocol") )
Functions ¶
func Exchange ¶
func Exchange(connection io.ReadWriter, config DeviceConfig, random io.Reader, runtime Runtime) error
Exchange runs one authenticated manager poll. The retained report is sent first, so a terminal physical-refresh result is not lost between polls.
func ServeManager ¶
func ServeManager(connection io.ReadWriter, config ManagerConfig) error
Types ¶
type DeviceConfig ¶
type DeviceConfig struct {
ID securetransport.DeviceID
Key securetransport.Key
}
type DeviceSession ¶
type DeviceSession struct {
// contains filtered or unexported fields
}
func ConnectDevice ¶
func ConnectDevice(connection io.ReadWriter, config DeviceConfig, random io.Reader) (*DeviceSession, error)
func (*DeviceSession) Generation ¶
func (s *DeviceSession) Generation() uint64
func (*DeviceSession) Report ¶
func (s *DeviceSession) Report(result *update.Result, generation uint64) error
Report sends retained state from a previous exchange before the manager decides whether a request needs delivery. A nil result means a clean boot with no retained request state.
func (*DeviceSession) SendResult ¶
func (s *DeviceSession) SendResult(result update.Result) error
type ManagerConfig ¶
Click to show internal directories.
Click to hide internal directories.