Documentation
¶
Overview ¶
Package device provides the configured, read-only device service.
Index ¶
- type ExactIdentityVerifier
- type HTTPClient
- type IdentityVerifier
- type Service
- func (s *Service) GetCapabilities(ctx context.Context, id domain.DeviceID, runtime bool) (domain.CapabilitySnapshot, error)
- func (s *Service) GetStatus(ctx context.Context, id domain.DeviceID, detail domain.StatusDetail) (domain.DeviceStatus, error)
- func (s *Service) ListDevices(context.Context) ([]domain.Device, error)
- type ServiceConfig
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExactIdentityVerifier ¶
type ExactIdentityVerifier struct{}
ExactIdentityVerifier requires the observed hardware identity to exactly match the configured identity.
type HTTPClient ¶
type HTTPClient interface {
Origin() string
GetDeviceStatus(context.Context) (jetkvm.DeviceSetup, error)
GetDevice(context.Context) (jetkvm.LocalDevice, error)
GetCloudState(context.Context) (jetkvm.CloudState, error)
}
HTTPClient is the local HTTP observation surface used by DeviceService.
type IdentityVerifier ¶
IdentityVerifier is the single authority for checking a configured identity pin. Persistent TOFU or administratively provisioned pins can implement this contract without changing the observation service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements domain.DeviceService without opening WebRTC.
func NewService ¶
func NewService(cfg ServiceConfig) (*Service, error)
NewService validates the complete explicit inventory before publishing it.
func (*Service) GetCapabilities ¶
func (s *Service) GetCapabilities(ctx context.Context, id domain.DeviceID, runtime bool) (domain.CapabilitySnapshot, error)
GetCapabilities reports only capabilities established by the HTTP-only implementation and explicit device configuration.
type ServiceConfig ¶
type ServiceConfig struct {
Targets []Target
IdentityVerifier IdentityVerifier
Now func() time.Time
}
ServiceConfig configures the read-only device authority.
type Target ¶
type Target struct {
Device domain.Device
Client HTTPClient
}
Target binds an explicitly configured device to its protocol client.