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.