Skip to content

Commit 184836a

Browse files
committed
Added BoardList and BoardListAll grpc client examples
1 parent b4855bc commit 184836a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

daemon/client/client.go

+23
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,29 @@ func main() {
313313
}
314314
}
315315

316+
// BOARD LIST ALL
317+
fmt.Println("=== calling BoardListAll(mkr)")
318+
boardListAllResp, err := client.BoardListAll(context.Background(), &rpc.BoardListAllReq{
319+
Instance: instance,
320+
SearchArgs: []string{"mkr"},
321+
})
322+
if err != nil {
323+
fmt.Printf("Board list-all error: %s\n", err)
324+
os.Exit(1)
325+
}
326+
fmt.Printf("---> %+v\n", boardListAllResp)
327+
fmt.Println()
328+
329+
// BOARD LIST
330+
fmt.Println("=== calling BoardList()")
331+
boardListResp, err := client.BoardList(context.Background(), &rpc.BoardListReq{Instance: instance})
332+
if err != nil {
333+
fmt.Printf("Board list error: %s\n", err)
334+
os.Exit(1)
335+
}
336+
fmt.Printf("---> %+v\n", boardListResp)
337+
fmt.Println()
338+
316339
// PLATFORM UNINSTALL
317340
fmt.Println("=== calling PlatformUninstall(arduino:samd)")
318341
uninstallRespStream, err := client.PlatformUninstall(context.Background(), &rpc.PlatformUninstallReq{

0 commit comments

Comments
 (0)