Documentation ¶
Index ¶
- Variables
- func WithAckTimeout(timeout time.Duration) *sendOption
- func WithAttachmentStrings(attachments ...string) *sendOption
- func WithAttachments(attachments ...[]byte) *sendOption
- func WithCredentials(credentials Credentials) *sendOption
- func WithDeclaredClientFeatureIDs(ids ...int32) *sendOption
- func WithProtocolVersionMajor(v int32) *sendOption
- func WithRequestCodec(codecID compression.CodecID) *sendOption
- func WithRequestID(id guid.GUID) *sendOption
- func WithRequestTimeout(timeout time.Duration) *sendOption
- func WithRequiredServerFeatureIDs(ids ...int32) *sendOption
- func WithResponseAttachments(attachments *[][]byte) *sendOption
- func WithResponseCodec(codecID compression.CodecID) *sendOption
- func WithToken(token string) *sendOption
- func WithTracing(traceID guid.GUID, spanID uint64, flags byte) *sendOption
- func WithUser(user string) *sendOption
- func WithUserTag(tag string) *sendOption
- func WithoutRequestAcknowledgement() *sendOption
- type AttributeKey
- type Bus
- type ClientConn
- type ClientOption
- type Credentials
- type DeliveryTrackingLevel
- type Options
- type SendOption
- type SendOptionAfterFunc
- type SendOptionBeforeFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnClosed = xerrors.NewSentinel("connection closed")
Functions ¶
func WithAckTimeout ¶
func WithAttachmentStrings ¶
func WithAttachmentStrings(attachments ...string) *sendOption
func WithAttachments ¶
func WithAttachments(attachments ...[]byte) *sendOption
func WithCredentials ¶
func WithCredentials(credentials Credentials) *sendOption
func WithDeclaredClientFeatureIDs ¶
func WithDeclaredClientFeatureIDs(ids ...int32) *sendOption
func WithProtocolVersionMajor ¶
func WithProtocolVersionMajor(v int32) *sendOption
func WithRequestCodec ¶
func WithRequestCodec(codecID compression.CodecID) *sendOption
func WithRequestID ¶
func WithRequestTimeout ¶
func WithRequiredServerFeatureIDs ¶
func WithRequiredServerFeatureIDs(ids ...int32) *sendOption
func WithResponseAttachments ¶
func WithResponseAttachments(attachments *[][]byte) *sendOption
func WithResponseCodec ¶
func WithResponseCodec(codecID compression.CodecID) *sendOption
func WithUserTag ¶
func WithUserTag(tag string) *sendOption
func WithoutRequestAcknowledgement ¶
func WithoutRequestAcknowledgement() *sendOption
Types ¶
type AttributeKey ¶
type AttributeKey string
const ( AttributeKeyFeatureID AttributeKey = "feature_id" AttributeKeyFeatureName AttributeKey = "feature_name" )
type ClientConn ¶
type ClientConn struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(ctx context.Context, address string, opts ...ClientOption) *ClientConn
func (*ClientConn) Close ¶
func (c *ClientConn) Close()
func (*ClientConn) Done ¶
func (c *ClientConn) Done() <-chan struct{}
func (*ClientConn) Err ¶
func (c *ClientConn) Err() (err error)
func (*ClientConn) Send ¶
func (c *ClientConn) Send( ctx context.Context, service, method string, request, reply proto.Message, opts ...SendOption, ) error
type ClientOption ¶
type ClientOption func(conn *ClientConn)
func WithDefaultProtocolVersionMajor ¶
func WithDefaultProtocolVersionMajor(v int32) ClientOption
func WithFeatureIDFormatter ¶
func WithFeatureIDFormatter(f featureIDFormatter) ClientOption
func WithLogger ¶
func WithLogger(l log.Logger) ClientOption
type Credentials ¶
type Credentials interface {
SetExtension(req *rpc.TRequestHeader)
}
type DeliveryTrackingLevel ¶
type DeliveryTrackingLevel int
const ( DeliveryTrackingLevelNone DeliveryTrackingLevel = 0 DeliveryTrackingLevelErrorOnly DeliveryTrackingLevel = 1 DeliveryTrackingLevelFull DeliveryTrackingLevel = 2 )
type SendOption ¶
type SendOption interface {
// contains filtered or unexported methods
}
type SendOptionAfterFunc ¶
type SendOptionAfterFunc func(req *clientReq)
SendOptionAfterFunc type is an adapter to allow the use of ordinary functions as SendOption's after method.
type SendOptionBeforeFunc ¶
type SendOptionBeforeFunc func(req *clientReq)
SendOptionBeforeFunc type is an adapter to allow the use of ordinary functions as SendOption's before method.
Click to show internal directories.
Click to hide internal directories.