Documentation
¶
Index ¶
- func GetTraceStreamRecvContext(ctx context.Context) context.Context
- func SetupTraceStreamRecvContext(ctx context.Context) context.Context
- func TraceBidirectionalStreamClient[Payload TraceStreamStreamingSendMessage, ...](ctx context.Context, info TraceBidirectionalStreamClientInfo[Payload, Result], ...) (any, error)
- func TraceBidirectionalStreamServer[Payload TraceStreamStreamingRecvMessage, ...](ctx context.Context, info TraceBidirectionalStreamServerInfo[Payload, Result], ...) (any, error)
- func TraceClientToServerStreamClient[Payload TraceStreamStreamingSendMessage](ctx context.Context, info ClientTraceStreamClientToServerInfo[Payload], ...) (any, error)
- func TraceClientToServerStreamServer[Result TraceStreamStreamingRecvMessage](ctx context.Context, info ServerTraceStreamClientToServerInfo[Result], ...) (any, error)
- func TraceServerToClientStreamClient[Result TraceStreamStreamingRecvMessage](ctx context.Context, info ClientTraceStreamServerToClientInfo[Result], ...) (any, error)
- func TraceServerToClientStreamServer[Result TraceStreamStreamingSendMessage](ctx context.Context, info ServerTraceStreamServerToClientInfo[Result], ...) (any, error)
- type ClientBidirectionalStream
- type ClientClientToServerStreamWithResult
- type ClientServerToClientStream
- type ClientTraceStreamClientToServerInfo
- type ClientTraceStreamServerToClientInfo
- type ServerBidirectionalStream
- type ServerClientToServerStream
- type ServerClientToServerStreamWithResult
- type ServerTraceStreamClientToServerInfo
- type ServerTraceStreamServerToClientInfo
- type TraceBidirectionalStreamClientInfo
- type TraceBidirectionalStreamClientInterceptor
- type TraceBidirectionalStreamServerInfo
- type TraceBidirectionalStreamServerInterceptor
- type TraceClientToServerStreamClientInterceptor
- type TraceClientToServerStreamServerInterceptor
- type TraceServerToClientStreamClientInterceptor
- type TraceServerToClientStreamServerInterceptor
- type TraceStreamStreamingRecvMessage
- type TraceStreamStreamingSendMessage
- type WrappedTraceStreamClientBidirectionalStream
- type WrappedTraceStreamClientClientToServerStreamWithResult
- type WrappedTraceStreamClientServerToClientStream
- type WrappedTraceStreamServerBidirectionalStream
- type WrappedTraceStreamServerClientToServerStream
- type WrappedTraceStreamServerClientToServerStreamWithResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceStreamRecvContext ¶
GetTraceStreamRecvContext returns the context with the extracted trace metadata after calling the receive method of a stream. The context must have been set up using the SetupTraceStreamRecvContext function.
func SetupTraceStreamRecvContext ¶
SetupTraceStreamRecvContext returns a copy of the context that is set up for use with the receive method of a stream so that the trace metadata can be extracted from the streaming payload or result. After the receive method of the stream returns, the GetTraceStreamRecvContext function can be used to retrieve the context with the extracted trace metadata.
func TraceBidirectionalStreamClient ¶
func TraceBidirectionalStreamClient[Payload TraceStreamStreamingSendMessage, Result TraceStreamStreamingRecvMessage]( ctx context.Context, info TraceBidirectionalStreamClientInfo[Payload, Result], next goa.Endpoint, ) (any, error)
TraceBidirectionalStreamClient is a client-side interceptor that traces a bidirectional stream by injecting the trace metadata into the streaming payload and extracting it from the streaming result. The injected trace metadata comes from the context passed to the send method of the client stream. The receive method of the client stream returns the extracted trace metadata in its context.
func TraceBidirectionalStreamServer ¶
func TraceBidirectionalStreamServer[Payload TraceStreamStreamingRecvMessage, Result TraceStreamStreamingSendMessage]( ctx context.Context, info TraceBidirectionalStreamServerInfo[Payload, Result], next goa.Endpoint, ) (any, error)
TraceBidirectionalStreamServer is a server-side interceptor that traces a bidirectional stream by injecting the trace metadata into the streaming result and extracting it from the streaming payload. The injected trace metadata comes from the context passed to the send method of the server stream. The receive method of the server stream returns the extracted trace metadata in its context.
func TraceClientToServerStreamClient ¶
func TraceClientToServerStreamClient[Payload TraceStreamStreamingSendMessage]( ctx context.Context, info ClientTraceStreamClientToServerInfo[Payload], next goa.Endpoint, ) (any, error)
TraceClientToServerStreamClient is a client-side interceptor that traces a client to server stream by injecting the trace metadata into the streaming payload. The injected trace metadata is returned in the context of the send method of the client stream.
func TraceClientToServerStreamServer ¶
func TraceClientToServerStreamServer[Result TraceStreamStreamingRecvMessage]( ctx context.Context, info ServerTraceStreamClientToServerInfo[Result], next goa.Endpoint, ) (any, error)
TraceClientToServerStreamServer is a server-side interceptor that traces a client to server stream by extracting the trace metadata from the streaming payload. The extracted trace metadata is returned in the context of the receive method of the server stream.
func TraceServerToClientStreamClient ¶
func TraceServerToClientStreamClient[Result TraceStreamStreamingRecvMessage]( ctx context.Context, info ClientTraceStreamServerToClientInfo[Result], next goa.Endpoint, ) (any, error)
TraceServerToClientStreamClient is a client-side interceptor that traces a server to client stream by extracting the trace metadata from the streaming result. The extracted trace metadata is returned in the context of the receive method of the client stream.
func TraceServerToClientStreamServer ¶
func TraceServerToClientStreamServer[Result TraceStreamStreamingSendMessage]( ctx context.Context, info ServerTraceStreamServerToClientInfo[Result], next goa.Endpoint, ) (any, error)
TraceServerToClientStreamServer is a server-side interceptor that traces a server to client stream by injecting the trace metadata into the streaming result. The injected trace metadata is returned in the context of the send method of the server stream.
Types ¶
type ClientBidirectionalStream ¶
type ClientBidirectionalStream[Payload any, Result any] interface { SendWithContext(ctx context.Context, payload Payload) error RecvWithContext(ctx context.Context) (Result, error) Close() error }
ClientBidirectionalStream is an interface that matches the client stream for a bidirectional stream that can be wrapped with WrapTraceBidirectionalStreamClientStream.
type ClientClientToServerStreamWithResult ¶
type ClientClientToServerStreamWithResult[Payload any, Result any] interface { SendWithContext(ctx context.Context, payload Payload) error CloseAndRecvWithContext(ctx context.Context) (Result, error) }
ClientClientToServerStreamWithResult is an interface that matches the client stream for a client to server stream that can be wrapped with WrapTraceClientToServerStreamWithResultClientStream.
type ClientServerToClientStream ¶
type ClientServerToClientStream[Result any] interface { RecvWithContext(ctx context.Context) (Result, error) }
ClientServerToClientStream is an interface that matches the client stream for a server to client stream that can be wrapped with WrapTraceServerToClientStreamClientStream.
type ClientTraceStreamClientToServerInfo ¶
type ClientTraceStreamClientToServerInfo[Payload TraceStreamStreamingSendMessage] interface { goa.InterceptorInfo ClientStreamingPayload() Payload }
ClientTraceStreamClientToServerInfo is an interface that matches the interceptor info for a client to server stream that can be traced using TraceClientToServerStreamClient.
type ClientTraceStreamServerToClientInfo ¶
type ClientTraceStreamServerToClientInfo[Result TraceStreamStreamingRecvMessage] interface { goa.InterceptorInfo ClientStreamingResult(res any) Result }
ClientTraceStreamServerToClientInfo is an interface that matches the interceptor info for a server to client stream that can be traced using TraceServerToClientStreamClient.
type ServerBidirectionalStream ¶
type ServerBidirectionalStream[Payload any, Result any] interface { SendWithContext(ctx context.Context, result Result) error RecvWithContext(ctx context.Context) (Payload, error) Close() error }
ServerBidirectionalStream is an interface that matches the server stream for a bidirectional stream that can be wrapped with WrapTraceBidirectionalStreamServerStream.
type ServerClientToServerStream ¶
type ServerClientToServerStream[Payload any] interface { RecvWithContext(ctx context.Context) (Payload, error) Close() error }
ServerClientToServerStream is an interface that matches the server stream for a client to server stream that can be wrapped with WrapTraceClientToServerStreamServerStream.
type ServerClientToServerStreamWithResult ¶
type ServerClientToServerStreamWithResult[Payload any, Result any] interface { CloseAndSendWithContext(ctx context.Context, result Result) error RecvWithContext(ctx context.Context) (Payload, error) }
ServerClientToServerStreamWithResult is an interface that matches the server stream for a client to server stream that can be wrapped with WrapTraceClientToServerStreamWithResultServerStream.
type ServerTraceStreamClientToServerInfo ¶
type ServerTraceStreamClientToServerInfo[Payload TraceStreamStreamingRecvMessage] interface { goa.InterceptorInfo ServerStreamingPayload(pay any) Payload }
ServerTraceStreamClientToServerInfo is an interface that matches the interceptor info for a client to server stream that can be traced using TraceClientToServerStreamServer.
type ServerTraceStreamServerToClientInfo ¶
type ServerTraceStreamServerToClientInfo[Result TraceStreamStreamingSendMessage] interface { goa.InterceptorInfo ServerStreamingResult() Result }
ServerTraceStreamServerToClientInfo is an interface that matches the interceptor info for a server to client stream that can be traced using TraceServerToClientStreamServer.
type TraceBidirectionalStreamClientInfo ¶
type TraceBidirectionalStreamClientInfo[Payload TraceStreamStreamingSendMessage, Result TraceStreamStreamingRecvMessage] interface { goa.InterceptorInfo ClientStreamingPayload() Payload ClientStreamingResult(res any) Result }
TraceBidirectionalStreamClientInfo is an interface that matches the interceptor info for a bidirectional stream that can be traced using TraceBidirectionalStreamClient.
type TraceBidirectionalStreamClientInterceptor ¶
type TraceBidirectionalStreamClientInterceptor[Info TraceBidirectionalStreamClientInfo[Payload, Result], Payload TraceStreamStreamingSendMessage, Result TraceStreamStreamingRecvMessage] struct{}
TraceBidirectionalStreamClientInterceptor is a client-side interceptor that traces a bidirectional stream by injecting the trace metadata into the streaming payload and extracting it from the streaming result. The injected trace metadata comes from the context passed to the send method of the client stream. The receive method of the client stream returns the extracted trace metadata in its context.
func (*TraceBidirectionalStreamClientInterceptor[Info, Payload, Result]) TraceBidirectionalStream ¶
func (i *TraceBidirectionalStreamClientInterceptor[Info, Payload, Result]) TraceBidirectionalStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceBidirectionalStream intercepts a bidirectional stream by injecting the trace metadata into the streaming payload and extracting it from the streaming result. The injected trace metadata comes from the context passed to the send method of the client stream. The receive method of the client stream returns the extracted trace metadata in its context.
type TraceBidirectionalStreamServerInfo ¶
type TraceBidirectionalStreamServerInfo[Payload TraceStreamStreamingRecvMessage, Result TraceStreamStreamingSendMessage] interface { goa.InterceptorInfo ServerStreamingPayload(pay any) Payload ServerStreamingResult() Result }
TraceBidirectionalStreamServerInfo is an interface that matches the interceptor info for a bidirectional stream that can be traced using TraceBidirectionalStreamServer.
type TraceBidirectionalStreamServerInterceptor ¶
type TraceBidirectionalStreamServerInterceptor[Info TraceBidirectionalStreamServerInfo[Payload, Result], Payload TraceStreamStreamingRecvMessage, Result TraceStreamStreamingSendMessage] struct{}
TraceBidirectionalStreamServerInterceptor is a server-side interceptor that traces a bidirectional stream by injecting the trace metadata into the streaming payload and extracting it from the streaming result. The injected trace metadata comes from the context passed to the send method of the server stream. The receive method of the server stream returns the extracted trace metadata in its context.
func (*TraceBidirectionalStreamServerInterceptor[Info, Payload, Result]) TraceBidirectionalStream ¶
func (i *TraceBidirectionalStreamServerInterceptor[Info, Payload, Result]) TraceBidirectionalStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceBidirectionalStream intercepts a bidirectional stream by injecting the trace metadata into the streaming payload and extracting it from the streaming result. The injected trace metadata comes from the context passed to the send method of the server stream. The receive method of the server stream returns the extracted trace metadata in its context.
type TraceClientToServerStreamClientInterceptor ¶
type TraceClientToServerStreamClientInterceptor[Info ClientTraceStreamClientToServerInfo[Payload], Payload TraceStreamStreamingSendMessage] struct{}
TraceClientToServerStreamClientInterceptor is a client-side interceptor that traces a client to server stream by injecting the trace metadata into the streaming payload. The injected trace metadata is returned in the context of the send method of the client stream.
func (*TraceClientToServerStreamClientInterceptor[Info, Payload]) TraceClientToServerStream ¶
func (i *TraceClientToServerStreamClientInterceptor[Info, Payload]) TraceClientToServerStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceClientToServerStream intercepts a client to server stream by injecting the trace metadata into the streaming payload. The injected trace metadata is returned in the context of the send method of the client stream.
type TraceClientToServerStreamServerInterceptor ¶
type TraceClientToServerStreamServerInterceptor[Info ServerTraceStreamClientToServerInfo[Payload], Payload TraceStreamStreamingRecvMessage] struct{}
TraceClientToServerStreamServerInterceptor is a server-side interceptor that traces a client to server stream by extracting the trace metadata from the streaming payload. The extracted trace metadata is returned in the context of the receive method of the server stream.
func (*TraceClientToServerStreamServerInterceptor[Info, Payload]) TraceClientToServerStream ¶
func (i *TraceClientToServerStreamServerInterceptor[Info, Payload]) TraceClientToServerStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceClientToServerStream intercepts a client to server stream by extracting the trace metadata from the streaming payload. The extracted trace metadata is returned in the context of the receive method of the server stream.
type TraceServerToClientStreamClientInterceptor ¶
type TraceServerToClientStreamClientInterceptor[Info ClientTraceStreamServerToClientInfo[Result], Result TraceStreamStreamingRecvMessage] struct{}
TraceServerToClientStreamClientInterceptor is a client-side interceptor that traces a server to client stream by extracting the trace metadata from the streaming result. The extracted trace metadata is returned in the context of the receive method of the client stream.
func (*TraceServerToClientStreamClientInterceptor[Info, Result]) TraceServerToClientStream ¶
func (i *TraceServerToClientStreamClientInterceptor[Info, Result]) TraceServerToClientStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceServerToClientStream intercepts a server to client stream by extracting the trace metadata from the streaming result. The extracted trace metadata is returned in the context of the receive method of the client stream.
type TraceServerToClientStreamServerInterceptor ¶
type TraceServerToClientStreamServerInterceptor[Info ServerTraceStreamServerToClientInfo[Result], Result TraceStreamStreamingSendMessage] struct{}
TraceServerToClientStreamServerInterceptor is a server-side interceptor that traces a server to client stream by injecting the trace metadata into the streaming result. The injected trace metadata is returned in the context of the send method of the server stream.
func (*TraceServerToClientStreamServerInterceptor[Info, Result]) TraceServerToClientStream ¶
func (i *TraceServerToClientStreamServerInterceptor[Info, Result]) TraceServerToClientStream(ctx context.Context, info Info, next goa.Endpoint) (any, error)
TraceServerToClientStream intercepts a server to client stream by injecting the trace metadata into the streaming result. The injected trace metadata is returned in the context of the send method of the server stream.
type TraceStreamStreamingRecvMessage ¶
TraceStreamStreamingRecvMessage is an interface that matches the streaming receive payload or result for a stream that can be traced using TraceBidirectionalStreamClient, TraceServerToClientStreamClient, TraceBidirectionalStreamServer, or TraceClientToServerStreamServer.
type TraceStreamStreamingSendMessage ¶
TraceStreamStreamingSendMessage is an interface that matches the streaming send payload or result for a stream that can be traced using TraceBidirectionalStreamClient, TraceClientToServerStreamClient, TraceBidirectionalStreamServer, or TraceServerToClientStreamServer.
type WrappedTraceStreamClientBidirectionalStream ¶
type WrappedTraceStreamClientBidirectionalStream[Payload any, Result any] interface { // Send sends a payload on the wrapped client stream. Send(ctx context.Context, payload Payload) error // RecvAndReturnContext returns the context with the extracted trace metadata, payload or result, and error after // calling the receive method of the wrapped client stream. RecvAndReturnContext(ctx context.Context) (context.Context, Result, error) // Close closes the wrapped client stream. Close() error }
WrappedTraceStreamClientBidirectionalStream is a wrapper around a client stream for a bidirectional stream that returns the context with the extracted trace metadata, payload or result, and error after calling the receive method of the stream.
func WrapTraceBidirectionalStreamClientStream ¶
func WrapTraceBidirectionalStreamClientStream[Payload any, Result any]( stream ClientBidirectionalStream[Payload, Result], ) WrappedTraceStreamClientBidirectionalStream[Payload, Result]
WrapTraceBidirectionalStreamClientStream wraps a client stream for a bidirectional stream with an interface that returns the context with the extracted trace metadata, payload or result, and error after calling the receive method of the stream.
type WrappedTraceStreamClientClientToServerStreamWithResult ¶
type WrappedTraceStreamClientClientToServerStreamWithResult[Payload any, Result any] interface { // Send sends a payload on the wrapped client stream. Send(ctx context.Context, payload Payload) error // CloseAndRecvAndReturnContext returns the context with the extracted trace metadata, and result after // calling the close and receive methods of the wrapped client stream. CloseAndRecvAndReturnContext(ctx context.Context) (context.Context, Result, error) }
WrappedTraceStreamClientClientToServerStreamWithResult is a wrapper around a client stream for a client to server stream that returns the context with the extracted trace metadata, and result after calling the close and receive methods of the stream.
func WrapTraceClientToServerStreamWithResultClientStream ¶
func WrapTraceClientToServerStreamWithResultClientStream[Payload any, Result any]( stream ClientClientToServerStreamWithResult[Payload, Result], ) WrappedTraceStreamClientClientToServerStreamWithResult[Payload, Result]
WrapTraceClientToServerStreamWithResultClientStream wraps a client stream for a client to server stream with an interface that returns the context with the extracted trace metadata, and result after calling the close and receive methods of the stream.
type WrappedTraceStreamClientServerToClientStream ¶
type WrappedTraceStreamClientServerToClientStream[Result any] interface { // RecvAndReturnContext returns the context with the extracted trace metadata, and result after // calling the receive method of the wrapped client stream. RecvAndReturnContext(ctx context.Context) (context.Context, Result, error) }
WrappedTraceStreamClientServerToClientStream is a wrapper around a client stream for a server to client stream that returns the context with the extracted trace metadata, and result after calling the receive method of the stream.
func WrapTraceServerToClientStreamClientStream ¶
func WrapTraceServerToClientStreamClientStream[Result any]( stream ClientServerToClientStream[Result], ) WrappedTraceStreamClientServerToClientStream[Result]
WrapTraceServerToClientStreamClientStream wraps a client stream for a server to client stream with an interface that returns the context with the extracted trace metadata, and result after calling the receive method of the stream.
type WrappedTraceStreamServerBidirectionalStream ¶
type WrappedTraceStreamServerBidirectionalStream[Payload any, Result any] interface { // Send sends a payload on the wrapped server stream. Send(ctx context.Context, result Result) error // RecvAndReturnContext returns the context with the extracted trace metadata, payload or result, and error after // calling the receive method of the wrapped server stream. RecvAndReturnContext(ctx context.Context) (context.Context, Payload, error) // Close closes the wrapped server stream. Close() error }
WrappedTraceStreamServerBidirectionalStream is a wrapper around a server stream for a bidirectional stream that returns the context with the extracted trace metadata, payload or result, and error after calling the receive method of the stream.
func WrapTraceBidirectionalStreamServerStream ¶
func WrapTraceBidirectionalStreamServerStream[Payload any, Result any]( stream ServerBidirectionalStream[Payload, Result], ) WrappedTraceStreamServerBidirectionalStream[Payload, Result]
WrapTraceBidirectionalStreamServerStream wraps a server stream for a bidirectional stream with an interface that returns the context with the extracted trace metadata, payload or result, and error after calling the receive method of the stream.
type WrappedTraceStreamServerClientToServerStream ¶
type WrappedTraceStreamServerClientToServerStream[Payload any] interface { // RecvAndReturnContext returns the context with the extracted trace metadata, and payload after // calling the receive method of the wrapped server stream. RecvAndReturnContext(ctx context.Context) (context.Context, Payload, error) // Close closes the wrapped server stream. Close() error }
WrappedTraceStreamServerClientToServerStream is a wrapper around a server stream for a client to server stream that returns the context with the extracted trace metadata, and payload after calling the receive method of the stream.
func WrapTraceClientToServerStreamServerStream ¶
func WrapTraceClientToServerStreamServerStream[Payload any]( stream ServerClientToServerStream[Payload], ) WrappedTraceStreamServerClientToServerStream[Payload]
WrapTraceClientToServerStreamServerStream wraps a server stream for a client to server stream with an interface that returns the context with the extracted trace metadata, and payload after calling the receive method of the stream.
type WrappedTraceStreamServerClientToServerStreamWithResult ¶
type WrappedTraceStreamServerClientToServerStreamWithResult[Payload any, Result any] interface { // CloseAndSend closes the wrapped server stream and sends a result. CloseAndSend(ctx context.Context, result Result) error // RecvAndReturnContext returns the context with the extracted trace metadata, and payload after // calling the receive method of the wrapped server stream. RecvAndReturnContext(ctx context.Context) (context.Context, Payload, error) }
WrappedTraceStreamServerClientToServerStreamWithResult is a wrapper around a server stream for a client to server stream that returns the context with the extracted trace metadata, and payload after calling the close and send methods of the stream.
func WrapTraceClientToServerStreamWithResultServerStream ¶
func WrapTraceClientToServerStreamWithResultServerStream[Payload any, Result any]( stream ServerClientToServerStreamWithResult[Payload, Result], ) WrappedTraceStreamServerClientToServerStreamWithResult[Payload, Result]
WrapTraceClientToServerStreamWithResultServerStream wraps a server stream for a client to server stream with an interface that returns the context with the extracted trace metadata, and payload after calling the close and send methods of the stream.