Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActOptionType ¶
type ActOptionType interface { googlePubsubPubOption | natsPubsubPubOption }
type GooglePubSubManager ¶
type GooglePubSubManager interface { MustConnect() GooglePubSubManager Connect() error Dispose() Publish(ctx context.Context, topic string, packet Packet[any]) error PublishWithResult(ctx context.Context, topic string, packet Packet[any]) (*pubsub.PublishResult, error) PublishAndWaitAck(ctx context.Context, topic string, packet Packet[any]) (string, error) Subscribe(ctx context.Context, topic string, onReceivedMessage func(context.Context, *pubsub.Message)) error AckWithResult(ctx context.Context, id string, ackResult *pubsub.AckResult, result func(err error, status pubsub.AcknowledgeStatus)) }
func NewGooglePubSub ¶
func NewGooglePubSub(projectId, scope string, tm telemetry.Manager, opts ...option.ClientOption) GooglePubSubManager
type Manager ¶
type Manager[T any, POPT PublishOptionType] interface { MustConnect() Manager[T, POPT] Connect() error Dispose() Publish(ctx context.Context, topic string, packet Packet[any], opts ...PublishOption[POPT]) error Subscribe(ctx context.Context, topic string, onReceivedMessage func(context.Context, *T)) error Ack(ctx context.Context, id string, ackResult any, opts ...ActOption[any]) NAck(ctx context.Context, id string, ackResult any, opts ...ActOption[any]) }
type Packet ¶
func (*Packet[T]) GetContent ¶
func (p *Packet[T]) GetContent() T
type PublishOption ¶
type PublishOption[T any] interface { // contains filtered or unexported methods }
func GooglePubsubPubOptWithWaitAck ¶
func GooglePubsubPubOptWithWaitAck(v bool, result func(string, error)) PublishOption[googlePubsubPubOption]
func GooglePubsubPubOptWithWaitResult ¶
func GooglePubsubPubOptWithWaitResult(v bool, result func(*pubsub.PublishResult, error)) PublishOption[googlePubsubPubOption]
type PublishOptionType ¶
type PublishOptionType interface { googlePubsubPubOption | natsPubsubPubOption }
Click to show internal directories.
Click to hide internal directories.