Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, includeDeadLetter bool) pagination.Pager
List all the queues
Types ¶
type CreateOpts ¶ added in v0.5.2
type CreateOpts struct {
// Indicates the unique name of a queue.
// A string of 1 to 64 characters that contain
// a-z, A-Z, 0-9, hyphens (-), and underscores (_).
// The name cannot be modified once specified.
Name string `json:"name" required:"true"`
// Indicates the queue type. Default value: NORMAL. Options:
// NORMAL: Standard queue. Best-effort ordering.
// FIFO: First-ln-First-out (FIFO) queue. FIFO delivery.
// KAFKA_HA: High-availability Kafka queue.
// KAFKA_HT: High-throughput Kafka queue.
QueueMode string `json:"queue_mode,omitempty"`
// Indicates the basic information about a queue.
// The queue description must be 0 to 160 characters in length,
// and does not contain angle brackets (<) and (>).
Description string `json:"description,omitempty"`
// This parameter is mandatory only when queue_mode is NORMAL or FIFO.
// Indicates whether to enable dead letter messages.
// Default value: disable. Options: enable, disable.
RedrivePolicy string `json:"redrive_policy,omitempty"`
// This parameter is mandatory only when
// redrive_policy is set to enable.
// This parameter indicates the maximum number
// of allowed message consumption failures.
// Value range: 1-100.
MaxConsumeCount int `json:"max_consume_count,omitempty"`
// This parameter is mandatory only when
// queue_mode is set to KAFKA_HA or KAFKA_HT.
// This parameter indicates the retention time
// of messages in Kafka queues.
// Value range: 1 to 72 hours.
RetentionHours int `json:"retention_hours,omitempty"`
}
CreateOpts is a struct that contains all the parameters.
func (CreateOpts) ToQueueCreateMap ¶ added in v0.5.2
func (opts CreateOpts) ToQueueCreateMap() (map[string]interface{}, error)
ToQueueCreateMap is used for type convert
type CreateOptsBuilder ¶ added in v0.5.2
CreateOptsBuilder is used for creating queue parameters. any struct providing the parameters should implement this interface
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
CreateResult is a struct that contains all the return parameters of creation
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create a queue with given parameters.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*QueueCreate, error)
Extract from CreateResult
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult is a struct which contains the result of deletion
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete a queue by id
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
GetResult contains the body of getting detailed
type Queue ¶
type Queue struct {
ID string `json:"id"`
Name string `json:"name"`
Created float64 `json:"created"`
Description string `json:"description"`
QueueMode string `json:"queue_mode"`
Reservation int `json:"reservation"`
MaxMsgSizeByte int `json:"max_msg_size_byte"`
ProducedMessages int `json:"produced_messages"`
RedrivePolicy string `json:"redrive_policy"`
MaxConsumeCount int `json:"max_consume_count"`
GroupCount int `json:"group_count"`
KafkaTopic string `json:"kafka_topic"`
}
Queue response
type QueueCreate ¶
type QueueCreate struct {
ID string `json:"id"`
Name string `json:"name"`
KafkaTopic string `json:"kafka_topic"`
}
QueueCreate response
type QueuePage ¶
type QueuePage struct {
pagination.SinglePageBase
}
QueuePage may be embedded in a Page that contains all of the results from an operation at once.
Click to show internal directories.
Click to hide internal directories.