Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNilPageToken is returned when a PageToken is nil ErrNilPageToken = errors.New("nil PageToken") )
Functions ¶
func DecodePageToken ¶
DecodePageToken translates a token from a drghs_v1 api call to Go
func GetPageSize ¶
GetPageSize returns the page size, setting a maximum page size of 100
func MakeFirstPageToken ¶
MakeFirstPageToken creates a new string page token for the given key/time
Types ¶
type Slo ¶
Slo is a paginator for SLO rules
func (*Slo) CreatePage ¶
CreatePage makes a new page in the paginator It uses the current time as key and add the items to that key
func (*Slo) GetPage ¶
GetPage gets the next numItems number of items from the given page/key Key should be the key returned by a call to CreatePage GetPage returns the items and the current index in the total items in the page
func (*Slo) PurgeOldRecords ¶
func (p *Slo) PurgeOldRecords()
PurgeOldRecords removes all pages that are more than 2 hours old
type Strings ¶
Strings is a paginator for strings
func (*Strings) CreatePage ¶
CreatePage makes a new page in the paginator It uses the current time as key and add the items to that key
func (*Strings) GetPage ¶
GetPage gets the next numItems number of items from the given page/key Key should be the key returned by a call to CreatePage GetPage returns the items and the current index in the total items in the page
func (*Strings) PurgeOldRecords ¶
func (p *Strings) PurgeOldRecords()
PurgeOldRecords removes all pages that are more than 2 hours old