// Code generated by counterfeiter. DO NOT EDIT.
package storagefakes

import (
	"context"
	"sync"

	"github.com/ehsaniara/joblet/internal/proto/gen/ipc"
	"github.com/ehsaniara/joblet/persist/internal/storage"
)

type FakeBackend struct {
	CloseStub        func() error
	closeMutex       sync.RWMutex
	closeArgsForCall []struct {
	}
	closeReturns struct {
		result1 error
	}
	closeReturnsOnCall map[int]struct {
		result1 error
	}
	DeleteJobStub        func(string) error
	deleteJobMutex       sync.RWMutex
	deleteJobArgsForCall []struct {
		arg1 string
	}
	deleteJobReturns struct {
		result1 error
	}
	deleteJobReturnsOnCall map[int]struct {
		result1 error
	}
	ReadAcceptEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.AcceptEvent], error)
	readAcceptEventsMutex       sync.RWMutex
	readAcceptEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readAcceptEventsReturns struct {
		result1 *storage.EventReader[*ipc.AcceptEvent]
		result2 error
	}
	readAcceptEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.AcceptEvent]
		result2 error
	}
	ReadConnectEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.ConnectEvent], error)
	readConnectEventsMutex       sync.RWMutex
	readConnectEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readConnectEventsReturns struct {
		result1 *storage.EventReader[*ipc.ConnectEvent]
		result2 error
	}
	readConnectEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.ConnectEvent]
		result2 error
	}
	ReadExecEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.ExecEvent], error)
	readExecEventsMutex       sync.RWMutex
	readExecEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readExecEventsReturns struct {
		result1 *storage.EventReader[*ipc.ExecEvent]
		result2 error
	}
	readExecEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.ExecEvent]
		result2 error
	}
	ReadFileEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.FileEvent], error)
	readFileEventsMutex       sync.RWMutex
	readFileEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readFileEventsReturns struct {
		result1 *storage.EventReader[*ipc.FileEvent]
		result2 error
	}
	readFileEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.FileEvent]
		result2 error
	}
	ReadLogsStub        func(context.Context, *storage.LogQuery) (*storage.EventReader[*ipc.LogLine], error)
	readLogsMutex       sync.RWMutex
	readLogsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.LogQuery
	}
	readLogsReturns struct {
		result1 *storage.EventReader[*ipc.LogLine]
		result2 error
	}
	readLogsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.LogLine]
		result2 error
	}
	ReadMetricsStub        func(context.Context, *storage.MetricQuery) (*storage.EventReader[*ipc.Metric], error)
	readMetricsMutex       sync.RWMutex
	readMetricsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.MetricQuery
	}
	readMetricsReturns struct {
		result1 *storage.EventReader[*ipc.Metric]
		result2 error
	}
	readMetricsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.Metric]
		result2 error
	}
	ReadMmapEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.MmapEvent], error)
	readMmapEventsMutex       sync.RWMutex
	readMmapEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readMmapEventsReturns struct {
		result1 *storage.EventReader[*ipc.MmapEvent]
		result2 error
	}
	readMmapEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.MmapEvent]
		result2 error
	}
	ReadMprotectEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.MprotectEvent], error)
	readMprotectEventsMutex       sync.RWMutex
	readMprotectEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readMprotectEventsReturns struct {
		result1 *storage.EventReader[*ipc.MprotectEvent]
		result2 error
	}
	readMprotectEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.MprotectEvent]
		result2 error
	}
	ReadSocketDataEventsStub        func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.SocketDataEvent], error)
	readSocketDataEventsMutex       sync.RWMutex
	readSocketDataEventsArgsForCall []struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}
	readSocketDataEventsReturns struct {
		result1 *storage.EventReader[*ipc.SocketDataEvent]
		result2 error
	}
	readSocketDataEventsReturnsOnCall map[int]struct {
		result1 *storage.EventReader[*ipc.SocketDataEvent]
		result2 error
	}
	WriteAcceptEventsStub        func(string, []*ipc.AcceptEvent) error
	writeAcceptEventsMutex       sync.RWMutex
	writeAcceptEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.AcceptEvent
	}
	writeAcceptEventsReturns struct {
		result1 error
	}
	writeAcceptEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteConnectEventsStub        func(string, []*ipc.ConnectEvent) error
	writeConnectEventsMutex       sync.RWMutex
	writeConnectEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.ConnectEvent
	}
	writeConnectEventsReturns struct {
		result1 error
	}
	writeConnectEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteExecEventsStub        func(string, []*ipc.ExecEvent) error
	writeExecEventsMutex       sync.RWMutex
	writeExecEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.ExecEvent
	}
	writeExecEventsReturns struct {
		result1 error
	}
	writeExecEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteFileEventsStub        func(string, []*ipc.FileEvent) error
	writeFileEventsMutex       sync.RWMutex
	writeFileEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.FileEvent
	}
	writeFileEventsReturns struct {
		result1 error
	}
	writeFileEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteLogsStub        func(string, []*ipc.LogLine) error
	writeLogsMutex       sync.RWMutex
	writeLogsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.LogLine
	}
	writeLogsReturns struct {
		result1 error
	}
	writeLogsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteMetricsStub        func(string, []*ipc.Metric) error
	writeMetricsMutex       sync.RWMutex
	writeMetricsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.Metric
	}
	writeMetricsReturns struct {
		result1 error
	}
	writeMetricsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteMmapEventsStub        func(string, []*ipc.MmapEvent) error
	writeMmapEventsMutex       sync.RWMutex
	writeMmapEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.MmapEvent
	}
	writeMmapEventsReturns struct {
		result1 error
	}
	writeMmapEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteMprotectEventsStub        func(string, []*ipc.MprotectEvent) error
	writeMprotectEventsMutex       sync.RWMutex
	writeMprotectEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.MprotectEvent
	}
	writeMprotectEventsReturns struct {
		result1 error
	}
	writeMprotectEventsReturnsOnCall map[int]struct {
		result1 error
	}
	WriteSocketDataEventsStub        func(string, []*ipc.SocketDataEvent) error
	writeSocketDataEventsMutex       sync.RWMutex
	writeSocketDataEventsArgsForCall []struct {
		arg1 string
		arg2 []*ipc.SocketDataEvent
	}
	writeSocketDataEventsReturns struct {
		result1 error
	}
	writeSocketDataEventsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeBackend) Close() error {
	fake.closeMutex.Lock()
	ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)]
	fake.closeArgsForCall = append(fake.closeArgsForCall, struct {
	}{})
	stub := fake.CloseStub
	fakeReturns := fake.closeReturns
	fake.recordInvocation("Close", []interface{}{})
	fake.closeMutex.Unlock()
	if stub != nil {
		return stub()
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) CloseCallCount() int {
	fake.closeMutex.RLock()
	defer fake.closeMutex.RUnlock()
	return len(fake.closeArgsForCall)
}

