bzlremotecache

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BazelRemoteCache

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

BazelRemoteCache is a client of a Bazel remote cache.

func New

func New(ctx context.Context, remote string, instanceName string) (*BazelRemoteCache, error)

New creates a new client to access of a Bazel remote cache.

func (*BazelRemoteCache) Close

func (brc *BazelRemoteCache) Close()

Close closed the client of a Bazel remote cache.

func (*BazelRemoteCache) ErrorMsg

func (brc *BazelRemoteCache) ErrorMsg(err error) string

ErrorMsg returns the error message of the given error.

func (*BazelRemoteCache) GetBlob

func (brc *BazelRemoteCache) GetBlob(ctx context.Context, digest *Digest) ([]byte, error)

GetBlob returns the content of a Bazel remote cache blob.

func (*BazelRemoteCache) GetCacheResult

func (brc *BazelRemoteCache) GetCacheResult(ctx context.Context, digest string) (*remoteexecution.ActionResult, error)

GetCacheResult returns the given ActionCache stored in the Bazel remote cache.

type Digest

type Digest struct {
	Hash string
	Size int64
}

Digest contains the hash and the size of a blob.

func ParseDigestFromString

func ParseDigestFromString(s string) (*Digest, error)

ParseDigestFromString parses the given digest string following the format <hash>/<size>.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL