Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
func Subscribe(ctx context.Context, c QueueConfig) (*pubsub.Subscription, error)
Types ¶
type Arn ¶
func (Arn) ToQueueURL ¶
e.g. const queueURL = "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue"
type KafkaConfig ¶
type KafkaConfig struct {
Brokers []string `json:"brokers"`
Topic string `json:"topic"`
Group string `json:"group"`
}
+kubebuilder:object:generate=true
func (*KafkaConfig) DeepCopy ¶
func (in *KafkaConfig) DeepCopy() *KafkaConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaConfig.
func (*KafkaConfig) DeepCopyInto ¶
func (in *KafkaConfig) DeepCopyInto(out *KafkaConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (KafkaConfig) String ¶
func (k KafkaConfig) String() string
type MemoryConfig ¶
type MemoryConfig struct {
QueueName string `json:"queue"`
}
+kubebuilder:object:generate=true
func (*MemoryConfig) DeepCopy ¶
func (in *MemoryConfig) DeepCopy() *MemoryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryConfig.
func (*MemoryConfig) DeepCopyInto ¶
func (in *MemoryConfig) DeepCopyInto(out *MemoryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MemoryConfig) String ¶
func (m MemoryConfig) String() string
type NATSConfig ¶
type NATSConfig struct {
URL string `json:"url,omitempty"`
Subject string `json:"subject"`
Queue string `json:"queue,omitempty"`
}
+kubebuilder:object:generate=true
func (*NATSConfig) DeepCopy ¶
func (in *NATSConfig) DeepCopy() *NATSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NATSConfig.
func (*NATSConfig) DeepCopyInto ¶
func (in *NATSConfig) DeepCopyInto(out *NATSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NATSConfig) String ¶
func (n NATSConfig) String() string
type PubSubConfig ¶
type PubSubConfig struct {
ProjectID string `json:"project_id"`
Subscription string `json:"subscription"`
connection.GCPConnection `json:",inline"`
}
+kubebuilder:object:generate=true
func (*PubSubConfig) DeepCopy ¶
func (in *PubSubConfig) DeepCopy() *PubSubConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PubSubConfig.
func (*PubSubConfig) DeepCopyInto ¶
func (in *PubSubConfig) DeepCopyInto(out *PubSubConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PubSubConfig) String ¶
func (p PubSubConfig) String() string
type QueueConfig ¶
type QueueConfig struct {
SQS *SQSConfig `json:"sqs,omitempty"`
PubSub *PubSubConfig `json:"pubsub,omitempty"`
RabbitMQ *RabbitConfig `json:"rabbitmq,omitempty"`
Memory *MemoryConfig `json:"memory,omitempty"`
Kafka *KafkaConfig `json:"kafka,omitempty"`
NATS *NATSConfig `json:"nats,omitempty"`
}
+kubebuilder:object:generate=true
func (*QueueConfig) DeepCopy ¶
func (in *QueueConfig) DeepCopy() *QueueConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueConfig.
func (*QueueConfig) DeepCopyInto ¶
func (in *QueueConfig) DeepCopyInto(out *QueueConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (QueueConfig) GetQueue ¶
func (c QueueConfig) GetQueue() fmt.Stringer
type RabbitConfig ¶
+kubebuilder:object:generate=true
func (*RabbitConfig) DeepCopy ¶
func (in *RabbitConfig) DeepCopy() *RabbitConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitConfig.
func (*RabbitConfig) DeepCopyInto ¶
func (in *RabbitConfig) DeepCopyInto(out *RabbitConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RabbitConfig) String ¶
func (r RabbitConfig) String() string
type SQSConfig ¶
type SQSConfig struct {
QueueArn string `json:"queue"`
RawDelivery bool `json:"raw"`
// Time in seconds to long-poll for messages, Default to 15, max is 20
WaitTime int `json:"waitTime,omitempty"`
connection.AWSConnection `json:",inline"`
}
+kubebuilder:object:generate=true
func (*SQSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SQSConfig.
func (*SQSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type URL ¶
type URL struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
}
+kubebuilder:object:generate=true
func (*URL) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new URL.
func (*URL) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.