func (fake *FakeBackend) CloseCalls(stub func() error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = stub
}

func (fake *FakeBackend) CloseReturns(result1 error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = nil
	fake.closeReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) CloseReturnsOnCall(i int, result1 error) {
	fake.closeMutex.Lock()
	defer fake.closeMutex.Unlock()
	fake.CloseStub = nil
	if fake.closeReturnsOnCall == nil {
		fake.closeReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.closeReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) DeleteJob(arg1 string) error {
	fake.deleteJobMutex.Lock()
	ret, specificReturn := fake.deleteJobReturnsOnCall[len(fake.deleteJobArgsForCall)]
	fake.deleteJobArgsForCall = append(fake.deleteJobArgsForCall, struct {
		arg1 string
	}{arg1})
	stub := fake.DeleteJobStub
	fakeReturns := fake.deleteJobReturns
	fake.recordInvocation("DeleteJob", []interface{}{arg1})
	fake.deleteJobMutex.Unlock()
	if stub != nil {
		return stub(arg1)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) DeleteJobCallCount() int {
	fake.deleteJobMutex.RLock()
	defer fake.deleteJobMutex.RUnlock()
	return len(fake.deleteJobArgsForCall)
}

func (fake *FakeBackend) DeleteJobCalls(stub func(string) error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = stub
}

func (fake *FakeBackend) DeleteJobArgsForCall(i int) string {
	fake.deleteJobMutex.RLock()
	defer fake.deleteJobMutex.RUnlock()
	argsForCall := fake.deleteJobArgsForCall[i]
	return argsForCall.arg1
}

func (fake *FakeBackend) DeleteJobReturns(result1 error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = nil
	fake.deleteJobReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) DeleteJobReturnsOnCall(i int, result1 error) {
	fake.deleteJobMutex.Lock()
	defer fake.deleteJobMutex.Unlock()
	fake.DeleteJobStub = nil
	if fake.deleteJobReturnsOnCall == nil {
		fake.deleteJobReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.deleteJobReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) ReadAcceptEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.AcceptEvent], error) {
	fake.readAcceptEventsMutex.Lock()
	ret, specificReturn := fake.readAcceptEventsReturnsOnCall[len(fake.readAcceptEventsArgsForCall)]
	fake.readAcceptEventsArgsForCall = append(fake.readAcceptEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadAcceptEventsStub
	fakeReturns := fake.readAcceptEventsReturns
	fake.recordInvocation("ReadAcceptEvents", []interface{}{arg1, arg2})
	fake.readAcceptEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadAcceptEventsCallCount() int {
	fake.readAcceptEventsMutex.RLock()
	defer fake.readAcceptEventsMutex.RUnlock()
	return len(fake.readAcceptEventsArgsForCall)
}

func (fake *FakeBackend) ReadAcceptEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.AcceptEvent], error)) {
	fake.readAcceptEventsMutex.Lock()
	defer fake.readAcceptEventsMutex.Unlock()
	fake.ReadAcceptEventsStub = stub
}

func (fake *FakeBackend) ReadAcceptEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readAcceptEventsMutex.RLock()
	defer fake.readAcceptEventsMutex.RUnlock()
	argsForCall := fake.readAcceptEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadAcceptEventsReturns(result1 *storage.EventReader[*ipc.AcceptEvent], result2 error) {
	fake.readAcceptEventsMutex.Lock()
	defer fake.readAcceptEventsMutex.Unlock()
	fake.ReadAcceptEventsStub = nil
	fake.readAcceptEventsReturns = struct {
		result1 *storage.EventReader[*ipc.AcceptEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadAcceptEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.AcceptEvent], result2 error) {
	fake.readAcceptEventsMutex.Lock()
	defer fake.readAcceptEventsMutex.Unlock()
	fake.ReadAcceptEventsStub = nil
	if fake.readAcceptEventsReturnsOnCall == nil {
		fake.readAcceptEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.AcceptEvent]
			result2 error
		})
	}
	fake.readAcceptEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.AcceptEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadConnectEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.ConnectEvent], error) {
	fake.readConnectEventsMutex.Lock()
	ret, specificReturn := fake.readConnectEventsReturnsOnCall[len(fake.readConnectEventsArgsForCall)]
	fake.readConnectEventsArgsForCall = append(fake.readConnectEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadConnectEventsStub
	fakeReturns := fake.readConnectEventsReturns
	fake.recordInvocation("ReadConnectEvents", []interface{}{arg1, arg2})
	fake.readConnectEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadConnectEventsCallCount() int {
	fake.readConnectEventsMutex.RLock()
	defer fake.readConnectEventsMutex.RUnlock()
	return len(fake.readConnectEventsArgsForCall)
}

func (fake *FakeBackend) ReadConnectEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.ConnectEvent], error)) {
	fake.readConnectEventsMutex.Lock()
	defer fake.readConnectEventsMutex.Unlock()
	fake.ReadConnectEventsStub = stub
}

