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, topic string, ...) error
- type Server
- type ServerOption
- func WithAddress(addrs []string) ServerOption
- func WithBrokerOptions(opts ...broker.Option) ServerOption
- func WithCodec(c string) ServerOption
- func WithEnableKeepAlive(enable bool) ServerOption
- func WithGlobalPropagator() ServerOption
- func WithGlobalTracerProvider() ServerOption
- func WithPropagator(propagators propagation.TextMapPropagator) 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 (
KindNATS kratosTransport.Kind = "nats"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) RegisterSubscriber ¶
type ServerOption ¶
type ServerOption func(o *Server)
func WithAddress ¶
func WithAddress(addrs []string) ServerOption
func WithBrokerOptions ¶ added in v1.1.0
func WithBrokerOptions(opts ...broker.Option) ServerOption
WithBrokerOptions MQ代理配置
func WithCodec ¶
func WithCodec(c string) ServerOption
func WithEnableKeepAlive ¶ added in v1.1.0
func WithEnableKeepAlive(enable bool) ServerOption
WithEnableKeepAlive enable keep alive
func WithGlobalPropagator ¶
func WithGlobalPropagator() ServerOption
func WithGlobalTracerProvider ¶
func WithGlobalTracerProvider() ServerOption
func WithPropagator ¶
func WithPropagator(propagators propagation.TextMapPropagator) 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 Kafka 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.