Documentation
¶
Index ¶
- func BESErrors(ctx context.Context) []error
- func HasBESInterceptor(ctx context.Context) bool
- func HasInterceptor(ctx context.Context) bool
- func InjectBESInterceptor(ctx context.Context, besInterceptor BESInterceptor) context.Context
- type BESBackend
- type BESInterceptor
- type BESPipeInterceptor
- type CallbackFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasBESInterceptor ¶
func HasInterceptor ¶
func InjectBESInterceptor ¶
func InjectBESInterceptor(ctx context.Context, besInterceptor BESInterceptor) context.Context
InjectBESInterceptor injects the given BESInterceptor into the context.
Types ¶
type BESBackend ¶
type BESBackend interface {
BESInterceptor
Addr() string
Setup(opts ...grpc.ServerOption) 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.
func NewBESBackend ¶
func NewBESBackend() BESBackend
NewBESBackend creates a new Build Event Protocol backend.
type BESInterceptor ¶
type BESInterceptor interface {
// Start anything needed in the background for the lifetime of the interceptor.
ServeWait(ctx context.Context) error
// Stop and cleanup.
GracefulStop()
// Args added to the bazel command line.
Args() []string
Errors() []error
RegisterBesProxy(ctx context.Context, p besproxy.BESProxy)
RegisterSubscriber(callback CallbackFn, multiThreaded bool)
}
func BESInterceptorFromContext ¶
func BESInterceptorFromContext(ctx context.Context) BESInterceptor
InjectBESInterceptor injects the given BESInterceptor into the context.
type BESPipeInterceptor ¶
type BESPipeInterceptor interface {
BESInterceptor
Setup() error
}
func NewBESPipe ¶
func NewBESPipe(buildId, invocationId string) (BESPipeInterceptor, error)
type CallbackFn ¶
type CallbackFn func(*buildeventstream.BuildEvent, int64, string) error
CallbackFn is the signature for the callback function used by the subscribers of the Build Event Protocol events.
Click to show internal directories.
Click to hide internal directories.