Documentation ¶
Index ¶
- type AutoPing
- type Client
- func (c *Client) EnsureConsumer(ctx context.Context, stream string, opts ...consumers.Option) (consumers.Consumer, error)
- func (m *Client) EnsureStream(ctx context.Context, name string, opts ...streams.Option) (streams.Stream, error)
- func (e *Client) Publish(ctx context.Context, event *events.OutgoingEvent) (events.PublishedEvent, error)
- func (c *Client) Subscribe(ctx context.Context, stream string, consumer string, opts ...subscribe.Option) (<-chan events.Event, error)
- type Consumer
- type Event
- func (e *Event) Ack(ctx context.Context, opts ...events.AckOption) error
- func (e *Event) Context() context.Context
- func (e *Event) DeliveryAttempt() uint
- func (e *Event) Headers() events.Headers
- func (e *Event) ID() uint64
- func (e *Event) Ping(ctx context.Context, opts ...events.PingOption) error
- func (e *Event) Reject(ctx context.Context, opts ...events.RejectOption) error
- func (e *Event) Subject() string
- func (e *Event) UnmarshalNew() (proto.Message, error)
- func (e *Event) UnmarshalTo(v proto.Message) error
- type PublishedEvent
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoPing ¶
type AutoPing struct {
// contains filtered or unexported fields
}
AutoPing is a helper for automatically pinging events as they are processed.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) EnsureConsumer ¶
func (*Client) EnsureStream ¶
func (m *Client) EnsureStream(ctx context.Context, name string, opts ...streams.Option) (streams.Stream, error)
EnsureStream ensures that a JetStream stream exists with the given configuration. If the stream already exists, it will be updated with the new configuration.
func (*Client) Publish ¶
func (e *Client) Publish(ctx context.Context, event *events.OutgoingEvent) (events.PublishedEvent, error)
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) DeliveryAttempt ¶
type PublishedEvent ¶
type PublishedEvent struct {
// contains filtered or unexported fields
}
func (*PublishedEvent) ID ¶
func (e *PublishedEvent) ID() uint64
Click to show internal directories.
Click to hide internal directories.