Back to godoc.org

Package internal

v0.0.0 (3e34cfb)
Latest Go to latest
Published: 3 hours ago | License: Apache-2.0 | Module: go.chromium.org/luci

Index

Package Files

func AssertUTC

func AssertUTC(t time.Time)

AssertUTC panics if t is not UTC.

func CommonPostlude

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 IsolateURL

func IsolateURL(host, ns, digest string) string

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

func Main

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

Main registers all dependencies and runs a service.

func MustGetContextHTTPClient

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

MustGetContextHTTPClient retrieves the current http.client from the context.

func ParseIsolateURL

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

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

func WithProjectTransport

func WithProjectTransport(ctx context.Context, project string) (context.Context, error)

WithProjectTransport sets an http client in the context using project-based auth transport.

func WithTestHTTPClient

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

WithTestHTTPClient sets the supplied http client in the context for testing.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier