dubbo.apache.org/dubbo-go/v3@v3.1.1/xds/client/mocks/XDSClient.go (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // Code generated by mockery v2.9.4. DO NOT EDIT.
    19  
    20  package mocks
    21  
    22  import (
    23  	mock "github.com/stretchr/testify/mock"
    24  
    25  	structpb "google.golang.org/protobuf/types/known/structpb"
    26  )
    27  
    28  import (
    29  	bootstrap "dubbo.apache.org/dubbo-go/v3/xds/client/bootstrap"
    30  	load "dubbo.apache.org/dubbo-go/v3/xds/client/load"
    31  	resource "dubbo.apache.org/dubbo-go/v3/xds/client/resource"
    32  )
    33  
    34  // XDSClient is an autogenerated mock type for the XDSClient type
    35  type XDSClient struct {
    36  	mock.Mock
    37  }
    38  
    39  // BootstrapConfig provides a mock function with given fields:
    40  func (_m *XDSClient) BootstrapConfig() *bootstrap.Config {
    41  	ret := _m.Called()
    42  
    43  	var r0 *bootstrap.Config
    44  	if rf, ok := ret.Get(0).(func() *bootstrap.Config); ok {
    45  		r0 = rf()
    46  	} else {
    47  		if ret.Get(0) != nil {
    48  			r0 = ret.Get(0).(*bootstrap.Config)
    49  		}
    50  	}
    51  
    52  	return r0
    53  }
    54  
    55  // Close provides a mock function with given fields:
    56  func (_m *XDSClient) Close() {
    57  	_m.Called()
    58  }
    59  
    60  // DumpCDS provides a mock function with given fields:
    61  func (_m *XDSClient) DumpCDS() map[string]resource.UpdateWithMD {
    62  	ret := _m.Called()
    63  
    64  	var r0 map[string]resource.UpdateWithMD
    65  	if rf, ok := ret.Get(0).(func() map[string]resource.UpdateWithMD); ok {
    66  		r0 = rf()
    67  	} else {
    68  		if ret.Get(0) != nil {
    69  			r0 = ret.Get(0).(map[string]resource.UpdateWithMD)
    70  		}
    71  	}
    72  
    73  	return r0
    74  }
    75  
    76  // DumpEDS provides a mock function with given fields:
    77  func (_m *XDSClient) DumpEDS() map[string]resource.UpdateWithMD {
    78  	ret := _m.Called()
    79  
    80  	var r0 map[string]resource.UpdateWithMD
    81  	if rf, ok := ret.Get(0).(func() map[string]resource.UpdateWithMD); ok {
    82  		r0 = rf()
    83  	} else {
    84  		if ret.Get(0) != nil {
    85  			r0 = ret.Get(0).(map[string]resource.UpdateWithMD)
    86  		}
    87  	}
    88  
    89  	return r0
    90  }
    91  
    92  // DumpLDS provides a mock function with given fields:
    93  func (_m *XDSClient) DumpLDS() map[string]resource.UpdateWithMD {
    94  	ret := _m.Called()
    95  
    96  	var r0 map[string]resource.UpdateWithMD
    97  	if rf, ok := ret.Get(0).(func() map[string]resource.UpdateWithMD); ok {
    98  		r0 = rf()
    99  	} else {
   100  		if ret.Get(0) != nil {
   101  			r0 = ret.Get(0).(map[string]resource.UpdateWithMD)
   102  		}
   103  	}
   104  
   105  	return r0
   106  }
   107  
   108  // DumpRDS provides a mock function with given fields:
   109  func (_m *XDSClient) DumpRDS() map[string]resource.UpdateWithMD {
   110  	ret := _m.Called()
   111  
   112  	var r0 map[string]resource.UpdateWithMD
   113  	if rf, ok := ret.Get(0).(func() map[string]resource.UpdateWithMD); ok {
   114  		r0 = rf()
   115  	} else {
   116  		if ret.Get(0) != nil {
   117  			r0 = ret.Get(0).(map[string]resource.UpdateWithMD)
   118  		}
   119  	}
   120  
   121  	return r0
   122  }
   123  
   124  // ReportLoad provides a mock function with given fields: server
   125  func (_m *XDSClient) ReportLoad(server string) (*load.Store, func()) {
   126  	ret := _m.Called(server)
   127  
   128  	var r0 *load.Store
   129  	if rf, ok := ret.Get(0).(func(string) *load.Store); ok {
   130  		r0 = rf(server)
   131  	} else {
   132  		if ret.Get(0) != nil {
   133  			r0 = ret.Get(0).(*load.Store)
   134  		}
   135  	}
   136  
   137  	var r1 func()
   138  	if rf, ok := ret.Get(1).(func(string) func()); ok {
   139  		r1 = rf(server)
   140  	} else {
   141  		if ret.Get(1) != nil {
   142  			r1 = ret.Get(1).(func())
   143  		}
   144  	}
   145  
   146  	return r0, r1
   147  }
   148  
   149  // SetMetadata provides a mock function with given fields: _a0
   150  func (_m *XDSClient) SetMetadata(_a0 *structpb.Struct) error {
   151  	ret := _m.Called(_a0)
   152  
   153  	var r0 error
   154  	if rf, ok := ret.Get(0).(func(*structpb.Struct) error); ok {
   155  		r0 = rf(_a0)
   156  	} else {
   157  		r0 = ret.Error(0)
   158  	}
   159  
   160  	return r0
   161  }
   162  
   163  // WatchCluster provides a mock function with given fields: _a0, _a1
   164  func (_m *XDSClient) WatchCluster(_a0 string, _a1 func(resource.ClusterUpdate, error)) func() {
   165  	ret := _m.Called(_a0, _a1)
   166  
   167  	var r0 func()
   168  	if rf, ok := ret.Get(0).(func(string, func(resource.ClusterUpdate, error)) func()); ok {
   169  		r0 = rf(_a0, _a1)
   170  	} else {
   171  		if ret.Get(0) != nil {
   172  			r0 = ret.Get(0).(func())
   173  		}
   174  	}
   175  
   176  	return r0
   177  }
   178  
   179  // WatchEndpoints provides a mock function with given fields: clusterName, edsCb
   180  func (_m *XDSClient) WatchEndpoints(clusterName string, edsCb func(resource.EndpointsUpdate, error)) func() {
   181  	ret := _m.Called(clusterName, edsCb)
   182  
   183  	var r0 func()
   184  	if rf, ok := ret.Get(0).(func(string, func(resource.EndpointsUpdate, error)) func()); ok {
   185  		r0 = rf(clusterName, edsCb)
   186  	} else {
   187  		if ret.Get(0) != nil {
   188  			r0 = ret.Get(0).(func())
   189  		}
   190  	}
   191  
   192  	return r0
   193  }
   194  
   195  // WatchListener provides a mock function with given fields: _a0, _a1
   196  func (_m *XDSClient) WatchListener(_a0 string, _a1 func(resource.ListenerUpdate, error)) func() {
   197  	ret := _m.Called(_a0, _a1)
   198  
   199  	var r0 func()
   200  	if rf, ok := ret.Get(0).(func(string, func(resource.ListenerUpdate, error)) func()); ok {
   201  		r0 = rf(_a0, _a1)
   202  	} else {
   203  		if ret.Get(0) != nil {
   204  			r0 = ret.Get(0).(func())
   205  		}
   206  	}
   207  
   208  	return r0
   209  }
   210  
   211  // WatchRouteConfig provides a mock function with given fields: _a0, _a1
   212  func (_m *XDSClient) WatchRouteConfig(_a0 string, _a1 func(resource.RouteConfigUpdate, error)) func() {
   213  	ret := _m.Called(_a0, _a1)
   214  
   215  	var r0 func()
   216  	if rf, ok := ret.Get(0).(func(string, func(resource.RouteConfigUpdate, error)) func()); ok {
   217  		r0 = rf(_a0, _a1)
   218  	} else {
   219  		if ret.Get(0) != nil {
   220  			r0 = ret.Get(0).(func())
   221  		}
   222  	}
   223  
   224  	return r0
   225  }