Documentation ¶
Overview ¶
Package exec provides goma exec service implementation.
Index ¶
- Constants
- Variables
- func RecordAPIError(ctx context.Context, resp *gomapb.ExecResp) error
- func RecordRequesterInfo(ctx context.Context, reqInfo *gomapb.RequesterInfo) error
- type Client
- type Inventory
- func (in *Inventory) Configure(ctx context.Context, cfgs *cmdpb.ConfigResp) error
- func (in *Inventory) Pick(ctx context.Context, req *gomapb.ExecReq, resp *gomapb.ExecResp) (*cmdpb.Config, []*cmdpb.FileSpec, error)
- func (in *Inventory) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (in *Inventory) VersionID() string
Constants ¶
const DefaultMaxReqMsgSize = 64 * 1024 * 1024
DefaultMaxReqMsgSize is max request message size for exec serivce. exec server may recieve (exec client may send) > 45MB if there are many embedded content. request from gce staging bot, 45MB is used. 64MB might not be sufficient enough. grpc's default is 4MB.
const DefaultMaxRespMsgSize = 6 * 1024 * 1024
DefaultMaxRespMsgSize is max response size of exec service. exec server may send (exec client may receive) > 4MB. e.g. 2 outputs may close to 2MB (*.o, *.dwo) + other outputs (*.o.d, stdout, stderr). http://b/79554706 grpc's default is 4MB.
Variables ¶
var ( // DefaultToolchainViews are the default views provided by this package. // You need to register the view for data to actually be collected. DefaultToolchainViews = []*view.View{ { Description: `counts toolchain selection. result is "used", "found", "requested" or "missed"`, TagKeys: []tag.Key{ selectorKey, resultKey, }, Measure: toolchainSelects, Aggregation: view.Count(), }, } )
var ( // DefaultViews are the default views provided by this package. // You need to register the view for data to actually be collected. DefaultViews = []*view.View{ { Description: "exec request api-error", TagKeys: []tag.Key{ apiErrorKey, }, Measure: apiErrors, Aggregation: view.Count(), }, { Description: "exec request client retry", TagKeys: []tag.Key{ clientRetryKey, }, Measure: clientRetries, Aggregation: view.Count(), }, { Description: `counts toolchain selection. result is "used", "found", "requested" or "missed"`, TagKeys: []tag.Key{ selectorKey, resultKey, }, Measure: toolchainSelects, Aggregation: view.Count(), }, } )
Functions ¶
func RecordAPIError ¶
RecordAPIError records api-error in resp.
func RecordRequesterInfo ¶ added in v0.0.17
func RecordRequesterInfo(ctx context.Context, reqInfo *gomapb.RequesterInfo) error
RecordRequesterInfo records requester info. e.g. client retry count.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client to access exec service via gRPC.
type Inventory ¶
type Inventory struct {
// contains filtered or unexported fields
}
Inventory holds available command configs.
func (*Inventory) Pick ¶
func (in *Inventory) Pick(ctx context.Context, req *gomapb.ExecReq, resp *gomapb.ExecResp) (*cmdpb.Config, []*cmdpb.FileSpec, error)
Pick picks command and subprograms requested in req, and returns config, selector and commands' FileSpec. It also update resp.Result about compiler selection.