2024-03-15 18:57:11 +00:00
// Code generated by mockery v2.37.1. DO NOT EDIT.
2022-05-27 11:38:52 +00:00
package catalog
import (
2023-08-29 21:39:29 +00:00
limiter "github.com/hashicorp/consul/agent/grpc-external/limiter"
2022-05-27 11:38:52 +00:00
mock "github.com/stretchr/testify/mock"
2024-09-05 14:50:46 +00:00
"github.com/hashicorp/consul/agent/structs"
2024-03-15 18:57:11 +00:00
proxycfg "github.com/hashicorp/consul/agent/proxycfg"
2024-09-05 14:50:46 +00:00
"context"
2022-05-27 11:38:52 +00:00
)
// MockWatcher is an autogenerated mock type for the Watcher type
type MockWatcher struct {
mock . Mock
}
// Watch provides a mock function with given fields: proxyID, nodeName, token
2024-09-05 14:50:46 +00:00
func ( _m * MockWatcher ) Watch ( proxyID structs . ServiceID , nodeName string , token string ) ( <- chan * proxycfg . ConfigSnapshot , limiter . SessionTerminatedChan , proxycfg . SrcTerminatedChan , context . CancelFunc , error ) {
2022-05-27 11:38:52 +00:00
ret := _m . Called ( proxyID , nodeName , token )
2024-09-05 14:50:46 +00:00
var r0 <- chan * proxycfg . ConfigSnapshot
2023-08-24 22:44:14 +00:00
var r1 limiter . SessionTerminatedChan
2024-03-15 18:57:11 +00:00
var r2 proxycfg . SrcTerminatedChan
2024-09-05 14:50:46 +00:00
var r3 context . CancelFunc
2024-03-15 18:57:11 +00:00
var r4 error
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( structs . ServiceID , string , string ) ( <- chan * proxycfg . ConfigSnapshot , limiter . SessionTerminatedChan , proxycfg . SrcTerminatedChan , context . CancelFunc , error ) ) ; ok {
2023-08-24 22:44:14 +00:00
return rf ( proxyID , nodeName , token )
}
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( structs . ServiceID , string , string ) <- chan * proxycfg . ConfigSnapshot ) ; ok {
2022-05-27 11:38:52 +00:00
r0 = rf ( proxyID , nodeName , token )
} else {
if ret . Get ( 0 ) != nil {
2024-09-05 14:50:46 +00:00
r0 = ret . Get ( 0 ) . ( <- chan * proxycfg . ConfigSnapshot )
2022-05-27 11:38:52 +00:00
}
}
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( structs . ServiceID , string , string ) limiter . SessionTerminatedChan ) ; ok {
2022-05-27 11:38:52 +00:00
r1 = rf ( proxyID , nodeName , token )
} else {
if ret . Get ( 1 ) != nil {
2023-01-18 18:33:21 +00:00
r1 = ret . Get ( 1 ) . ( limiter . SessionTerminatedChan )
2022-05-27 11:38:52 +00:00
}
}
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( structs . ServiceID , string , string ) proxycfg . SrcTerminatedChan ) ; ok {
2022-05-27 11:38:52 +00:00
r2 = rf ( proxyID , nodeName , token )
} else {
2023-01-18 18:33:21 +00:00
if ret . Get ( 2 ) != nil {
2024-03-15 18:57:11 +00:00
r2 = ret . Get ( 2 ) . ( proxycfg . SrcTerminatedChan )
2023-01-18 18:33:21 +00:00
}
}
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 3 ) . ( func ( structs . ServiceID , string , string ) context . CancelFunc ) ; ok {
2023-01-18 18:33:21 +00:00
r3 = rf ( proxyID , nodeName , token )
} else {
2024-03-15 18:57:11 +00:00
if ret . Get ( 3 ) != nil {
2024-09-05 14:50:46 +00:00
r3 = ret . Get ( 3 ) . ( context . CancelFunc )
2024-03-15 18:57:11 +00:00
}
}
2024-09-05 14:50:46 +00:00
if rf , ok := ret . Get ( 4 ) . ( func ( structs . ServiceID , string , string ) error ) ; ok {
2024-03-15 18:57:11 +00:00
r4 = rf ( proxyID , nodeName , token )
} else {
r4 = ret . Error ( 4 )
2022-05-27 11:38:52 +00:00
}
2024-03-15 18:57:11 +00:00
return r0 , r1 , r2 , r3 , r4
2023-01-18 18:33:21 +00:00
}
2023-08-24 22:44:14 +00:00
// NewMockWatcher creates a new instance of MockWatcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockWatcher ( t interface {
2023-01-18 18:33:21 +00:00
mock . TestingT
Cleanup ( func ( ) )
2023-08-24 22:44:14 +00:00
} ) * MockWatcher {
2022-05-27 11:38:52 +00:00
mock := & MockWatcher { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}