bep

package
v1.501.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectBESBackend

func InjectBESBackend(ctx context.Context, besBackend BESBackend) context.Context

InjectBESBackend injects the given BESBackend into the context.

Types

type BESBackend

type BESBackend interface {
	Setup(opts ...grpc.ServerOption) error
	ServeWait(ctx context.Context) error
	GracefulStop()
	Addr() string
	RegisterSubscriber(callback CallbackFn)
	Errors() []error
}

BESBackend implements a Build Event Protocol backend to be passed to the `bazel build` command so that the Aspect plugins can register as subscribers to the build events. TODO(f0rmiga): implement a forwarding client to an upstream BES backend if the user provides one to the `aspect build` command.

func BESBackendFromContext

func BESBackendFromContext(ctx context.Context) BESBackend

BESBackendFromContext extracts a BESBackend from the given context. It panics if the context doesn't have a BESBackend set up.

func NewBESBackend

func NewBESBackend() BESBackend

NewBESBackend creates a new Build Event Protocol backend.

type CallbackFn

type CallbackFn func(*buildeventstream.BuildEvent) error

CallbackFn is the signature for the callback function used by the subscribers of the Build Event Protocol events.

Directories

Path Synopsis
Package mock contains generated files.
Package mock contains generated files.

Jump to

Keyboard shortcuts

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