mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
feat(driver): expose Snapshot on DeviceDriver and sidecar client
Snapshot wraps the new atomic-snapshot gRPC: the runner gets hierarchy and screenshot from one round-trip whose two reads are serialized on the sidecar side.
This commit is contained in:
1 parent
8f29c63d12
commit
c11beb1728
2 files changed
+22
No files matched your search
@@ -22,6 +22,11 @@ type DeviceDriver interface {
|
||||
|
||||
Hierarchy(ctx context.Context) (string, error)
|
||||
Screenshot(ctx context.Context) (Image, error)
|
||||
// Snapshot returns the hierarchy and screenshot captured back-to-back
|
||||
// under a backend-side mutex, so the pair describes the same on-device
|
||||
// frame. Prefer this over calling Hierarchy and Screenshot separately:
|
||||
// independent reads can land on different frames during transitions.
|
||||
Snapshot(ctx context.Context) (string, Image, error)
|
||||
// RecentLogs returns log entries at or after `since`, filtered to
|
||||
// `minLevel` or above. An empty minLevel defaults to "E".
|
||||
RecentLogs(ctx context.Context, since time.Time, minLevel string) ([]LogEntry, error)
|
||||
|
||||
Reference in new issue
Block a user