func (fake *FakeBackend) ReadConnectEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readConnectEventsMutex.RLock()
	defer fake.readConnectEventsMutex.RUnlock()
	argsForCall := fake.readConnectEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadConnectEventsReturns(result1 *storage.EventReader[*ipc.ConnectEvent], result2 error) {
	fake.readConnectEventsMutex.Lock()
	defer fake.readConnectEventsMutex.Unlock()
	fake.ReadConnectEventsStub = nil
	fake.readConnectEventsReturns = struct {
		result1 *storage.EventReader[*ipc.ConnectEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadConnectEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.ConnectEvent], result2 error) {
	fake.readConnectEventsMutex.Lock()
	defer fake.readConnectEventsMutex.Unlock()
	fake.ReadConnectEventsStub = nil
	if fake.readConnectEventsReturnsOnCall == nil {
		fake.readConnectEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.ConnectEvent]
			result2 error
		})
	}
	fake.readConnectEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.ConnectEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadExecEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.ExecEvent], error) {
	fake.readExecEventsMutex.Lock()
	ret, specificReturn := fake.readExecEventsReturnsOnCall[len(fake.readExecEventsArgsForCall)]
	fake.readExecEventsArgsForCall = append(fake.readExecEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadExecEventsStub
	fakeReturns := fake.readExecEventsReturns
	fake.recordInvocation("ReadExecEvents", []interface{}{arg1, arg2})
	fake.readExecEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadExecEventsCallCount() int {
	fake.readExecEventsMutex.RLock()
	defer fake.readExecEventsMutex.RUnlock()
	return len(fake.readExecEventsArgsForCall)
}

func (fake *FakeBackend) ReadExecEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.ExecEvent], error)) {
	fake.readExecEventsMutex.Lock()
	defer fake.readExecEventsMutex.Unlock()
	fake.ReadExecEventsStub = stub
}

func (fake *FakeBackend) ReadExecEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readExecEventsMutex.RLock()
	defer fake.readExecEventsMutex.RUnlock()
	argsForCall := fake.readExecEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadExecEventsReturns(result1 *storage.EventReader[*ipc.ExecEvent], result2 error) {
	fake.readExecEventsMutex.Lock()
	defer fake.readExecEventsMutex.Unlock()
	fake.ReadExecEventsStub = nil
	fake.readExecEventsReturns = struct {
		result1 *storage.EventReader[*ipc.ExecEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadExecEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.ExecEvent], result2 error) {
	fake.readExecEventsMutex.Lock()
	defer fake.readExecEventsMutex.Unlock()
	fake.ReadExecEventsStub = nil
	if fake.readExecEventsReturnsOnCall == nil {
		fake.readExecEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.ExecEvent]
			result2 error
		})
	}
	fake.readExecEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.ExecEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadFileEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.FileEvent], error) {
	fake.readFileEventsMutex.Lock()
	ret, specificReturn := fake.readFileEventsReturnsOnCall[len(fake.readFileEventsArgsForCall)]
	fake.readFileEventsArgsForCall = append(fake.readFileEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadFileEventsStub
	fakeReturns := fake.readFileEventsReturns
	fake.recordInvocation("ReadFileEvents", []interface{}{arg1, arg2})
	fake.readFileEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadFileEventsCallCount() int {
	fake.readFileEventsMutex.RLock()
	defer fake.readFileEventsMutex.RUnlock()
	return len(fake.readFileEventsArgsForCall)
}

func (fake *FakeBackend) ReadFileEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.FileEvent], error)) {
	fake.readFileEventsMutex.Lock()
	defer fake.readFileEventsMutex.Unlock()
	fake.ReadFileEventsStub = stub
}

func (fake *FakeBackend) ReadFileEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readFileEventsMutex.RLock()
	defer fake.readFileEventsMutex.RUnlock()
	argsForCall := fake.readFileEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadFileEventsReturns(result1 *storage.EventReader[*ipc.FileEvent], result2 error) {
	fake.readFileEventsMutex.Lock()
	defer fake.readFileEventsMutex.Unlock()
	fake.ReadFileEventsStub = nil
	fake.readFileEventsReturns = struct {
		result1 *storage.EventReader[*ipc.FileEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadFileEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.FileEvent], result2 error) {
	fake.readFileEventsMutex.Lock()
	defer fake.readFileEventsMutex.Unlock()
	fake.ReadFileEventsStub = nil
	if fake.readFileEventsReturnsOnCall == nil {
		fake.readFileEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.FileEvent]
			result2 error
		})
	}
	fake.readFileEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.FileEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadLogs(arg1 context.Context, arg2 *storage.LogQuery) (*storage.EventReader[*ipc.LogLine], error) {
	fake.readLogsMutex.Lock()
	ret, specificReturn := fake.readLogsReturnsOnCall[len(fake.readLogsArgsForCall)]
	fake.readLogsArgsForCall = append(fake.readLogsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.LogQuery
	}{arg1, arg2})
	stub := fake.ReadLogsStub
	fakeReturns := fake.readLogsReturns
	fake.recordInvocation("ReadLogs", []interface{}{arg1, arg2})
	fake.readLogsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadLogsCallCount() int {
	fake.readLogsMutex.RLock()
	defer fake.readLogsMutex.RUnlock()
	return len(fake.readLogsArgsForCall)
}

