Documentation ¶
Overview ¶
Bazel Remote Execution API gRPC
Index ¶
- Constants
- func DigestFromSnapshotID(id string) (*remoteexecution.Digest, error)
- func DigestFromString(s string) (*remoteexecution.Digest, error)
- func DigestStoreName(digest *remoteexecution.Digest) string
- func DigestToStr(d *remoteexecution.Digest) string
- func DigestsEqual(a, b *remoteexecution.Digest) bool
- func EmptyDigest() *remoteexecution.Digest
- func GetShaAndSize(id string) (string, int64, error)
- func IsEmptyDigest(d *remoteexecution.Digest) bool
- func IsValidDigest(hash string, size int64) bool
- func SnapshotID(sha string, size int64) string
- func SnapshotIDFromDigest(d *remoteexecution.Digest) string
- func ValidateID(id string) error
- type GRPCConfig
- type GRPCServer
- type TapLimiter
Constants ¶
const ( // Instance-related constants DefaultInstanceName = "" // Resource storage-related constants StorePrefix = "blob" // Snapshot-related constants SnapshotIDPrefix = "bz" InvalidIDMsg = "Expected ID to be of format bz-<sha256>-<sizeBytes>, was" // Nil-data/Empty SHA-256 data EmptySha = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" EmptySize = int64(0) // GRPC Server connection-related setting limits (defaults) MaxSimultaneousConnections = 0 // limits total simultaneous connections via the Listener MaxRequestsPerSecond = 0 // limits total incoming requests allowed per second MaxRequestsBurst = 0 // allows this many requests in a burst faster than MaxRPS average MaxConcurrentStreams = 0 // limits concurrent streams _per client_ MaxConnIdleMins = 1 // limits open idle connections before the server closes them // Batch API max combined blobs inlined request size BatchMaxCombinedSize = 10 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func DigestFromSnapshotID ¶
func DigestFromSnapshotID(id string) (*remoteexecution.Digest, error)
Get a remoteexecution Digest from SnapshotID
func DigestFromString ¶
func DigestFromString(s string) (*remoteexecution.Digest, error)
Create a Digest from a proprietary string format: "<hash>/<size>". Returns a Digest if parsed and validated, or an error.
func DigestStoreName ¶
func DigestStoreName(digest *remoteexecution.Digest) string
Translate a Bazel Digest into a unique resource name for use in a bundleStore Only use hash in store name, size is dropped
func DigestToStr ¶
func DigestToStr(d *remoteexecution.Digest) string
func DigestsEqual ¶
func DigestsEqual(a, b *remoteexecution.Digest) bool
func EmptyDigest ¶
func EmptyDigest() *remoteexecution.Digest
func GetShaAndSize ¶
Get sha and size components from valid bazel SnapshotID
func IsEmptyDigest ¶
func IsEmptyDigest(d *remoteexecution.Digest) bool
func IsValidDigest ¶
Validate Digest hash and size components assuming SHA256 Size -1 indicates unknown size to support certain size-less operations
- this is a deviation from the public API
func SnapshotID ¶
Generate a SnapshotID based on digest sha and size
func SnapshotIDFromDigest ¶
func SnapshotIDFromDigest(d *remoteexecution.Digest) string
Generate a SnapshotID directly from a Digest
Types ¶
type GRPCConfig ¶
type GRPCConfig struct { GRPCAddr string // Required: ip:port the Listener will bind to ListenerMaxConns int // Maximum simultaneous connections the listener will accept RateLimitPerSec int // Maximum incoming requests per second BurstLimitPerSec int // Maximum per-burst incoming requests per second (within RateLimitPerSec) ConcurrentStreams int // Maximum concurrent GRPC streams allowed per client MaxConnIdleMins int // Maximum time a connection can remain open until the server closes it ConcurrentReqSize int64 // Size of resources used in concurrent requests, in bytes (Internal usage) }
GRPCConfig holds fields used for configuring startup of GRPC Listeners and Servers Zero value integer fields are interpretted as unlimited
func (*GRPCConfig) NewGRPCServer ¶
func (c *GRPCConfig) NewGRPCServer() *grpc.Server
Creates a new *grpc.Server configured with ServerOptions based on the GRPCConfig fields
func (*GRPCConfig) NewListener ¶
func (c *GRPCConfig) NewListener() (net.Listener, error)
Creates a new net.Listener with the configured address and limits
type GRPCServer ¶
type GRPCServer interface {
Serve() error
}
gRPC server interface encapsulating gRPC operations and execution server, intended to reduce gRPC listener and registration boilerplate.
type TapLimiter ¶
type TapLimiter struct {
// contains filtered or unexported fields
}
Encapsulates a rate-per-second limiter that will check all incoming requests (per-connection goroutine) Handle func Fulfills grpc/tap.ServerInHandle
func NewTap ¶
func NewTap(maxRequests, maxBurst int) *TapLimiter
Create a new TapLimiter with specified rate and burst allowance
Directories ¶
Path | Synopsis |
---|---|
Bazel Remote Execution API gRPC server Contains limited implementation of the ContentAddressableStore API interface
|
Bazel Remote Execution API gRPC server Contains limited implementation of the ContentAddressableStore API interface |
mock_bytestream
Package mock_bytestream is a generated GoMock package.
|
Package mock_bytestream is a generated GoMock package. |
mock_connection
Package mock_connection is a generated GoMock package.
|
Package mock_connection is a generated GoMock package. |
Bazel Remote Execution API gRPC server Contains limited implementation of the Execution API interface
|
Bazel Remote Execution API gRPC server Contains limited implementation of the Execution API interface |
bazelapi
Execution Request & Action Result Definitions Domain structures for tracking ExecuteRequest info (use cases include Scheduler JobDefs and Worker RunCommands), ActionResult info (used in Worker RunStatuses), and conversions for internal thrift APIs.
|
Execution Request & Action Result Definitions Domain structures for tracking ExecuteRequest info (use cases include Scheduler JobDefs and Worker RunCommands), ActionResult info (used in Worker RunStatuses), and conversions for internal thrift APIs. |
mock_longrunning
Package mock_longrunning is a generated GoMock package.
|
Package mock_longrunning is a generated GoMock package. |
mock_remoteexecution
Package mock_remoteexecution is a generated GoMock package.
|
Package mock_remoteexecution is a generated GoMock package. |