package raw
import "github.com/uber/tchannel-go/raw"
Index ¶
- Variables
- func Call(ctx context.Context, ch *tchannel.Channel, hostPort string, serviceName, method string, arg2, arg3 []byte) ([]byte, []byte, *tchannel.OutboundCallResponse, error)
- func CallSC(ctx context.Context, sc *tchannel.SubChannel, method string, arg2, arg3 []byte) ( []byte, []byte, *tchannel.OutboundCallResponse, error)
- func ReadArgsV2(r tchannel.ArgReadable) ([]byte, []byte, error)
- func Wrap(handler Handler) tchannel.Handler
- func WriteArgs(call *tchannel.OutboundCall, arg2, arg3 []byte) ([]byte, []byte, *tchannel.OutboundCallResponse, error)
- func WriteResponse(response *tchannel.InboundCallResponse, resp *Res) error
- type Args
- type CArgs
- type CRes
- type Handler
- type Res
Variables ¶
ErrAppError is returned if the application sets an error response.
Functions ¶
func Call ¶
func Call(ctx context.Context, ch *tchannel.Channel, hostPort string, serviceName, method string, arg2, arg3 []byte) ([]byte, []byte, *tchannel.OutboundCallResponse, error)
Call makes a call to the given hostPort with the given arguments and returns the response args.
func CallSC ¶
func CallSC(ctx context.Context, sc *tchannel.SubChannel, method string, arg2, arg3 []byte) ( []byte, []byte, *tchannel.OutboundCallResponse, error)
CallSC makes a call using the given subcahnnel
func ReadArgsV2 ¶
ReadArgsV2 reads arg2 and arg3 from a reader.
func Wrap ¶
func Wrap(handler Handler) tchannel.Handler
Wrap wraps a Handler as a tchannel.Handler that can be passed to tchannel.Register.
func WriteArgs ¶
func WriteArgs(call *tchannel.OutboundCall, arg2, arg3 []byte) ([]byte, []byte, *tchannel.OutboundCallResponse, error)
WriteArgs writes the given arguments to the call, and returns the response args.
func WriteResponse ¶
WriteResponse writes the given Res to the InboundCallResponse.
Types ¶
type Args ¶
Args parses the arguments from an incoming call req.
func ReadArgs ¶
ReadArgs reads the *Args from the given call.
type CArgs ¶
CArgs are the call arguments passed to CallV2.
type CRes ¶
CRes is the result of making a call.
func CallV2 ¶
CallV2 makes a call and does not attempt any retries.
type Handler ¶
type Handler interface { // Handle is called on incoming calls, and contains all the arguments. // If an error is returned, it will set ApplicationError Arg3 will be the error string. Handle(ctx context.Context, args *Args) (*Res, error) OnError(ctx context.Context, err error) }
Handler is the interface for a raw handler.
type Res ¶
type Res struct { SystemErr error // IsErr is used to set an application error on the underlying call res. IsErr bool Arg2 []byte Arg3 []byte }
Res represents the response to an incoming call req.
Source Files ¶
- Version
- v1.34.6 (latest)
- Published
- Jan 8, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 days ago –
Tools for package owners.