func (fake *FakeBackend) ReadLogsCalls(stub func(context.Context, *storage.LogQuery) (*storage.EventReader[*ipc.LogLine], error)) {
	fake.readLogsMutex.Lock()
	defer fake.readLogsMutex.Unlock()
	fake.ReadLogsStub = stub
}

func (fake *FakeBackend) ReadLogsArgsForCall(i int) (context.Context, *storage.LogQuery) {
	fake.readLogsMutex.RLock()
	defer fake.readLogsMutex.RUnlock()
	argsForCall := fake.readLogsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadLogsReturns(result1 *storage.EventReader[*ipc.LogLine], result2 error) {
	fake.readLogsMutex.Lock()
	defer fake.readLogsMutex.Unlock()
	fake.ReadLogsStub = nil
	fake.readLogsReturns = struct {
		result1 *storage.EventReader[*ipc.LogLine]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadLogsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.LogLine], result2 error) {
	fake.readLogsMutex.Lock()
	defer fake.readLogsMutex.Unlock()
	fake.ReadLogsStub = nil
	if fake.readLogsReturnsOnCall == nil {
		fake.readLogsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.LogLine]
			result2 error
		})
	}
	fake.readLogsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.LogLine]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMetrics(arg1 context.Context, arg2 *storage.MetricQuery) (*storage.EventReader[*ipc.Metric], error) {
	fake.readMetricsMutex.Lock()
	ret, specificReturn := fake.readMetricsReturnsOnCall[len(fake.readMetricsArgsForCall)]
	fake.readMetricsArgsForCall = append(fake.readMetricsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.MetricQuery
	}{arg1, arg2})
	stub := fake.ReadMetricsStub
	fakeReturns := fake.readMetricsReturns
	fake.recordInvocation("ReadMetrics", []interface{}{arg1, arg2})
	fake.readMetricsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadMetricsCallCount() int {
	fake.readMetricsMutex.RLock()
	defer fake.readMetricsMutex.RUnlock()
	return len(fake.readMetricsArgsForCall)
}

func (fake *FakeBackend) ReadMetricsCalls(stub func(context.Context, *storage.MetricQuery) (*storage.EventReader[*ipc.Metric], error)) {
	fake.readMetricsMutex.Lock()
	defer fake.readMetricsMutex.Unlock()
	fake.ReadMetricsStub = stub
}

func (fake *FakeBackend) ReadMetricsArgsForCall(i int) (context.Context, *storage.MetricQuery) {
	fake.readMetricsMutex.RLock()
	defer fake.readMetricsMutex.RUnlock()
	argsForCall := fake.readMetricsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadMetricsReturns(result1 *storage.EventReader[*ipc.Metric], result2 error) {
	fake.readMetricsMutex.Lock()
	defer fake.readMetricsMutex.Unlock()
	fake.ReadMetricsStub = nil
	fake.readMetricsReturns = struct {
		result1 *storage.EventReader[*ipc.Metric]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMetricsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.Metric], result2 error) {
	fake.readMetricsMutex.Lock()
	defer fake.readMetricsMutex.Unlock()
	fake.ReadMetricsStub = nil
	if fake.readMetricsReturnsOnCall == nil {
		fake.readMetricsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.Metric]
			result2 error
		})
	}
	fake.readMetricsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.Metric]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMmapEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.MmapEvent], error) {
	fake.readMmapEventsMutex.Lock()
	ret, specificReturn := fake.readMmapEventsReturnsOnCall[len(fake.readMmapEventsArgsForCall)]
	fake.readMmapEventsArgsForCall = append(fake.readMmapEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadMmapEventsStub
	fakeReturns := fake.readMmapEventsReturns
	fake.recordInvocation("ReadMmapEvents", []interface{}{arg1, arg2})
	fake.readMmapEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadMmapEventsCallCount() int {
	fake.readMmapEventsMutex.RLock()
	defer fake.readMmapEventsMutex.RUnlock()
	return len(fake.readMmapEventsArgsForCall)
}

func (fake *FakeBackend) ReadMmapEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.MmapEvent], error)) {
	fake.readMmapEventsMutex.Lock()
	defer fake.readMmapEventsMutex.Unlock()
	fake.ReadMmapEventsStub = stub
}

func (fake *FakeBackend) ReadMmapEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readMmapEventsMutex.RLock()
	defer fake.readMmapEventsMutex.RUnlock()
	argsForCall := fake.readMmapEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadMmapEventsReturns(result1 *storage.EventReader[*ipc.MmapEvent], result2 error) {
	fake.readMmapEventsMutex.Lock()
	defer fake.readMmapEventsMutex.Unlock()
	fake.ReadMmapEventsStub = nil
	fake.readMmapEventsReturns = struct {
		result1 *storage.EventReader[*ipc.MmapEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMmapEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.MmapEvent], result2 error) {
	fake.readMmapEventsMutex.Lock()
	defer fake.readMmapEventsMutex.Unlock()
	fake.ReadMmapEventsStub = nil
	if fake.readMmapEventsReturnsOnCall == nil {
		fake.readMmapEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.MmapEvent]
			result2 error
		})
	}
	fake.readMmapEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.MmapEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMprotectEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.MprotectEvent], error) {
	fake.readMprotectEventsMutex.Lock()
	ret, specificReturn := fake.readMprotectEventsReturnsOnCall[len(fake.readMprotectEventsArgsForCall)]
	fake.readMprotectEventsArgsForCall = append(fake.readMprotectEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadMprotectEventsStub
	fakeReturns := fake.readMprotectEventsReturns
	fake.recordInvocation("ReadMprotectEvents", []interface{}{arg1, arg2})
	fake.readMprotectEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadMprotectEventsCallCount() int {
	fake.readMprotectEventsMutex.RLock()
	defer fake.readMprotectEventsMutex.RUnlock()
	return len(fake.readMprotectEventsArgsForCall)
}

func (fake *FakeBackend) ReadMprotectEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.MprotectEvent], error)) {
	fake.readMprotectEventsMutex.Lock()
	defer fake.readMprotectEventsMutex.Unlock()
	fake.ReadMprotectEventsStub = stub
}

