Documentation ¶
Index ¶
- Constants
- func NewSimpleTrackerFactory(name string) func() Tracker
- type HandShaker
- type NewTrackerFactoryFunc
- type SimpleTracker
- func (t *SimpleTracker) Negotiation(curSeqID int32, iprot, oprot thrift.TProtocol) error
- func (t *SimpleTracker) RequestHeaderSupported() bool
- func (t *SimpleTracker) RequestSeqIDFromCtx(ctx context.Context) (string, string)
- func (t *SimpleTracker) TryReadRequestHeader(iprot thrift.TProtocol) (context.Context, error)
- func (t *SimpleTracker) TryUpgrade(seqID int32, iprot, oprot thrift.TProtocol) (bool, thrift.TException)
- func (t *SimpleTracker) TryWriteRequestHeader(ctx context.Context, oprot thrift.TProtocol) error
- type Tracker
Constants ¶
View Source
const ( CtxKeySequenceID ctxKey = "__thrift_tracking_sequence_id" CtxKeyRequestID ctxKey = "__thrift_tracking_request_id" CtxKeyRequestMeta ctxKey = "__thrift_tracking_request_meta" // CtxKeyResponseMeta ctxKey = "__thrift_tracking_response_meta" TrackingAPIName string = "__thriftpy_tracing_method_name__v2" )
Variables ¶
This section is empty.
Functions ¶
func NewSimpleTrackerFactory ¶
Types ¶
type HandShaker ¶
type NewTrackerFactoryFunc ¶
type SimpleTracker ¶
type SimpleTracker struct {
// contains filtered or unexported fields
}
func (*SimpleTracker) Negotiation ¶
func (t *SimpleTracker) Negotiation(curSeqID int32, iprot, oprot thrift.TProtocol) error
func (*SimpleTracker) RequestHeaderSupported ¶
func (t *SimpleTracker) RequestHeaderSupported() bool
func (*SimpleTracker) RequestSeqIDFromCtx ¶
func (t *SimpleTracker) RequestSeqIDFromCtx(ctx context.Context) (string, string)
func (*SimpleTracker) TryReadRequestHeader ¶
func (*SimpleTracker) TryUpgrade ¶
func (t *SimpleTracker) TryUpgrade(seqID int32, iprot, oprot thrift.TProtocol) (bool, thrift.TException)
func (*SimpleTracker) TryWriteRequestHeader ¶
type Tracker ¶
type Tracker interface { HandShaker RequestSeqIDFromCtx(ctx context.Context) (string, string) TryReadRequestHeader(iprot thrift.TProtocol) (context.Context, error) // context will pass into service handler TryWriteRequestHeader(ctx context.Context, oprot thrift.TProtocol) error }
func NewSimpleTracker ¶
Click to show internal directories.
Click to hide internal directories.