luci: go.chromium.org/luci/resultdb/internal Index | Files | Directories

package internal

import "go.chromium.org/luci/resultdb/internal"

Index

Package Files

common.go isolate.go main.go realm.go

func CommonPostlude Uses

func CommonPostlude(ctx context.Context, methodName string, rsp proto.Message, err error) error

CommonPostlude must be used as a postlude in all ResultDB services.

Extracts a status using appstatus and returns to the requester. If the error is internal or unknown, logs the stack trace.

func CommonPrelude Uses

func CommonPrelude(ctx context.Context, methodName string, req proto.Message) (context.Context, error)

CommonPrelude must be used as a prelude in all ResultDB services. Verifies access.

func GRPCifyAndLog Uses

func GRPCifyAndLog(ctx context.Context, err error) error

GRPCifyAndLog converts the error to a GRPC error and potentially logs it.

func HTTPClient Uses

func HTTPClient(ctx context.Context) *http.Client

HTTPClient retrieves the current http.client from the context.

func IsolateURL Uses

func IsolateURL(host, ns, digest string) string

IsolateURL returns a machine-readable URL for an isolated object.

func Main Uses

func Main(init func(srv *server.Server) error)

Main runs a service.

Registers -spanner-database flag and initializes a Spanner client.

func ParseIsolateURL Uses

func ParseIsolateURL(s string) (host, ns, digest string, err error)

ParseIsolateURL parses an isolate URL. It is a reverse of IsolateURL.

func ParseRealm Uses

func ParseRealm(realm string) (project, realmID string, err error)

ParseRealm returns LUCI project and ID of a realm.

func WithHTTPClient Uses

func WithHTTPClient(ctx context.Context, client *http.Client) context.Context

WithHTTPClient returns a context with the client embedded.

Directories

PathSynopsis
appstatusPackage appstatus can attach/reterieve an application-specific response status to/from an error.
backend
pagination
proto
recorderPackage recorder implements a binary that hosts luci.resultdb.rpc.v1.Recorder service.
recorder/chromium
recorder/chromium/formats
recorder/chromium/util
spanPackage span contains utility functions to interact with the underlying Spanner storage.
span/spantestPackage spantest contains tests for package span.
tasksPackage tasks implements asynchronous invocation processing.
testutil
usercontentPackage usercontent can serve user content via plain HTTP securely.

Package internal imports 18 packages (graph) and is imported by 7 packages. Updated 2020-01-29. Refresh now. Tools for package owners.