Documentation ¶
Index ¶
- Constants
- func LogDebug(args ...interface{})
- func LogDebugf(format string, args ...interface{})
- func LogError(args ...interface{})
- func LogErrorf(format string, args ...interface{})
- func LogFatal(args ...interface{})
- func LogFatalf(format string, args ...interface{})
- func LogInfo(args ...interface{})
- func LogInfof(format string, args ...interface{})
- func LogWarn(args ...interface{})
- func LogWarnf(format string, args ...interface{})
- func RegisterSubscriber[T any](srv *Server, ctx context.Context, topic, groupName string, ...) error
- type Server
- type ServerOption
- func WithBrokerOptions(opts ...broker.Option) ServerOption
- func WithCodec(c string) ServerOption
- func WithCredentials(accessKey, secretKey, securityToken string) ServerOption
- func WithEnableKeepAlive(enable bool) ServerOption
- func WithEnableTrace() ServerOption
- func WithGlobalPropagator() ServerOption
- func WithGlobalTracerProvider() ServerOption
- func WithGroupName(name string) ServerOption
- func WithInstanceName(name string) ServerOption
- func WithNameServer(addrs []string) ServerOption
- func WithNameServerDomain(uri string) ServerOption
- func WithNamespace(ns string) ServerOption
- func WithPropagator(propagators propagation.TextMapPropagator) ServerOption
- func WithRetryCount(count int) ServerOption
- func WithTLSConfig(c *tls.Config) ServerOption
- func WithTracerProvider(provider trace.TracerProvider, tracerName string) ServerOption
- type Transport
- func (tr *Transport) Endpoint() string
- func (tr *Transport) Kind() kratosTransport.Kind
- func (tr *Transport) NodeFilters() []selector.NodeFilter
- func (tr *Transport) Operation() string
- func (tr *Transport) ReplyHeader() kratosTransport.Header
- func (tr *Transport) RequestHeader() kratosTransport.Header
Constants ¶
View Source
const (
KindRocketMQ kratosTransport.Kind = "rocketmq"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
func NewServer ¶
func NewServer(driverType rocketmqOption.DriverType, opts ...ServerOption) *Server
func (*Server) RegisterSubscriber ¶
type ServerOption ¶
type ServerOption func(o *Server)
func WithBrokerOptions ¶
func WithBrokerOptions(opts ...broker.Option) ServerOption
WithBrokerOptions MQ代理配置
func WithCodec ¶
func WithCodec(c string) ServerOption
func WithCredentials ¶
func WithCredentials(accessKey, secretKey, securityToken string) ServerOption
func WithEnableKeepAlive ¶
func WithEnableKeepAlive(enable bool) ServerOption
WithEnableKeepAlive enable keep alive
func WithEnableTrace ¶
func WithEnableTrace() ServerOption
func WithGlobalPropagator ¶
func WithGlobalPropagator() ServerOption
func WithGlobalTracerProvider ¶
func WithGlobalTracerProvider() ServerOption
func WithGroupName ¶
func WithGroupName(name string) ServerOption
func WithInstanceName ¶
func WithInstanceName(name string) ServerOption
func WithNameServer ¶
func WithNameServer(addrs []string) ServerOption
func WithNameServerDomain ¶
func WithNameServerDomain(uri string) ServerOption
func WithNamespace ¶
func WithNamespace(ns string) ServerOption
func WithPropagator ¶
func WithPropagator(propagators propagation.TextMapPropagator) ServerOption
func WithRetryCount ¶
func WithRetryCount(count int) ServerOption
func WithTLSConfig ¶
func WithTLSConfig(c *tls.Config) ServerOption
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider, tracerName string) ServerOption
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a RocketMQ transport.
func (*Transport) Kind ¶
func (tr *Transport) Kind() kratosTransport.Kind
Kind returns the transport kind.
func (*Transport) NodeFilters ¶
func (tr *Transport) NodeFilters() []selector.NodeFilter
NodeFilters returns the client select filters.
func (*Transport) ReplyHeader ¶
func (tr *Transport) ReplyHeader() kratosTransport.Header
ReplyHeader returns the reply header.
func (*Transport) RequestHeader ¶
func (tr *Transport) RequestHeader() kratosTransport.Header
RequestHeader returns the request header.
Click to show internal directories.
Click to hide internal directories.