Documentation ¶
Overview ¶
Package fakedutserver provides a fake implementation of the DUT service.
Index ¶
- func Start(t *testing.T, opts ...Option) (stopFunc func(), addr string)
- type DutServiceServer
- func (s *DutServiceServer) Cache(ctx context.Context, req *api.CacheRequest) (*longrunning.Operation, error)
- func (s *DutServiceServer) CancelOperation(ctx context.Context, req *longrunning.CancelOperationRequest) (*empty.Empty, error)
- func (s *DutServiceServer) DeleteOperation(ctx context.Context, req *longrunning.DeleteOperationRequest) (*empty.Empty, error)
- func (s *DutServiceServer) DetectDeviceConfigId(req *api.DetectDeviceConfigIdRequest, ...) error
- func (s *DutServiceServer) ExecCommand(req *api.ExecCommandRequest, stream api.DutService_ExecCommandServer) error
- func (s *DutServiceServer) FetchCrashes(req *api.FetchCrashesRequest, stream api.DutService_FetchCrashesServer) error
- func (s *DutServiceServer) ForceReconnect(ctx context.Context, req *api.ForceReconnectRequest) (*longrunning.Operation, error)
- func (s *DutServiceServer) GetOperation(ctx context.Context, req *longrunning.GetOperationRequest) (*longrunning.Operation, error)
- func (s *DutServiceServer) ListOperations(ctx context.Context, req *longrunning.ListOperationsRequest) (*longrunning.ListOperationsResponse, error)
- func (s *DutServiceServer) Restart(ctx context.Context, req *api.RestartRequest) (*longrunning.Operation, error)
- func (s *DutServiceServer) WaitOperation(ctx context.Context, req *longrunning.WaitOperationRequest) (*longrunning.Operation, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DutServiceServer ¶
type DutServiceServer struct { api.UnimplementedDutServiceServer longrunning.UnimplementedOperationsServer // contains filtered or unexported fields }
DutServiceServer is a fake implementation of api.DutService and longrunning.UnimplementedOperationsServer for Cache.
func New ¶
func New(opts ...Option) *DutServiceServer
New constructs a new DutServiceServer from given options. The caller is responsible for calling Shutdown() of the returned object.
func (*DutServiceServer) Cache ¶
func (s *DutServiceServer) Cache(ctx context.Context, req *api.CacheRequest) (*longrunning.Operation, error)
Cache implements api.DutServiceServer.Cache
func (*DutServiceServer) CancelOperation ¶
func (s *DutServiceServer) CancelOperation(ctx context.Context, req *longrunning.CancelOperationRequest) (*empty.Empty, error)
CancelOperation implements longrunning.CancelOperation.
func (*DutServiceServer) DeleteOperation ¶
func (s *DutServiceServer) DeleteOperation(ctx context.Context, req *longrunning.DeleteOperationRequest) (*empty.Empty, error)
DeleteOperation implements longrunning.CancelOperation.
func (*DutServiceServer) DetectDeviceConfigId ¶
func (s *DutServiceServer) DetectDeviceConfigId( req *api.DetectDeviceConfigIdRequest, stream api.DutService_DetectDeviceConfigIdServer) error
DetectDeviceConfigId implements api.DutServiceServer.DetectDeviceConfigId.
func (*DutServiceServer) ExecCommand ¶
func (s *DutServiceServer) ExecCommand(req *api.ExecCommandRequest, stream api.DutService_ExecCommandServer) error
ExecCommand implements api.DutServiceServer.ExecCommand.
func (*DutServiceServer) FetchCrashes ¶
func (s *DutServiceServer) FetchCrashes(req *api.FetchCrashesRequest, stream api.DutService_FetchCrashesServer) error
FetchCrashes implements api.DutServiceServer.FetchCrashes.
func (*DutServiceServer) ForceReconnect ¶
func (s *DutServiceServer) ForceReconnect(ctx context.Context, req *api.ForceReconnectRequest) (*longrunning.Operation, error)
ForceReconnect implements api.ForceReconnect.
func (*DutServiceServer) GetOperation ¶
func (s *DutServiceServer) GetOperation(ctx context.Context, req *longrunning.GetOperationRequest) (*longrunning.Operation, error)
GetOperation implements longrunning.GetOperation.
func (*DutServiceServer) ListOperations ¶
func (s *DutServiceServer) ListOperations(ctx context.Context, req *longrunning.ListOperationsRequest) (*longrunning.ListOperationsResponse, error)
ListOperations implements longrunning.ListOperations.
func (*DutServiceServer) Restart ¶
func (s *DutServiceServer) Restart(ctx context.Context, req *api.RestartRequest) (*longrunning.Operation, error)
Restart implements api.DutServiceServer.FetchCrashes.
func (*DutServiceServer) WaitOperation ¶
func (s *DutServiceServer) WaitOperation(ctx context.Context, req *longrunning.WaitOperationRequest) (*longrunning.Operation, error)
WaitOperation implements longrunning.WaitOperation.