server: go.chromium.org/goma/server/exec Index | Files

package exec

import "go.chromium.org/goma/server/exec"

Package exec provides goma exec service implementation.

Index

Package Files

client.go doc.go inventory.go stats.go

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{
        &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{
        &view.View{
            Description: "exec request api-error",
            TagKeys: []tag.Key{
                apiErrorKey,
            },
            Measure:     apiErrors,
            Aggregation: view.Count(),
        },
        &view.View{
            Description: `counts toolchain selection. result is "used", "found", "requested" or "missed"`,
            TagKeys: []tag.Key{
                selectorKey,
                resultKey,
            },
            Measure:     toolchainSelects,
            Aggregation: view.Count(),
        },
    }
)

func RecordAPIError Uses

func RecordAPIError(ctx context.Context, resp *gomapb.ExecResp) error

RecordAPIError records api-error in resp.

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client is a client to access exec service via gRPC.

func NewClient Uses

func NewClient(address string, opts ...grpc.DialOption) Client

NewClient creates new client to access exec service serving on address.

func (Client) Exec Uses

func (c Client) Exec(ctx context.Context, in *gomapb.ExecReq, opts ...grpc.CallOption) (*gomapb.ExecResp, error)

Exec handles goma Exec requests.

type Inventory Uses

type Inventory struct {
    // contains filtered or unexported fields
}

Inventory holds available command configs.

func (*Inventory) Configure Uses

func (in *Inventory) Configure(ctx context.Context, cfgs *cmdpb.ConfigResp) (int, error)

Configure sets config in the inventory.

func (*Inventory) Pick Uses

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.

func (*Inventory) ServeHTTP Uses

func (in *Inventory) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Inventory) VersionID Uses

func (in *Inventory) VersionID() string

Package exec imports 22 packages (graph) and is imported by 3 packages. Updated 2019-05-20. Refresh now. Tools for package owners.