Documentation
¶
Overview ¶
Package testpeer supplies real control transports around a scripted executor for integration tests. The scripts choose application responses; negotiation, metadata, admission and transport lifetime remain production implementations.
Index ¶
- type Control
- type ExecutorState
- func (s ExecutorState) OnAbort(ctx context.Context, _ controlsession.Binding, r *pb.AbortRequest) (*pb.AbortResponse, error)
- func (s ExecutorState) OnBandwidth(ctx context.Context, _ controlsession.Binding, r *pb.BandwidthRequest) (*pb.BandwidthResponse, error)
- func (s ExecutorState) OnHello(ctx context.Context, r *pb.HelloRequest) (*pb.HelloResponse, error)
- func (s ExecutorState) OnInspectRetainedRun(ctx context.Context, _ controlsession.Binding, r *pb.InspectRetainedRunRequest) (*pb.InspectRetainedRunResponse, error)
- func (s ExecutorState) OnUpload(ctx context.Context, _ controlsession.Binding, r *pb.UploadRequest) (*pb.UploadResponse, error)
- func (s ExecutorState) OnVerifyTags(ctx context.Context, _ controlsession.Binding, r *pb.VerifyTagsRequest) (*pb.VerifyTagsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control struct {
Client *erpc.BidiClient
// contains filtered or unexported fields
}
Control owns separate loopback direct and reverse listeners and one actual executor client. Startup readiness is deliberately observed by the caller with its separate registration deadline.
func Start ¶
func Start(ctx context.Context, bidi *drpc.BidiServer, service pb.ExecutorServiceServer) (*Control, error)
type ExecutorState ¶
type ExecutorState struct{ Service pb.ExecutorServiceServer }
func (ExecutorState) OnAbort ¶
func (s ExecutorState) OnAbort(ctx context.Context, _ controlsession.Binding, r *pb.AbortRequest) (*pb.AbortResponse, error)
func (ExecutorState) OnBandwidth ¶
func (s ExecutorState) OnBandwidth(ctx context.Context, _ controlsession.Binding, r *pb.BandwidthRequest) (*pb.BandwidthResponse, error)
func (ExecutorState) OnHello ¶
func (s ExecutorState) OnHello(ctx context.Context, r *pb.HelloRequest) (*pb.HelloResponse, error)
func (ExecutorState) OnInspectRetainedRun ¶ added in v0.3.0
func (s ExecutorState) OnInspectRetainedRun(ctx context.Context, _ controlsession.Binding, r *pb.InspectRetainedRunRequest) (*pb.InspectRetainedRunResponse, error)
func (ExecutorState) OnUpload ¶
func (s ExecutorState) OnUpload(ctx context.Context, _ controlsession.Binding, r *pb.UploadRequest) (*pb.UploadResponse, error)
func (ExecutorState) OnVerifyTags ¶ added in v0.3.0
func (s ExecutorState) OnVerifyTags(ctx context.Context, _ controlsession.Binding, r *pb.VerifyTagsRequest) (*pb.VerifyTagsResponse, error)
OnVerifyTags forwards a pre-disclosure verification query to the script.
Click to show internal directories.
Click to hide internal directories.