mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Implementing batch deletes for calls, logs and routes
Partially-Closes: #302
This commit is contained in:
@@ -45,3 +45,12 @@ func (m *mock) DeleteLog(ctx context.Context, appName, callID string) error {
|
||||
delete(m.Logs, callID)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mock) BatchDeleteLogs(ctx context.Context, appName string) error {
|
||||
for _, log := range m.Logs {
|
||||
if log.AppName == appName {
|
||||
m.DeleteLog(ctx, appName, log.CallID)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user