func (fake *FakeBackend) ReadMprotectEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readMprotectEventsMutex.RLock()
	defer fake.readMprotectEventsMutex.RUnlock()
	argsForCall := fake.readMprotectEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadMprotectEventsReturns(result1 *storage.EventReader[*ipc.MprotectEvent], result2 error) {
	fake.readMprotectEventsMutex.Lock()
	defer fake.readMprotectEventsMutex.Unlock()
	fake.ReadMprotectEventsStub = nil
	fake.readMprotectEventsReturns = struct {
		result1 *storage.EventReader[*ipc.MprotectEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadMprotectEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.MprotectEvent], result2 error) {
	fake.readMprotectEventsMutex.Lock()
	defer fake.readMprotectEventsMutex.Unlock()
	fake.ReadMprotectEventsStub = nil
	if fake.readMprotectEventsReturnsOnCall == nil {
		fake.readMprotectEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.MprotectEvent]
			result2 error
		})
	}
	fake.readMprotectEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.MprotectEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadSocketDataEvents(arg1 context.Context, arg2 *storage.TelemetryQuery) (*storage.EventReader[*ipc.SocketDataEvent], error) {
	fake.readSocketDataEventsMutex.Lock()
	ret, specificReturn := fake.readSocketDataEventsReturnsOnCall[len(fake.readSocketDataEventsArgsForCall)]
	fake.readSocketDataEventsArgsForCall = append(fake.readSocketDataEventsArgsForCall, struct {
		arg1 context.Context
		arg2 *storage.TelemetryQuery
	}{arg1, arg2})
	stub := fake.ReadSocketDataEventsStub
	fakeReturns := fake.readSocketDataEventsReturns
	fake.recordInvocation("ReadSocketDataEvents", []interface{}{arg1, arg2})
	fake.readSocketDataEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1, ret.result2
	}
	return fakeReturns.result1, fakeReturns.result2
}

func (fake *FakeBackend) ReadSocketDataEventsCallCount() int {
	fake.readSocketDataEventsMutex.RLock()
	defer fake.readSocketDataEventsMutex.RUnlock()
	return len(fake.readSocketDataEventsArgsForCall)
}

func (fake *FakeBackend) ReadSocketDataEventsCalls(stub func(context.Context, *storage.TelemetryQuery) (*storage.EventReader[*ipc.SocketDataEvent], error)) {
	fake.readSocketDataEventsMutex.Lock()
	defer fake.readSocketDataEventsMutex.Unlock()
	fake.ReadSocketDataEventsStub = stub
}

