diff --git a/service/history/queue/factory_mock.go b/service/history/queue/factory_mock.go index 9dca7c0bd10..bc5722b483a 100644 --- a/service/history/queue/factory_mock.go +++ b/service/history/queue/factory_mock.go @@ -1,3 +1,25 @@ +// The MIT License (MIT) + +// Copyright (c) 2017-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: factory.go // @@ -12,6 +34,8 @@ package queue import ( reflect "reflect" + gomock "go.uber.org/mock/gomock" + invariant "github.com/uber/cadence/common/reconciliation/invariant" engine "github.com/uber/cadence/service/history/engine" execution "github.com/uber/cadence/service/history/execution" @@ -20,7 +44,6 @@ import ( task "github.com/uber/cadence/service/history/task" workflowcache "github.com/uber/cadence/service/history/workflowcache" archiver "github.com/uber/cadence/service/worker/archiver" - gomock "go.uber.org/mock/gomock" ) // MockProcessorFactory is a mock of ProcessorFactory interface. diff --git a/service/history/wrappers/ratelimited/handler_generated.go b/service/history/wrappers/ratelimited/handler_generated.go index 4209ced071c..3a2ab3669e3 100644 --- a/service/history/wrappers/ratelimited/handler_generated.go +++ b/service/history/wrappers/ratelimited/handler_generated.go @@ -1,9 +1,31 @@ +// The MIT License (MIT) + +// Copyright (c) 2017-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. + +package ratelimited + // Code generated by gowrap. DO NOT EDIT. // template: ../../templates/ratelimited.tmpl // gowrap: http://github.com/hexdigest/gowrap -package ratelimited - //go:generate gowrap gen -p github.com/uber/cadence/service/history/handler -i Handler -t ../../templates/ratelimited.tmpl -o handler_generated.go -v handler=History -l "" import ( @@ -14,13 +36,13 @@ import ( "github.com/uber/cadence/common/log" "github.com/uber/cadence/common/types" "github.com/uber/cadence/service/frontend/validate" - _sourceHandler "github.com/uber/cadence/service/history/handler" + "github.com/uber/cadence/service/history/handler" "github.com/uber/cadence/service/history/workflowcache" ) -// historyHandler implements _sourceHandler.Handler interface instrumented with rate limiter. +// historyHandler implements handler.Handler interface instrumented with rate limiter. type historyHandler struct { - wrapped _sourceHandler.Handler + wrapped handler.Handler workflowIDCache workflowcache.WFCache logger log.Logger allowFunc func(domainID string, workflowID string) bool @@ -28,10 +50,10 @@ type historyHandler struct { // NewHistoryHandler creates a new instance of Handler with ratelimiter. func NewHistoryHandler( - wrapped _sourceHandler.Handler, + wrapped handler.Handler, workflowIDCache workflowcache.WFCache, logger log.Logger, -) _sourceHandler.Handler { +) handler.Handler { wrapper := &historyHandler{ wrapped: wrapped, workflowIDCache: workflowIDCache,