mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-30 14:56:19 +00:00
307 lines
9.9 KiB
Go
307 lines
9.9 KiB
Go
// The MIT License
|
|
//
|
|
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
//
|
|
// Copyright (c) 2020 Uber Technologies, Inc.
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
// in the Software without restriction, including without limitation the rights
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
// furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in
|
|
// all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
// THE SOFTWARE.
|
|
|
|
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: metrics.go
|
|
|
|
// Package metrics is a generated GoMock package.
|
|
package metrics
|
|
|
|
import (
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
log "go.temporal.io/server/common/log"
|
|
)
|
|
|
|
// MockHandler is a mock of Handler interface.
|
|
type MockHandler struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockHandlerMockRecorder
|
|
}
|
|
|
|
// MockHandlerMockRecorder is the mock recorder for MockHandler.
|
|
type MockHandlerMockRecorder struct {
|
|
mock *MockHandler
|
|
}
|
|
|
|
// NewMockHandler creates a new mock instance.
|
|
func NewMockHandler(ctrl *gomock.Controller) *MockHandler {
|
|
mock := &MockHandler{ctrl: ctrl}
|
|
mock.recorder = &MockHandlerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockHandler) EXPECT() *MockHandlerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Counter mocks base method.
|
|
func (m *MockHandler) Counter(arg0 string) CounterIface {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Counter", arg0)
|
|
ret0, _ := ret[0].(CounterIface)
|
|
return ret0
|
|
}
|
|
|
|
// Counter indicates an expected call of Counter.
|
|
func (mr *MockHandlerMockRecorder) Counter(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Counter", reflect.TypeOf((*MockHandler)(nil).Counter), arg0)
|
|
}
|
|
|
|
// Gauge mocks base method.
|
|
func (m *MockHandler) Gauge(arg0 string) GaugeIface {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Gauge", arg0)
|
|
ret0, _ := ret[0].(GaugeIface)
|
|
return ret0
|
|
}
|
|
|
|
// Gauge indicates an expected call of Gauge.
|
|
func (mr *MockHandlerMockRecorder) Gauge(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Gauge", reflect.TypeOf((*MockHandler)(nil).Gauge), arg0)
|
|
}
|
|
|
|
// Histogram mocks base method.
|
|
func (m *MockHandler) Histogram(arg0 string, arg1 MetricUnit) HistogramIface {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Histogram", arg0, arg1)
|
|
ret0, _ := ret[0].(HistogramIface)
|
|
return ret0
|
|
}
|
|
|
|
// Histogram indicates an expected call of Histogram.
|
|
func (mr *MockHandlerMockRecorder) Histogram(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Histogram", reflect.TypeOf((*MockHandler)(nil).Histogram), arg0, arg1)
|
|
}
|
|
|
|
// Stop mocks base method.
|
|
func (m *MockHandler) Stop(arg0 log.Logger) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "Stop", arg0)
|
|
}
|
|
|
|
// Stop indicates an expected call of Stop.
|
|
func (mr *MockHandlerMockRecorder) Stop(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockHandler)(nil).Stop), arg0)
|
|
}
|
|
|
|
// Timer mocks base method.
|
|
func (m *MockHandler) Timer(arg0 string) TimerIface {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Timer", arg0)
|
|
ret0, _ := ret[0].(TimerIface)
|
|
return ret0
|
|
}
|
|
|
|
// Timer indicates an expected call of Timer.
|
|
func (mr *MockHandlerMockRecorder) Timer(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Timer", reflect.TypeOf((*MockHandler)(nil).Timer), arg0)
|
|
}
|
|
|
|
// WithTags mocks base method.
|
|
func (m *MockHandler) WithTags(arg0 ...Tag) Handler {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{}
|
|
for _, a := range arg0 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "WithTags", varargs...)
|
|
ret0, _ := ret[0].(Handler)
|
|
return ret0
|
|
}
|
|
|
|
// WithTags indicates an expected call of WithTags.
|
|
func (mr *MockHandlerMockRecorder) WithTags(arg0 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithTags", reflect.TypeOf((*MockHandler)(nil).WithTags), arg0...)
|
|
}
|
|
|
|
// MockCounterIface is a mock of CounterIface interface.
|
|
type MockCounterIface struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockCounterIfaceMockRecorder
|
|
}
|
|
|
|
// MockCounterIfaceMockRecorder is the mock recorder for MockCounterIface.
|
|
type MockCounterIfaceMockRecorder struct {
|
|
mock *MockCounterIface
|
|
}
|
|
|
|
// NewMockCounterIface creates a new mock instance.
|
|
func NewMockCounterIface(ctrl *gomock.Controller) *MockCounterIface {
|
|
mock := &MockCounterIface{ctrl: ctrl}
|
|
mock.recorder = &MockCounterIfaceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockCounterIface) EXPECT() *MockCounterIfaceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Record mocks base method.
|
|
func (m *MockCounterIface) Record(arg0 int64, arg1 ...Tag) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0}
|
|
for _, a := range arg1 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
m.ctrl.Call(m, "Record", varargs...)
|
|
}
|
|
|
|
// Record indicates an expected call of Record.
|
|
func (mr *MockCounterIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0}, arg1...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockCounterIface)(nil).Record), varargs...)
|
|
}
|
|
|
|
// MockGaugeIface is a mock of GaugeIface interface.
|
|
type MockGaugeIface struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockGaugeIfaceMockRecorder
|
|
}
|
|
|
|
// MockGaugeIfaceMockRecorder is the mock recorder for MockGaugeIface.
|
|
type MockGaugeIfaceMockRecorder struct {
|
|
mock *MockGaugeIface
|
|
}
|
|
|
|
// NewMockGaugeIface creates a new mock instance.
|
|
func NewMockGaugeIface(ctrl *gomock.Controller) *MockGaugeIface {
|
|
mock := &MockGaugeIface{ctrl: ctrl}
|
|
mock.recorder = &MockGaugeIfaceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockGaugeIface) EXPECT() *MockGaugeIfaceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Record mocks base method.
|
|
func (m *MockGaugeIface) Record(arg0 float64, arg1 ...Tag) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0}
|
|
for _, a := range arg1 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
m.ctrl.Call(m, "Record", varargs...)
|
|
}
|
|
|
|
// Record indicates an expected call of Record.
|
|
func (mr *MockGaugeIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0}, arg1...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockGaugeIface)(nil).Record), varargs...)
|
|
}
|
|
|
|
// MockTimerIface is a mock of TimerIface interface.
|
|
type MockTimerIface struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockTimerIfaceMockRecorder
|
|
}
|
|
|
|
// MockTimerIfaceMockRecorder is the mock recorder for MockTimerIface.
|
|
type MockTimerIfaceMockRecorder struct {
|
|
mock *MockTimerIface
|
|
}
|
|
|
|
// NewMockTimerIface creates a new mock instance.
|
|
func NewMockTimerIface(ctrl *gomock.Controller) *MockTimerIface {
|
|
mock := &MockTimerIface{ctrl: ctrl}
|
|
mock.recorder = &MockTimerIfaceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockTimerIface) EXPECT() *MockTimerIfaceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Record mocks base method.
|
|
func (m *MockTimerIface) Record(arg0 time.Duration, arg1 ...Tag) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0}
|
|
for _, a := range arg1 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
m.ctrl.Call(m, "Record", varargs...)
|
|
}
|
|
|
|
// Record indicates an expected call of Record.
|
|
func (mr *MockTimerIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0}, arg1...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockTimerIface)(nil).Record), varargs...)
|
|
}
|
|
|
|
// MockHistogramIface is a mock of HistogramIface interface.
|
|
type MockHistogramIface struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockHistogramIfaceMockRecorder
|
|
}
|
|
|
|
// MockHistogramIfaceMockRecorder is the mock recorder for MockHistogramIface.
|
|
type MockHistogramIfaceMockRecorder struct {
|
|
mock *MockHistogramIface
|
|
}
|
|
|
|
// NewMockHistogramIface creates a new mock instance.
|
|
func NewMockHistogramIface(ctrl *gomock.Controller) *MockHistogramIface {
|
|
mock := &MockHistogramIface{ctrl: ctrl}
|
|
mock.recorder = &MockHistogramIfaceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockHistogramIface) EXPECT() *MockHistogramIfaceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Record mocks base method.
|
|
func (m *MockHistogramIface) Record(arg0 int64, arg1 ...Tag) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0}
|
|
for _, a := range arg1 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
m.ctrl.Call(m, "Record", varargs...)
|
|
}
|
|
|
|
// Record indicates an expected call of Record.
|
|
func (mr *MockHistogramIfaceMockRecorder) Record(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0}, arg1...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockHistogramIface)(nil).Record), varargs...)
|
|
}
|