groups

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *golangsdk.ServiceClient, queueID string, includeDeadLetter bool) pagination.Pager

List all the groups

Types

type CreateOps

type CreateOps struct {
	// Indicates the informations of a consumer group.
	Groups []GroupOps `json:"groups" required:"true"`
}

CreateOps is a struct that contains all the parameters.

func (CreateOps) ToGroupCreateMap

func (ops CreateOps) ToGroupCreateMap() (map[string]interface{}, error)

ToGroupCreateMap is used for type convert

type CreateOpsBuilder

type CreateOpsBuilder interface {
	ToGroupCreateMap() (map[string]interface{}, error)
}

CreateOpsBuilder is used for creating group 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, queueID string, ops CreateOpsBuilder) (r CreateResult)

Create a group with given parameters.

func (CreateResult) Extract

func (r CreateResult) Extract() ([]GroupCreate, 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, queueID string, groupID string) (r DeleteResult)

Delete a group by id

type Group

type Group struct {
	ID                   string `json:"id"`
	Name                 string `json:"name"`
	ConsumedMessages     int    `json:"consumed_messages"`
	AvailableMessages    int    `json:"available_messages"`
	ProducedMessages     int    `json:"produced_messages"`
	ProducedDeadletters  int    `json:"produced_deadletters"`
	AvailableDeadletters int    `json:"available_deadletters"`
}

Group response

func ExtractGroups

func ExtractGroups(r pagination.Page) ([]Group, error)

ExtractGroups from List

type GroupCreate

type GroupCreate struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

GroupCreate response

type GroupOps

type GroupOps struct {
	// Indicates the name of a consumer group.
	// A string of 1 to 32 characters that contain
	// a-z, A-Z, 0-9, hyphens (-), and underscores (_).
	Name string `json:"name" required:"true"`
}

GroupOps is referred by CreateOps

type GroupPage

type GroupPage struct {
	pagination.SinglePageBase
}

GroupPage may be embedded in a Page that contains all of the results from an operation at once.

func (GroupPage) IsEmpty

func (r GroupPage) IsEmpty() (bool, error)

IsEmpty returns true if a ListResult contains no groups.

type Groups

type Groups struct {
	QueueId   string  `json:"queue_id"`
	QueueName string  `json:"queue_name"`
	Details   []Group `json:"groups"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL