bazelapi

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Execution Request & Action Result Definitions Domain structures for tracking ExecuteRequest info (use cases include Scheduler JobDefs and Worker RunCommands), ActionResult info (used in Worker RunStatuses), and conversions for internal thrift APIs.

Index

Constants

View Source
const PreconditionMissing = "MISSING"

Variables

This section is empty.

Functions

func MakeActionResultThriftFromDomain

func MakeActionResultThriftFromDomain(actionResult *ActionResult) *bazelthrift.ActionResult_

Transform domain ActionResult object into thrift representation

func MakeExecReqThriftFromDomain

func MakeExecReqThriftFromDomain(executeRequest *ExecuteRequest) *bazelthrift.ExecuteRequest

Transform domain ExecuteRequest object into request representation

Types

type ActionResult

type ActionResult struct {
	Result       *remoteexecution.ActionResult
	ActionDigest *remoteexecution.Digest
	GRPCStatus   *google_rpc_status.Status
	Cached       bool
}

Add ActionDigest again here so it's available when polling status - no ref to original request Add GoogleAPIs RPC Status here so that we can propagate detailed error statuses from the runner upwards Add Cached here so that the runner can propagate whether it used a cached result upwards

func MakeActionResultDomainFromThrift

func MakeActionResultDomainFromThrift(thriftResult *bazelthrift.ActionResult_) *ActionResult

Transform thrift Bazel ActionResult data into a domain object

func (*ActionResult) GetActionDigest

func (a *ActionResult) GetActionDigest() *remoteexecution.Digest

func (*ActionResult) GetCached

func (a *ActionResult) GetCached() bool

func (*ActionResult) GetGRPCStatus

func (a *ActionResult) GetGRPCStatus() *google_rpc_status.Status

func (*ActionResult) GetResult

func (a *ActionResult) GetResult() *remoteexecution.ActionResult

func (*ActionResult) String

func (a *ActionResult) String() string

type ExecuteRequest

type ExecuteRequest struct {
	Request           *remoteexecution.ExecuteRequest
	ExecutionMetadata *remoteexecution.ExecutedActionMetadata
	Action            *remoteexecution.Action
	Command           *remoteexecution.Command
}

Add ExecutionMetadata so metadata added in the scheduling phase is passed through to worker Not Passed Through Thrift: Add Action so worker has a place to store after fetching during invoke Add Command so worker has a place to store after fetching during invoke

func MakeExecReqDomainFromThrift

func MakeExecReqDomainFromThrift(thriftRequest *bazelthrift.ExecuteRequest) *ExecuteRequest

Transform request Bazel ExecuteRequest data into a domain object

func (*ExecuteRequest) GetAction

func (e *ExecuteRequest) GetAction() *remoteexecution.Action

Not exported to thrift

func (*ExecuteRequest) GetCommand

func (e *ExecuteRequest) GetCommand() *remoteexecution.Command

Not exported to thrift

func (*ExecuteRequest) GetExecutionMetadata

func (e *ExecuteRequest) GetExecutionMetadata() *remoteexecution.ExecutedActionMetadata

func (*ExecuteRequest) GetRequest

func (*ExecuteRequest) String

func (e *ExecuteRequest) String() string

Directories

Path Synopsis
gen-go

Jump to

Keyboard shortcuts

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