Documentation ¶
Index ¶
- func WritePBMessage(ctx context.Context, m binding.Message, pbEvt *pbv1.CloudEvent, ...) error
- type Message
- func (m *Message) Finish(error) error
- func (m *Message) GetAttribute(k spec.Kind) (spec.Attribute, interface{})
- func (m *Message) GetExtension(name string) interface{}
- func (m *Message) ReadBinary(ctx context.Context, encoder binding.BinaryWriter) error
- func (m *Message) ReadEncoding() binding.Encoding
- func (m *Message) ReadStructured(ctx context.Context, encoder binding.StructuredWriter) error
- type Option
- type Protocol
- type PublishOption
- type SubscribeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WritePBMessage ¶
func WritePBMessage(ctx context.Context, m binding.Message, pbEvt *pbv1.CloudEvent, transformers ...binding.Transformer) error
WritePBMessage fills the provided pubMessage with the message m. Using context you can tweak the encoding processing (more details on binding.Write documentation).
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message represents a gRPC message. This message *can* be read several times safely
func NewMessage ¶
func NewMessage(msg *pbv1.CloudEvent) *Message
func (*Message) GetAttribute ¶
func (*Message) GetExtension ¶
func (*Message) ReadBinary ¶
func (*Message) ReadEncoding ¶
func (*Message) ReadStructured ¶
type Option ¶
Option is the function signature
func WithPublishOption ¶
func WithPublishOption(publishOpt *PublishOption) Option
WithPublishOption sets the Publish configuration for the client. This option is required if you want to send messages.
func WithSubscribeOption ¶
func WithSubscribeOption(subscribeOpt *SubscribeOption) Option
WithSubscribeOption sets the Subscribe configuration for the client. This option is required if you want to receive messages.
Click to show internal directories.
Click to hide internal directories.