Documentation
¶
Overview ¶
Package semaphore is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISemaphore ¶
type MockISemaphore ¶
type MockISemaphore struct {
// contains filtered or unexported fields
}
MockISemaphore is a mock of ISemaphore interface.
func NewMockISemaphore ¶
func NewMockISemaphore(ctrl *gomock.Controller) *MockISemaphore
NewMockISemaphore creates a new mock instance.
func (*MockISemaphore) AcquireMemoryWeight ¶
func (m *MockISemaphore) AcquireMemoryWeight(ctx context.Context, weight int64) error
AcquireMemoryWeight mocks base method.
func (*MockISemaphore) EXPECT ¶
func (m *MockISemaphore) EXPECT() *MockISemaphoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockISemaphore) ReleaseMemoryWeight ¶
func (m *MockISemaphore) ReleaseMemoryWeight(weight int64)
ReleaseMemoryWeight mocks base method.
type MockISemaphoreMockRecorder ¶
type MockISemaphoreMockRecorder struct {
// contains filtered or unexported fields
}
MockISemaphoreMockRecorder is the mock recorder for MockISemaphore.
func (*MockISemaphoreMockRecorder) AcquireMemoryWeight ¶
func (mr *MockISemaphoreMockRecorder) AcquireMemoryWeight(ctx, weight any) *gomock.Call
AcquireMemoryWeight indicates an expected call of AcquireMemoryWeight.
func (*MockISemaphoreMockRecorder) ReleaseMemoryWeight ¶
func (mr *MockISemaphoreMockRecorder) ReleaseMemoryWeight(weight any) *gomock.Call
ReleaseMemoryWeight indicates an expected call of ReleaseMemoryWeight.
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
func NewSemaphore ¶
func NewSemaphore() *Semaphore
func NewSemaphoreWithBudget ¶
func (*Semaphore) AcquireMemoryWeight ¶
AcquireMemoryWeight acquires semaphore with a specified weight
func (*Semaphore) ReleaseMemoryWeight ¶
ReleaseMemoryWeight releases semaphore with a specified weight