Documentation ¶
Index ¶
- func BadResponse(ctx context.Context, body map[string]interface{}) (map[string]interface{}, error)
- func EchoJSON(ctx context.Context, body map[string]interface{}) (map[string]interface{}, error)
- func EchoRaw(ctx context.Context, body []byte) ([]byte, error)
- func Sleep(ctx context.Context, body interface{}) (interface{}, error)
- func SleepRaw(ctx context.Context, body []byte) ([]byte, error)
- func Start()
- func Stop()
- func UnexpectedError(ctx context.Context, body interface{}) (interface{}, error)
- func WaitForTimeoutRaw(ctx context.Context, body []byte) ([]byte, error)
- type EchoProtobuf
- type EchoThrift
- type HTTPTransport
- type PhoneRequest
- type PhoneResponse
- type TChannelTransport
- type TransportConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadResponse ¶
BadResponse returns an object that's not a valid JSON response.
func UnexpectedError ¶
UnexpectedError fails with an unexpected error.
func WaitForTimeoutRaw ¶
WaitForTimeoutRaw waits after the context deadline then returns the context error. yarpc should interpret this as an handler timeout, which in turns should be forwarded to the yarpc client as a remote handler timeout.
Types ¶
type EchoProtobuf ¶ added in v1.8.0
type EchoProtobuf struct{}
EchoProtobuf implements the Protobuf Echo service.
func (EchoProtobuf) Echo ¶ added in v1.8.0
func (EchoProtobuf) Echo(_ context.Context, request *crossdockpb.Ping) (*crossdockpb.Pong, error)
Echo implements the Echo function for the Protobuf Echo service.
type HTTPTransport ¶
HTTPTransport contains information about an HTTP transport.
type PhoneRequest ¶
type PhoneRequest struct { Service string `json:"service"` Procedure string `json:"procedure"` Transport TransportConfig `json:"transport"` Body *js.RawMessage `json:"body"` }
PhoneRequest is a request to make another request to a different service.
type PhoneResponse ¶
type PhoneResponse struct { Service string `json:"service"` Procedure string `json:"procedure"` Body *js.RawMessage `json:"body"` }
PhoneResponse is the response of a Phone request.
func Phone ¶
func Phone(ctx context.Context, body *PhoneRequest) (*PhoneResponse, error)
Phone implements the phone procedure
type TChannelTransport ¶
TChannelTransport contains information about a TChannel transport.
type TransportConfig ¶
type TransportConfig struct { HTTP *HTTPTransport `json:"http"` TChannel *TChannelTransport `json:"tchannel"` }
TransportConfig contains the transport configuration for the phone request.