luci-go: Index | Files

package internal

import ""

Package internal is supporting code used by server.go.


Package Files

doc.go pprof.go rediscache.go trace.go tracesampler.go

func EnableOpenCensusTracing Uses

func EnableOpenCensusTracing()

EnableOpenCensusTracing installs OpenCensus as a tracing backend for LUCI packages.

func Sampler Uses

func Sampler(spec string) (trace.Sampler, error)

Sampler constructs an object that decides how often to sample traces.

The spec is a string in one of the forms:

* `X%` - to sample approximately X percent of requests.
* `Xqps` - to produce approximately X samples per second.

Returns an error if the spec can't be parsed.

type RedisBlobCache Uses

type RedisBlobCache struct {
    Prefix string // prefix to prepend to keys

RedisBlobCache implements caching.BlobCache using Redis.

func (*RedisBlobCache) Get Uses

func (rc *RedisBlobCache) Get(ctx context.Context, key string) (blob []byte, err error)

Get returns a cached item or ErrCacheMiss if it's not in the cache.

func (*RedisBlobCache) Set Uses

func (rc *RedisBlobCache) Set(ctx context.Context, key string, value []byte, exp time.Duration) (err error)

Set unconditionally overwrites an item in the cache.

If 'exp' is zero, the item will have no expiration time.

Package internal imports 19 packages (graph). Updated 2020-01-18. Refresh now. Tools for package owners.