func (fake *FakeBackend) ReadSocketDataEventsArgsForCall(i int) (context.Context, *storage.TelemetryQuery) {
	fake.readSocketDataEventsMutex.RLock()
	defer fake.readSocketDataEventsMutex.RUnlock()
	argsForCall := fake.readSocketDataEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) ReadSocketDataEventsReturns(result1 *storage.EventReader[*ipc.SocketDataEvent], result2 error) {
	fake.readSocketDataEventsMutex.Lock()
	defer fake.readSocketDataEventsMutex.Unlock()
	fake.ReadSocketDataEventsStub = nil
	fake.readSocketDataEventsReturns = struct {
		result1 *storage.EventReader[*ipc.SocketDataEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) ReadSocketDataEventsReturnsOnCall(i int, result1 *storage.EventReader[*ipc.SocketDataEvent], result2 error) {
	fake.readSocketDataEventsMutex.Lock()
	defer fake.readSocketDataEventsMutex.Unlock()
	fake.ReadSocketDataEventsStub = nil
	if fake.readSocketDataEventsReturnsOnCall == nil {
		fake.readSocketDataEventsReturnsOnCall = make(map[int]struct {
			result1 *storage.EventReader[*ipc.SocketDataEvent]
			result2 error
		})
	}
	fake.readSocketDataEventsReturnsOnCall[i] = struct {
		result1 *storage.EventReader[*ipc.SocketDataEvent]
		result2 error
	}{result1, result2}
}

func (fake *FakeBackend) WriteAcceptEvents(arg1 string, arg2 []*ipc.AcceptEvent) error {
	var arg2Copy []*ipc.AcceptEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.AcceptEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeAcceptEventsMutex.Lock()
	ret, specificReturn := fake.writeAcceptEventsReturnsOnCall[len(fake.writeAcceptEventsArgsForCall)]
	fake.writeAcceptEventsArgsForCall = append(fake.writeAcceptEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.AcceptEvent
	}{arg1, arg2Copy})
	stub := fake.WriteAcceptEventsStub
	fakeReturns := fake.writeAcceptEventsReturns
	fake.recordInvocation("WriteAcceptEvents", []interface{}{arg1, arg2Copy})
	fake.writeAcceptEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteAcceptEventsCallCount() int {
	fake.writeAcceptEventsMutex.RLock()
	defer fake.writeAcceptEventsMutex.RUnlock()
	return len(fake.writeAcceptEventsArgsForCall)
}

func (fake *FakeBackend) WriteAcceptEventsCalls(stub func(string, []*ipc.AcceptEvent) error) {
	fake.writeAcceptEventsMutex.Lock()
	defer fake.writeAcceptEventsMutex.Unlock()
	fake.WriteAcceptEventsStub = stub
}

func (fake *FakeBackend) WriteAcceptEventsArgsForCall(i int) (string, []*ipc.AcceptEvent) {
	fake.writeAcceptEventsMutex.RLock()
	defer fake.writeAcceptEventsMutex.RUnlock()
	argsForCall := fake.writeAcceptEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteAcceptEventsReturns(result1 error) {
	fake.writeAcceptEventsMutex.Lock()
	defer fake.writeAcceptEventsMutex.Unlock()
	fake.WriteAcceptEventsStub = nil
	fake.writeAcceptEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteAcceptEventsReturnsOnCall(i int, result1 error) {
	fake.writeAcceptEventsMutex.Lock()
	defer fake.writeAcceptEventsMutex.Unlock()
	fake.WriteAcceptEventsStub = nil
	if fake.writeAcceptEventsReturnsOnCall == nil {
		fake.writeAcceptEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeAcceptEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteConnectEvents(arg1 string, arg2 []*ipc.ConnectEvent) error {
	var arg2Copy []*ipc.ConnectEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.ConnectEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeConnectEventsMutex.Lock()
	ret, specificReturn := fake.writeConnectEventsReturnsOnCall[len(fake.writeConnectEventsArgsForCall)]
	fake.writeConnectEventsArgsForCall = append(fake.writeConnectEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.ConnectEvent
	}{arg1, arg2Copy})
	stub := fake.WriteConnectEventsStub
	fakeReturns := fake.writeConnectEventsReturns
	fake.recordInvocation("WriteConnectEvents", []interface{}{arg1, arg2Copy})
	fake.writeConnectEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteConnectEventsCallCount() int {
	fake.writeConnectEventsMutex.RLock()
	defer fake.writeConnectEventsMutex.RUnlock()
	return len(fake.writeConnectEventsArgsForCall)
}

func (fake *FakeBackend) WriteConnectEventsCalls(stub func(string, []*ipc.ConnectEvent) error) {
	fake.writeConnectEventsMutex.Lock()
	defer fake.writeConnectEventsMutex.Unlock()
	fake.WriteConnectEventsStub = stub
}

func (fake *FakeBackend) WriteConnectEventsArgsForCall(i int) (string, []*ipc.ConnectEvent) {
	fake.writeConnectEventsMutex.RLock()
	defer fake.writeConnectEventsMutex.RUnlock()
	argsForCall := fake.writeConnectEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteConnectEventsReturns(result1 error) {
	fake.writeConnectEventsMutex.Lock()
	defer fake.writeConnectEventsMutex.Unlock()
	fake.WriteConnectEventsStub = nil
	fake.writeConnectEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteConnectEventsReturnsOnCall(i int, result1 error) {
	fake.writeConnectEventsMutex.Lock()
	defer fake.writeConnectEventsMutex.Unlock()
	fake.WriteConnectEventsStub = nil
	if fake.writeConnectEventsReturnsOnCall == nil {
		fake.writeConnectEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeConnectEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteExecEvents(arg1 string, arg2 []*ipc.ExecEvent) error {
	var arg2Copy []*ipc.ExecEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.ExecEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeExecEventsMutex.Lock()
	ret, specificReturn := fake.writeExecEventsReturnsOnCall[len(fake.writeExecEventsArgsForCall)]
	fake.writeExecEventsArgsForCall = append(fake.writeExecEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.ExecEvent
	}{arg1, arg2Copy})
	stub := fake.WriteExecEventsStub
	fakeReturns := fake.writeExecEventsReturns
	fake.recordInvocation("WriteExecEvents", []interface{}{arg1, arg2Copy})
	fake.writeExecEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteExecEventsCallCount() int {
	fake.writeExecEventsMutex.RLock()
	defer fake.writeExecEventsMutex.RUnlock()
	return len(fake.writeExecEventsArgsForCall)
}

func (fake *FakeBackend) WriteExecEventsCalls(stub func(string, []*ipc.ExecEvent) error) {
	fake.writeExecEventsMutex.Lock()
	defer fake.writeExecEventsMutex.Unlock()
	fake.WriteExecEventsStub = stub
}

func (fake *FakeBackend) WriteExecEventsArgsForCall(i int) (string, []*ipc.ExecEvent) {
	fake.writeExecEventsMutex.RLock()
	defer fake.writeExecEventsMutex.RUnlock()
	argsForCall := fake.writeExecEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteExecEventsReturns(result1 error) {
	fake.writeExecEventsMutex.Lock()
	defer fake.writeExecEventsMutex.Unlock()
	fake.WriteExecEventsStub = nil
	fake.writeExecEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteExecEventsReturnsOnCall(i int, result1 error) {
	fake.writeExecEventsMutex.Lock()
	defer fake.writeExecEventsMutex.Unlock()
	fake.WriteExecEventsStub = nil
	if fake.writeExecEventsReturnsOnCall == nil {
		fake.writeExecEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeExecEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteFileEvents(arg1 string, arg2 []*ipc.FileEvent) error {
	var arg2Copy []*ipc.FileEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.FileEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeFileEventsMutex.Lock()
	ret, specificReturn := fake.writeFileEventsReturnsOnCall[len(fake.writeFileEventsArgsForCall)]
	fake.writeFileEventsArgsForCall = append(fake.writeFileEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.FileEvent
	}{arg1, arg2Copy})
	stub := fake.WriteFileEventsStub
	fakeReturns := fake.writeFileEventsReturns
	fake.recordInvocation("WriteFileEvents", []interface{}{arg1, arg2Copy})
	fake.writeFileEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteFileEventsCallCount() int {
	fake.writeFileEventsMutex.RLock()
	defer fake.writeFileEventsMutex.RUnlock()
	return len(fake.writeFileEventsArgsForCall)
}

func (fake *FakeBackend) WriteFileEventsCalls(stub func(string, []*ipc.FileEvent) error) {
	fake.writeFileEventsMutex.Lock()
	defer fake.writeFileEventsMutex.Unlock()
	fake.WriteFileEventsStub = stub
}

func (fake *FakeBackend) WriteFileEventsArgsForCall(i int) (string, []*ipc.FileEvent) {
	fake.writeFileEventsMutex.RLock()
	defer fake.writeFileEventsMutex.RUnlock()
	argsForCall := fake.writeFileEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteFileEventsReturns(result1 error) {
	fake.writeFileEventsMutex.Lock()
	defer fake.writeFileEventsMutex.Unlock()
	fake.WriteFileEventsStub = nil
	fake.writeFileEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteFileEventsReturnsOnCall(i int, result1 error) {
	fake.writeFileEventsMutex.Lock()
	defer fake.writeFileEventsMutex.Unlock()
	fake.WriteFileEventsStub = nil
	if fake.writeFileEventsReturnsOnCall == nil {
		fake.writeFileEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeFileEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteLogs(arg1 string, arg2 []*ipc.LogLine) error {
	var arg2Copy []*ipc.LogLine
	if arg2 != nil {
		arg2Copy = make([]*ipc.LogLine, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeLogsMutex.Lock()
	ret, specificReturn := fake.writeLogsReturnsOnCall[len(fake.writeLogsArgsForCall)]
	fake.writeLogsArgsForCall = append(fake.writeLogsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.LogLine
	}{arg1, arg2Copy})
	stub := fake.WriteLogsStub
	fakeReturns := fake.writeLogsReturns
	fake.recordInvocation("WriteLogs", []interface{}{arg1, arg2Copy})
	fake.writeLogsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteLogsCallCount() int {
	fake.writeLogsMutex.RLock()
	defer fake.writeLogsMutex.RUnlock()
	return len(fake.writeLogsArgsForCall)
}

func (fake *FakeBackend) WriteLogsCalls(stub func(string, []*ipc.LogLine) error) {
	fake.writeLogsMutex.Lock()
	defer fake.writeLogsMutex.Unlock()
	fake.WriteLogsStub = stub
}

func (fake *FakeBackend) WriteLogsArgsForCall(i int) (string, []*ipc.LogLine) {
	fake.writeLogsMutex.RLock()
	defer fake.writeLogsMutex.RUnlock()
	argsForCall := fake.writeLogsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteLogsReturns(result1 error) {
	fake.writeLogsMutex.Lock()
	defer fake.writeLogsMutex.Unlock()
	fake.WriteLogsStub = nil
	fake.writeLogsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteLogsReturnsOnCall(i int, result1 error) {
	fake.writeLogsMutex.Lock()
	defer fake.writeLogsMutex.Unlock()
	fake.WriteLogsStub = nil
	if fake.writeLogsReturnsOnCall == nil {
		fake.writeLogsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeLogsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMetrics(arg1 string, arg2 []*ipc.Metric) error {
	var arg2Copy []*ipc.Metric
	if arg2 != nil {
		arg2Copy = make([]*ipc.Metric, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeMetricsMutex.Lock()
	ret, specificReturn := fake.writeMetricsReturnsOnCall[len(fake.writeMetricsArgsForCall)]
	fake.writeMetricsArgsForCall = append(fake.writeMetricsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.Metric
	}{arg1, arg2Copy})
	stub := fake.WriteMetricsStub
	fakeReturns := fake.writeMetricsReturns
	fake.recordInvocation("WriteMetrics", []interface{}{arg1, arg2Copy})
	fake.writeMetricsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteMetricsCallCount() int {
	fake.writeMetricsMutex.RLock()
	defer fake.writeMetricsMutex.RUnlock()
	return len(fake.writeMetricsArgsForCall)
}

func (fake *FakeBackend) WriteMetricsCalls(stub func(string, []*ipc.Metric) error) {
	fake.writeMetricsMutex.Lock()
	defer fake.writeMetricsMutex.Unlock()
	fake.WriteMetricsStub = stub
}

func (fake *FakeBackend) WriteMetricsArgsForCall(i int) (string, []*ipc.Metric) {
	fake.writeMetricsMutex.RLock()
	defer fake.writeMetricsMutex.RUnlock()
	argsForCall := fake.writeMetricsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteMetricsReturns(result1 error) {
	fake.writeMetricsMutex.Lock()
	defer fake.writeMetricsMutex.Unlock()
	fake.WriteMetricsStub = nil
	fake.writeMetricsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMetricsReturnsOnCall(i int, result1 error) {
	fake.writeMetricsMutex.Lock()
	defer fake.writeMetricsMutex.Unlock()
	fake.WriteMetricsStub = nil
	if fake.writeMetricsReturnsOnCall == nil {
		fake.writeMetricsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeMetricsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMmapEvents(arg1 string, arg2 []*ipc.MmapEvent) error {
	var arg2Copy []*ipc.MmapEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.MmapEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeMmapEventsMutex.Lock()
	ret, specificReturn := fake.writeMmapEventsReturnsOnCall[len(fake.writeMmapEventsArgsForCall)]
	fake.writeMmapEventsArgsForCall = append(fake.writeMmapEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.MmapEvent
	}{arg1, arg2Copy})
	stub := fake.WriteMmapEventsStub
	fakeReturns := fake.writeMmapEventsReturns
	fake.recordInvocation("WriteMmapEvents", []interface{}{arg1, arg2Copy})
	fake.writeMmapEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteMmapEventsCallCount() int {
	fake.writeMmapEventsMutex.RLock()
	defer fake.writeMmapEventsMutex.RUnlock()
	return len(fake.writeMmapEventsArgsForCall)
}

func (fake *FakeBackend) WriteMmapEventsCalls(stub func(string, []*ipc.MmapEvent) error) {
	fake.writeMmapEventsMutex.Lock()
	defer fake.writeMmapEventsMutex.Unlock()
	fake.WriteMmapEventsStub = stub
}

func (fake *FakeBackend) WriteMmapEventsArgsForCall(i int) (string, []*ipc.MmapEvent) {
	fake.writeMmapEventsMutex.RLock()
	defer fake.writeMmapEventsMutex.RUnlock()
	argsForCall := fake.writeMmapEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteMmapEventsReturns(result1 error) {
	fake.writeMmapEventsMutex.Lock()
	defer fake.writeMmapEventsMutex.Unlock()
	fake.WriteMmapEventsStub = nil
	fake.writeMmapEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMmapEventsReturnsOnCall(i int, result1 error) {
	fake.writeMmapEventsMutex.Lock()
	defer fake.writeMmapEventsMutex.Unlock()
	fake.WriteMmapEventsStub = nil
	if fake.writeMmapEventsReturnsOnCall == nil {
		fake.writeMmapEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeMmapEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMprotectEvents(arg1 string, arg2 []*ipc.MprotectEvent) error {
	var arg2Copy []*ipc.MprotectEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.MprotectEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeMprotectEventsMutex.Lock()
	ret, specificReturn := fake.writeMprotectEventsReturnsOnCall[len(fake.writeMprotectEventsArgsForCall)]
	fake.writeMprotectEventsArgsForCall = append(fake.writeMprotectEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.MprotectEvent
	}{arg1, arg2Copy})
	stub := fake.WriteMprotectEventsStub
	fakeReturns := fake.writeMprotectEventsReturns
	fake.recordInvocation("WriteMprotectEvents", []interface{}{arg1, arg2Copy})
	fake.writeMprotectEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteMprotectEventsCallCount() int {
	fake.writeMprotectEventsMutex.RLock()
	defer fake.writeMprotectEventsMutex.RUnlock()
	return len(fake.writeMprotectEventsArgsForCall)
}

func (fake *FakeBackend) WriteMprotectEventsCalls(stub func(string, []*ipc.MprotectEvent) error) {
	fake.writeMprotectEventsMutex.Lock()
	defer fake.writeMprotectEventsMutex.Unlock()
	fake.WriteMprotectEventsStub = stub
}

func (fake *FakeBackend) WriteMprotectEventsArgsForCall(i int) (string, []*ipc.MprotectEvent) {
	fake.writeMprotectEventsMutex.RLock()
	defer fake.writeMprotectEventsMutex.RUnlock()
	argsForCall := fake.writeMprotectEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteMprotectEventsReturns(result1 error) {
	fake.writeMprotectEventsMutex.Lock()
	defer fake.writeMprotectEventsMutex.Unlock()
	fake.WriteMprotectEventsStub = nil
	fake.writeMprotectEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteMprotectEventsReturnsOnCall(i int, result1 error) {
	fake.writeMprotectEventsMutex.Lock()
	defer fake.writeMprotectEventsMutex.Unlock()
	fake.WriteMprotectEventsStub = nil
	if fake.writeMprotectEventsReturnsOnCall == nil {
		fake.writeMprotectEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeMprotectEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteSocketDataEvents(arg1 string, arg2 []*ipc.SocketDataEvent) error {
	var arg2Copy []*ipc.SocketDataEvent
	if arg2 != nil {
		arg2Copy = make([]*ipc.SocketDataEvent, len(arg2))
		copy(arg2Copy, arg2)
	}
	fake.writeSocketDataEventsMutex.Lock()
	ret, specificReturn := fake.writeSocketDataEventsReturnsOnCall[len(fake.writeSocketDataEventsArgsForCall)]
	fake.writeSocketDataEventsArgsForCall = append(fake.writeSocketDataEventsArgsForCall, struct {
		arg1 string
		arg2 []*ipc.SocketDataEvent
	}{arg1, arg2Copy})
	stub := fake.WriteSocketDataEventsStub
	fakeReturns := fake.writeSocketDataEventsReturns
	fake.recordInvocation("WriteSocketDataEvents", []interface{}{arg1, arg2Copy})
	fake.writeSocketDataEventsMutex.Unlock()
	if stub != nil {
		return stub(arg1, arg2)
	}
	if specificReturn {
		return ret.result1
	}
	return fakeReturns.result1
}

func (fake *FakeBackend) WriteSocketDataEventsCallCount() int {
	fake.writeSocketDataEventsMutex.RLock()
	defer fake.writeSocketDataEventsMutex.RUnlock()
	return len(fake.writeSocketDataEventsArgsForCall)
}

func (fake *FakeBackend) WriteSocketDataEventsCalls(stub func(string, []*ipc.SocketDataEvent) error) {
	fake.writeSocketDataEventsMutex.Lock()
	defer fake.writeSocketDataEventsMutex.Unlock()
	fake.WriteSocketDataEventsStub = stub
}

func (fake *FakeBackend) WriteSocketDataEventsArgsForCall(i int) (string, []*ipc.SocketDataEvent) {
	fake.writeSocketDataEventsMutex.RLock()
	defer fake.writeSocketDataEventsMutex.RUnlock()
	argsForCall := fake.writeSocketDataEventsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2
}

func (fake *FakeBackend) WriteSocketDataEventsReturns(result1 error) {
	fake.writeSocketDataEventsMutex.Lock()
	defer fake.writeSocketDataEventsMutex.Unlock()
	fake.WriteSocketDataEventsStub = nil
	fake.writeSocketDataEventsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) WriteSocketDataEventsReturnsOnCall(i int, result1 error) {
	fake.writeSocketDataEventsMutex.Lock()
	defer fake.writeSocketDataEventsMutex.Unlock()
	fake.WriteSocketDataEventsStub = nil
	if fake.writeSocketDataEventsReturnsOnCall == nil {
		fake.writeSocketDataEventsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.writeSocketDataEventsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeBackend) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeBackend) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ storage.Backend = new(FakeBackend)
