@@ -210,8 +210,37 @@ func (is *instrumentedService) DeleteBackfillCompletely(ctx context.Context, id
210210 return is .s .DeleteBackfillCompletely (ctx , id )
211211}
212212
213+ // GetIndexedTicketCount returns the current count of indexed tickets
213214func (is * instrumentedService ) GetIndexedTicketCount (ctx context.Context ) (int , error ) {
214215 ctx , span := trace .StartSpan (context .Background (), "statestore/instrumented.GetIndexedTicketCount" )
215216 defer span .End ()
216217 return is .s .GetIndexedTicketCount (ctx )
217218}
219+
220+ // CleanupTickets removes expired tickets
221+ func (is * instrumentedService ) CleanupTickets (ctx context.Context ) error {
222+ _ , span := trace .StartSpan (context .Background (), "statestore/instrumented.CleanupTickets" )
223+ defer span .End ()
224+ return is .s .CleanupTickets (ctx )
225+ }
226+
227+ // DeleteTicketCompletely performs a set of operations to remove the ticket and all related entries.
228+ func (is * instrumentedService ) DeleteTicketCompletely (ctx context.Context , id string ) error {
229+ _ , span := trace .StartSpan (context .Background (), "statestore/instrumented.DeleteTicketCompletely" )
230+ defer span .End ()
231+ return is .s .DeleteTicketCompletely (ctx , id )
232+ }
233+
234+ // GetExpiredTicketIDs gets all ticket IDs which are expired
235+ func (is * instrumentedService ) GetExpiredTicketIDs (ctx context.Context ) ([]string , error ) {
236+ ctx , span := trace .StartSpan (ctx , "statestore/instrumented.GetExpiredTicketIDs" )
237+ defer span .End ()
238+ return is .s .GetExpiredTicketIDs (ctx )
239+ }
240+
241+ // GetIndexedIDSetWithTTL returns the ids of all tickets currently indexed but within a given TTL.
242+ func (is * instrumentedService ) GetIndexedIDSetWithTTL (ctx context.Context ) (map [string ]struct {}, error ) {
243+ ctx , span := trace .StartSpan (ctx , "statestore/instrumented.GetIndexedIDSetWithTTL" )
244+ defer span .End ()
245+ return is .s .GetIndexedIDSetWithTTL (ctx )
246+ }
0 commit comments