github.com/vnforks/kid/v5@v5.22.1-0.20200408055009-b89d99c65676/einterfaces/mocks/ClusterInterface.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make einterfaces-mocks`.
     4  
     5  package mocks
     6  
     7  import (
     8  	einterfaces "github.com/vnforks/kid/v5/einterfaces"
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	model "github.com/vnforks/kid/v5/model"
    12  )
    13  
    14  // ClusterInterface is an autogenerated mock type for the ClusterInterface type
    15  type ClusterInterface struct {
    16  	mock.Mock
    17  }
    18  
    19  // ConfigChanged provides a mock function with given fields: previousConfig, newConfig, sendToOtherServer
    20  func (_m *ClusterInterface) ConfigChanged(previousConfig *model.Config, newConfig *model.Config, sendToOtherServer bool) *model.AppError {
    21  	ret := _m.Called(previousConfig, newConfig, sendToOtherServer)
    22  
    23  	var r0 *model.AppError
    24  	if rf, ok := ret.Get(0).(func(*model.Config, *model.Config, bool) *model.AppError); ok {
    25  		r0 = rf(previousConfig, newConfig, sendToOtherServer)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*model.AppError)
    29  		}
    30  	}
    31  
    32  	return r0
    33  }
    34  
    35  // GetClusterId provides a mock function with given fields:
    36  func (_m *ClusterInterface) GetClusterId() string {
    37  	ret := _m.Called()
    38  
    39  	var r0 string
    40  	if rf, ok := ret.Get(0).(func() string); ok {
    41  		r0 = rf()
    42  	} else {
    43  		r0 = ret.Get(0).(string)
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // GetClusterInfos provides a mock function with given fields:
    50  func (_m *ClusterInterface) GetClusterInfos() []*model.ClusterInfo {
    51  	ret := _m.Called()
    52  
    53  	var r0 []*model.ClusterInfo
    54  	if rf, ok := ret.Get(0).(func() []*model.ClusterInfo); ok {
    55  		r0 = rf()
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).([]*model.ClusterInfo)
    59  		}
    60  	}
    61  
    62  	return r0
    63  }
    64  
    65  // GetClusterStats provides a mock function with given fields:
    66  func (_m *ClusterInterface) GetClusterStats() ([]*model.ClusterStats, *model.AppError) {
    67  	ret := _m.Called()
    68  
    69  	var r0 []*model.ClusterStats
    70  	if rf, ok := ret.Get(0).(func() []*model.ClusterStats); ok {
    71  		r0 = rf()
    72  	} else {
    73  		if ret.Get(0) != nil {
    74  			r0 = ret.Get(0).([]*model.ClusterStats)
    75  		}
    76  	}
    77  
    78  	var r1 *model.AppError
    79  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
    80  		r1 = rf()
    81  	} else {
    82  		if ret.Get(1) != nil {
    83  			r1 = ret.Get(1).(*model.AppError)
    84  		}
    85  	}
    86  
    87  	return r0, r1
    88  }
    89  
    90  // GetLogs provides a mock function with given fields: page, perPage
    91  func (_m *ClusterInterface) GetLogs(page int, perPage int) ([]string, *model.AppError) {
    92  	ret := _m.Called(page, perPage)
    93  
    94  	var r0 []string
    95  	if rf, ok := ret.Get(0).(func(int, int) []string); ok {
    96  		r0 = rf(page, perPage)
    97  	} else {
    98  		if ret.Get(0) != nil {
    99  			r0 = ret.Get(0).([]string)
   100  		}
   101  	}
   102  
   103  	var r1 *model.AppError
   104  	if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
   105  		r1 = rf(page, perPage)
   106  	} else {
   107  		if ret.Get(1) != nil {
   108  			r1 = ret.Get(1).(*model.AppError)
   109  		}
   110  	}
   111  
   112  	return r0, r1
   113  }
   114  
   115  // GetMyClusterInfo provides a mock function with given fields:
   116  func (_m *ClusterInterface) GetMyClusterInfo() *model.ClusterInfo {
   117  	ret := _m.Called()
   118  
   119  	var r0 *model.ClusterInfo
   120  	if rf, ok := ret.Get(0).(func() *model.ClusterInfo); ok {
   121  		r0 = rf()
   122  	} else {
   123  		if ret.Get(0) != nil {
   124  			r0 = ret.Get(0).(*model.ClusterInfo)
   125  		}
   126  	}
   127  
   128  	return r0
   129  }
   130  
   131  // IsLeader provides a mock function with given fields:
   132  func (_m *ClusterInterface) IsLeader() bool {
   133  	ret := _m.Called()
   134  
   135  	var r0 bool
   136  	if rf, ok := ret.Get(0).(func() bool); ok {
   137  		r0 = rf()
   138  	} else {
   139  		r0 = ret.Get(0).(bool)
   140  	}
   141  
   142  	return r0
   143  }
   144  
   145  // NotifyMsg provides a mock function with given fields: buf
   146  func (_m *ClusterInterface) NotifyMsg(buf []byte) {
   147  	_m.Called(buf)
   148  }
   149  
   150  // RegisterClusterMessageHandler provides a mock function with given fields: event, crm
   151  func (_m *ClusterInterface) RegisterClusterMessageHandler(event string, crm einterfaces.ClusterMessageHandler) {
   152  	_m.Called(event, crm)
   153  }
   154  
   155  // SendClusterMessage provides a mock function with given fields: cluster
   156  func (_m *ClusterInterface) SendClusterMessage(cluster *model.ClusterMessage) {
   157  	_m.Called(cluster)
   158  }
   159  
   160  // StartInterNodeCommunication provides a mock function with given fields:
   161  func (_m *ClusterInterface) StartInterNodeCommunication() {
   162  	_m.Called()
   163  }
   164  
   165  // StopInterNodeCommunication provides a mock function with given fields:
   166  func (_m *ClusterInterface) StopInterNodeCommunication() {
   167  	_m.Called()
   168  }