Documentation ¶
Index ¶
- Constants
- type FooYARPCServer
- func (f *FooYARPCServer) EchoBoth(server examplepb.FooServiceEchoBothYARPCServer) error
- func (f *FooYARPCServer) EchoIn(request *examplepb.EchoInRequest, server examplepb.FooServiceEchoInYARPCServer) error
- func (f *FooYARPCServer) EchoOut(server examplepb.FooServiceEchoOutYARPCServer) (*examplepb.EchoOutResponse, error)
- type KeyValueYARPCServer
- func (k *KeyValueYARPCServer) GetValue(ctx context.Context, request *examplepb.GetValueRequest) (*examplepb.GetValueResponse, error)
- func (k *KeyValueYARPCServer) SetNextError(err error)
- func (k *KeyValueYARPCServer) SetValue(ctx context.Context, request *examplepb.SetValueRequest) (*examplepb.SetValueResponse, error)
- type SinkYARPCServer
Constants ¶
const ( // FireDoneTimeout is how long fireDone will wait for both sending and receiving. FireDoneTimeout = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FooYARPCServer ¶
type FooYARPCServer struct {
// contains filtered or unexported fields
}
FooYARPCServer implements examplepb.FooYARPCServer.
func NewFooYARPCServer ¶
func NewFooYARPCServer(expectedHeaders transport.Headers) *FooYARPCServer
NewFooYARPCServer returns a new FooYARPCServer.
func (*FooYARPCServer) EchoBoth ¶
func (f *FooYARPCServer) EchoBoth(server examplepb.FooServiceEchoBothYARPCServer) error
EchoBoth immediately echos a request back to the client.
func (*FooYARPCServer) EchoIn ¶
func (f *FooYARPCServer) EchoIn(request *examplepb.EchoInRequest, server examplepb.FooServiceEchoInYARPCServer) error
EchoIn echos a series of requests back on a stream.
func (*FooYARPCServer) EchoOut ¶
func (f *FooYARPCServer) EchoOut(server examplepb.FooServiceEchoOutYARPCServer) (*examplepb.EchoOutResponse, error)
EchoOut reads from a stream and echos all requests in the response.
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) SetNextError ¶
func (k *KeyValueYARPCServer) SetNextError(err error)
SetNextError sets the error to return on the next call to KeyValueYARPCServer.
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.