Documentation ¶
Index ¶
- Variables
- type Consumer
- type ConsumerOption
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)
- func (this *Msg) Equal(that interface{}) bool
- func (m *Msg) GetHeaders() map[string]string
- func (m *Msg) GetId() string
- func (m *Msg) GetPayload() []byte
- func (this *Msg) GoString() string
- func (m *Msg) Marshal() (dAtA []byte, err error)
- func (m *Msg) MarshalTo(dAtA []byte) (int, error)
- func (m *Msg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Msg) ProtoMessage()
- func (m *Msg) Reset()
- func (m *Msg) Size() (n int)
- func (this *Msg) String() string
- func (m *Msg) Unmarshal(dAtA []byte) error
- func (m *Msg) XXX_DiscardUnknown()
- func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Msg) XXX_Merge(src proto.Message)
- func (m *Msg) XXX_Size() int
- func (m *Msg) XXX_Unmarshal(b []byte) error
- type Producer
- type ProducerOption
- type ProtoSerializer
- type Serializer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") )
View Source
var DefaultAckWait = time.Second * 30
View Source
var DefaultSerializer = ProtoSerializer{}
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer(conn stan.Conn, groupID string, options ...ConsumerOption) *Consumer
type ConsumerOption ¶
type ConsumerOption func(*Consumer)
func WithConsumerActWait ¶
func WithConsumerActWait(ackWait time.Duration) ConsumerOption
func WithConsumerLogger ¶
func WithConsumerLogger(logger log.Logger) ConsumerOption
func WithConsumerSerializer ¶
func WithConsumerSerializer(serializer Serializer) ConsumerOption
func WithConsumerSubscriptionOptions ¶
func WithConsumerSubscriptionOptions(option ...stan.SubscriptionOption) ConsumerOption
type Msg ¶
type Msg struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` }
func (*Msg) Descriptor ¶
func (*Msg) GetHeaders ¶
func (*Msg) GetPayload ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
func (*Msg) XXX_DiscardUnknown ¶
func (m *Msg) XXX_DiscardUnknown()
func (*Msg) XXX_Unmarshal ¶
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func NewProducer ¶
func NewProducer(conn stan.Conn, options ...ProducerOption) *Producer
type ProducerOption ¶
type ProducerOption func(*Producer)
func WithProducerLogger ¶
func WithProducerLogger(logger log.Logger) ProducerOption
func WithProducerSerializer ¶
func WithProducerSerializer(serializer Serializer) ProducerOption
type ProtoSerializer ¶
type ProtoSerializer struct{}
func (ProtoSerializer) Deserialize ¶
func (ProtoSerializer) Deserialize(message *stan.Msg) (msg.Message, error)
Click to show internal directories.
Click to hide internal directories.