Documentation ¶
Overview ¶
Package client provides helper methods and types for communicating with the GAPIR service.
Index ¶
- Constants
- type Client
- func (client *Client) BeginReplay(ctx context.Context, conn *ConnectionKey, payload string, dependent string) error
- func (client *Client) Connect(ctx context.Context, device bind.Device, abi *device.ABI) (*ConnectionKey, error)
- func (client *Client) PrewarmReplay(ctx context.Context, conn *ConnectionKey, payload string, cleanup string) error
- func (client *Client) SetReplayExecutor(ctx context.Context, conn *ConnectionKey, executor ReplayExecutor) (func(), error)
- type ConnectionKey
- type ReplayExecutor
Constants ¶
View Source
const ( // LaunchArgsKey is the bind device property key used to control the command // line arguments when launching GAPIR. The property must be of type []string. LaunchArgsKey tyLaunchArgsKey = "gapir-launch-args" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles connections to GAPIR instances on devices. A single Client can handle multiple connections.
func (*Client) BeginReplay ¶
func (*Client) Connect ¶
func (client *Client) Connect(ctx context.Context, device bind.Device, abi *device.ABI) (*ConnectionKey, error)
Connect opens a connection to the replay device.
func (*Client) PrewarmReplay ¶
func (*Client) SetReplayExecutor ¶
func (client *Client) SetReplayExecutor(ctx context.Context, conn *ConnectionKey, executor ReplayExecutor) (func(), error)
type ConnectionKey ¶
type ConnectionKey deviceArch
ConnectionKey is used by manager to obtain a connection
type ReplayExecutor ¶
type ReplayExecutor interface { // HandlePostData handles the given post data message. HandlePostData(context.Context, *gapir.PostData) error // HandleNotification handles the given notification message. HandleNotification(context.Context, *gapir.Notification) error // HandleFinished is notified when the given replay is finished. HandleFinished(context.Context, error) error // HandleFenceReadyRequest handles when the replayer is waiting for the server // to execute the registered FenceReadyRequestCallback for the provided fence ID HandleFenceReadyRequest(context.Context, *gapir.FenceReadyRequest) error }
ReplayExecutor handles just the bits related to a specific replay.
Click to show internal directories.
Click to hide internal directories.