rpc

package
v0.0.0-...-d046166 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package rpc provides gRPC utilities for Tast tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client = rpc.Client

Client owns a gRPC connection to the DUT for remote tests to use.

func Dial

func Dial(ctx context.Context, d *dut.DUT, h *testing.RPCHint, bundleName string) (*Client, error)

Dial establishes a gRPC connection to the test bundle executable named bundleName using d and h.

Example:

cl, err := rpc.Dial(ctx, d, s.RPCHint(), "cros")
if err != nil {
	return err
}
defer cl.Close(ctx)

fs := base.NewFileSystemClient(cl.Conn)

res, err := fs.ReadDir(ctx, &base.ReadDirRequest{Dir: "/mnt/stateful_partition"})
if err != nil {
	return err
}

Jump to

Keyboard shortcuts

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