Documentation ¶
Index ¶
- type Message
- type OptionFunc
- type Publisher
- type TracedPublisher
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetFirstname() string
- func (m *User) GetLastname() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message abstraction for publishing.
func NewJSONMessage ¶
NewJSONMessage creates a new message with a JSON encoded body.
func NewMessage ¶
NewMessage creates a new message.
func NewProtobufMessage ¶ added in v0.23.0
NewProtobufMessage creates a new message with a protobuf encoded body.
type OptionFunc ¶ added in v0.23.0
type OptionFunc func(*TracedPublisher) error
OptionFunc definition for configuring the publisher in a functional way.
func Timeout ¶ added in v0.23.0
func Timeout(timeout time.Duration) OptionFunc
Timeout option for adjusting the timeout of the connection.
type Publisher ¶
type Publisher interface { Publish(ctx context.Context, msg *Message) error Close(ctx context.Context) error }
Publisher interface of a RabbitMQ publisher.
type TracedPublisher ¶
type TracedPublisher struct {
// contains filtered or unexported fields
}
TracedPublisher defines a RabbitMQ publisher with tracing instrumentation.
func NewPublisher ¶
func NewPublisher(url, exc string, oo ...OptionFunc) (*TracedPublisher, error)
NewPublisher creates a new publisher with the following defaults - exchange type: fanout - notifications are not handled at this point TBD.
type User ¶ added in v0.23.0
type User struct { Firstname *string `protobuf:"bytes,1,req,name=Firstname" json:"Firstname,omitempty"` Lastname *string `protobuf:"bytes,2,opt,name=Lastname" json:"Lastname,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶ added in v0.23.0
func (*User) GetFirstname ¶ added in v0.23.0
func (*User) GetLastname ¶ added in v0.23.0
func (*User) ProtoMessage ¶ added in v0.23.0
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶ added in v0.23.0
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Marshal ¶ added in v0.23.0
func (*User) XXX_Unmarshal ¶ added in v0.23.0
Click to show internal directories.
Click to hide internal directories.