Documentation ¶
Overview ¶
Package queue provides a simple list mechanism with some helper functions to determine current counts based on resource type or state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { Resource resource.Resource State ItemState Reason string Type string Owner string // region/subscription Opts interface{} }
Item is used to represent a specific resource, and it's current ItemState in the Queue
func (*Item) Equals ¶
Equals checks if the current Item is identical to the argument Item in the Queue.
func (*Item) GetProperty ¶
GetProperty retrieves the string value of a property on the Item's Resource if it exists.
func (*Item) GetReason ¶
GetReason returns the current Reason for the Item which is usually coupled with an error
type Queue ¶
type Queue struct {
Items []*Item
}
Queue provides a very simple interface for queuing Item for processing
func (Queue) CountByType ¶
CountByType returns the total number of items that match a ResourceType and specific ItemState from the Queue