Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FireDoneTimeout is how long fireDone will wait for both sending and receiving. FireDoneTimeout = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func WithClients ¶
func WithClients( transportType testutils.TransportType, keyValueYarpcServer examplepb.KeyValueYarpcServer, sinkYarpcServer examplepb.SinkYarpcServer, f func(*Clients) error, ) error
WithClients calls f on the Clients.
Types ¶
type Clients ¶
type Clients struct { KeyValueYarpcClient examplepb.KeyValueYarpcClient SinkYarpcClient examplepb.SinkYarpcClient KeyValueGRPCClient examplepb.KeyValueClient SinkGRPCClient examplepb.SinkClient }
Clients holds all clients.
type KeyValueYarpcServer ¶
KeyValueYarpcServer implements examplepb.KeyValueYarpcServer.
func NewKeyValueYarpcServer ¶
func NewKeyValueYarpcServer() *KeyValueYarpcServer
NewKeyValueYarpcServer returns a new KeyValueYarpcServer.
func (*KeyValueYarpcServer) GetValue ¶
func (k *KeyValueYarpcServer) GetValue(ctx context.Context, request *examplepb.GetValueRequest) (*examplepb.GetValueResponse, error)
GetValue implements GetValue.
func (*KeyValueYarpcServer) SetValue ¶
func (k *KeyValueYarpcServer) SetValue(ctx context.Context, request *examplepb.SetValueRequest) (*examplepb.SetValueResponse, error)
SetValue implements SetValue.
type SinkYarpcServer ¶
SinkYarpcServer implements examplepb.SinkYarpcServer.
func NewSinkYarpcServer ¶
func NewSinkYarpcServer(withFireDone bool) *SinkYarpcServer
NewSinkYarpcServer returns a new SinkYarpcServer.
func (*SinkYarpcServer) Fire ¶
func (s *SinkYarpcServer) Fire(ctx context.Context, request *examplepb.FireRequest) error
Fire implements Fire.
func (*SinkYarpcServer) Values ¶
func (s *SinkYarpcServer) Values() []string
Values returns a copy of the values that have been fired.
func (*SinkYarpcServer) WaitFireDone ¶
func (s *SinkYarpcServer) WaitFireDone() error
WaitFireDone blocks until a fire is done, if withFireDone is set.
If will timeout after FireDoneTimeout and return error.
Click to show internal directories.
Click to hide internal directories.