Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateConsumeJTIDeliveryChWithCtx ¶
func CreateConsumeJTIDeliveryChWithCtx( ctx context.Context, ch *amqp091.Channel, queueName string, ) (<-chan amqp091.Delivery, error)
CreateConsumeJTIDeliveryChWithCtx sets up a consumer to receive messages from the specified queue using the provided context
Parameters:
- ctx: the context for managing cancellation and timeouts
- ch: the RabbitMQ channel
- queueName: the name of the queue
Returns:
- <-chan amqp091.Delivery: a channel to receive messages
- error: an error if the consumer could not be set up
func DeclareJTIQueue ¶
DeclareJTIQueue creates a durable queue for handling JWT ID (JTI) messages
Parameters:
- ch: the RabbitMQ channel
- queueName: the name of the queue
Returns:
- *amqp091.Queue: the declared queue
- error: an error if the queue could not be declared
Types ¶
type TokensMessage ¶
type TokensMessage struct {
IssuedJTIs []string `json:"issued_jtis"`
RevokedJTIs []string `json:"revoked_jtis"`
}
TokensMessage represents a message containing new and revoked JWT IDs
Click to show internal directories.
Click to hide internal directories.