github.com/m3db/m3@v1.5.0/src/msg/producer/writer/shard_writer_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/msg/producer/writer/shard_go 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package writer is a generated GoMock package. 25 package writer 26 27 import ( 28 "reflect" 29 30 "github.com/m3db/m3/src/cluster/placement" 31 "github.com/m3db/m3/src/msg/producer" 32 33 "github.com/golang/mock/gomock" 34 ) 35 36 // MockshardWriter is a mock of shardWriter interface. 37 type MockshardWriter struct { 38 ctrl *gomock.Controller 39 recorder *MockshardWriterMockRecorder 40 } 41 42 // MockshardWriterMockRecorder is the mock recorder for MockshardWriter. 43 type MockshardWriterMockRecorder struct { 44 mock *MockshardWriter 45 } 46 47 // NewMockshardWriter creates a new mock instance. 48 func NewMockshardWriter(ctrl *gomock.Controller) *MockshardWriter { 49 mock := &MockshardWriter{ctrl: ctrl} 50 mock.recorder = &MockshardWriterMockRecorder{mock} 51 return mock 52 } 53 54 // EXPECT returns an object that allows the caller to indicate expected use. 55 func (m *MockshardWriter) EXPECT() *MockshardWriterMockRecorder { 56 return m.recorder 57 } 58 59 // Close mocks base method. 60 func (m *MockshardWriter) Close() { 61 m.ctrl.T.Helper() 62 m.ctrl.Call(m, "Close") 63 } 64 65 // Close indicates an expected call of Close. 66 func (mr *MockshardWriterMockRecorder) Close() *gomock.Call { 67 mr.mock.ctrl.T.Helper() 68 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockshardWriter)(nil).Close)) 69 } 70 71 // QueueSize mocks base method. 72 func (m *MockshardWriter) QueueSize() int { 73 m.ctrl.T.Helper() 74 ret := m.ctrl.Call(m, "QueueSize") 75 ret0, _ := ret[0].(int) 76 return ret0 77 } 78 79 // QueueSize indicates an expected call of QueueSize. 80 func (mr *MockshardWriterMockRecorder) QueueSize() *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueSize", reflect.TypeOf((*MockshardWriter)(nil).QueueSize)) 83 } 84 85 // SetMessageTTLNanos mocks base method. 86 func (m *MockshardWriter) SetMessageTTLNanos(value int64) { 87 m.ctrl.T.Helper() 88 m.ctrl.Call(m, "SetMessageTTLNanos", value) 89 } 90 91 // SetMessageTTLNanos indicates an expected call of SetMessageTTLNanos. 92 func (mr *MockshardWriterMockRecorder) SetMessageTTLNanos(value interface{}) *gomock.Call { 93 mr.mock.ctrl.T.Helper() 94 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMessageTTLNanos", reflect.TypeOf((*MockshardWriter)(nil).SetMessageTTLNanos), value) 95 } 96 97 // UpdateInstances mocks base method. 98 func (m *MockshardWriter) UpdateInstances(instances []placement.Instance, cws map[string]consumerWriter) { 99 m.ctrl.T.Helper() 100 m.ctrl.Call(m, "UpdateInstances", instances, cws) 101 } 102 103 // UpdateInstances indicates an expected call of UpdateInstances. 104 func (mr *MockshardWriterMockRecorder) UpdateInstances(instances, cws interface{}) *gomock.Call { 105 mr.mock.ctrl.T.Helper() 106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstances", reflect.TypeOf((*MockshardWriter)(nil).UpdateInstances), instances, cws) 107 } 108 109 // Write mocks base method. 110 func (m *MockshardWriter) Write(rm *producer.RefCountedMessage) { 111 m.ctrl.T.Helper() 112 m.ctrl.Call(m, "Write", rm) 113 } 114 115 // Write indicates an expected call of Write. 116 func (mr *MockshardWriterMockRecorder) Write(rm interface{}) *gomock.Call { 117 mr.mock.ctrl.T.Helper() 118 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockshardWriter)(nil).Write), rm) 119 }