/*
 * Copyright 2022 CloudWeGo Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/


// Code generated by MockGen. DO NOT EDIT.
// Source: ../../pkg/discovery/discovery.go

// Package discovery is a generated GoMock package.
package discovery

import (
	context "context"
	net "net"
	reflect "reflect"

	discovery "github.com/cloudwego/kitex/pkg/discovery"
	rpcinfo "github.com/cloudwego/kitex/pkg/rpcinfo"
	gomock "github.com/golang/mock/gomock"
)

// MockResolver is a mock of Resolver interface.
type MockResolver struct {
	ctrl     *gomock.Controller
	recorder *MockResolverMockRecorder
}

// MockResolverMockRecorder is the mock recorder for MockResolver.
type MockResolverMockRecorder struct {
	mock *MockResolver
}

// NewMockResolver creates a new mock instance.
func NewMockResolver(ctrl *gomock.Controller) *MockResolver {
	mock := &MockResolver{ctrl: ctrl}
	mock.recorder = &MockResolverMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockResolver) EXPECT() *MockResolverMockRecorder {
	return m.recorder
}

// Diff mocks base method.
func (m *MockResolver) Diff(cacheKey string, prev, next discovery.Result) (discovery.Change, bool) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Diff", cacheKey, prev, next)
	ret0, _ := ret[0].(discovery.Change)
	ret1, _ := ret[1].(bool)
	return ret0, ret1
}

// Diff indicates an expected call of Diff.
func (mr *MockResolverMockRecorder) Diff(cacheKey, prev, next interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Diff", reflect.TypeOf((*MockResolver)(nil).Diff), cacheKey, prev, next)
}

// Name mocks base method.
func (m *MockResolver) Name() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Name")
	ret0, _ := ret[0].(string)
	return ret0
}

// Name indicates an expected call of Name.
func (mr *MockResolverMockRecorder) Name() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockResolver)(nil).Name))
}

// Resolve mocks base method.
func (m *MockResolver) Resolve(ctx context.Context, desc string) (discovery.Result, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Resolve", ctx, desc)
	ret0, _ := ret[0].(discovery.Result)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Resolve indicates an expected call of Resolve.
func (mr *MockResolverMockRecorder) Resolve(ctx, desc interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockResolver)(nil).Resolve), ctx, desc)
}

// Target mocks base method.
func (m *MockResolver) Target(ctx context.Context, target rpcinfo.EndpointInfo) string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Target", ctx, target)
	ret0, _ := ret[0].(string)
	return ret0
}

// Target indicates an expected call of Target.
func (mr *MockResolverMockRecorder) Target(ctx, target interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Target", reflect.TypeOf((*MockResolver)(nil).Target), ctx, target)
}

// MockInstance is a mock of Instance interface.
type MockInstance struct {
	ctrl     *gomock.Controller
	recorder *MockInstanceMockRecorder
}

// MockInstanceMockRecorder is the mock recorder for MockInstance.
type MockInstanceMockRecorder struct {
	mock *MockInstance
}

// NewMockInstance creates a new mock instance.
func NewMockInstance(ctrl *gomock.Controller) *MockInstance {
	mock := &MockInstance{ctrl: ctrl}
	mock.recorder = &MockInstanceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockInstance) EXPECT() *MockInstanceMockRecorder {
	return m.recorder
}

// Address mocks base method.
func (m *MockInstance) Address() net.Addr {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Address")
	ret0, _ := ret[0].(net.Addr)
	return ret0
}

// Address indicates an expected call of Address.
func (mr *MockInstanceMockRecorder) Address() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockInstance)(nil).Address))
}

// Tag mocks base method.
func (m *MockInstance) Tag(key string) (string, bool) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Tag", key)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(bool)
	return ret0, ret1
}

// Tag indicates an expected call of Tag.
func (mr *MockInstanceMockRecorder) Tag(key interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tag", reflect.TypeOf((*MockInstance)(nil).Tag), key)
}

// Weight mocks base method.
func (m *MockInstance) Weight() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Weight")
	ret0, _ := ret[0].(int)
	return ret0
}

// Weight indicates an expected call of Weight.
func (mr *MockInstanceMockRecorder) Weight() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Weight", reflect.TypeOf((*MockInstance)(nil).Weight))
}
