github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/api/containerserver/containerserverfakes/fake_intercept_timeout.go (about)

     1  // Code generated by counterfeiter. DO NOT EDIT.
     2  package containerserverfakes
     3  
     4  import (
     5  	"sync"
     6  	"time"
     7  
     8  	"github.com/pf-qiu/concourse/v6/atc/api/containerserver"
     9  )
    10  
    11  type FakeInterceptTimeout struct {
    12  	ChannelStub        func() <-chan time.Time
    13  	channelMutex       sync.RWMutex
    14  	channelArgsForCall []struct {
    15  	}
    16  	channelReturns struct {
    17  		result1 <-chan time.Time
    18  	}
    19  	channelReturnsOnCall map[int]struct {
    20  		result1 <-chan time.Time
    21  	}
    22  	ErrorStub        func() error
    23  	errorMutex       sync.RWMutex
    24  	errorArgsForCall []struct {
    25  	}
    26  	errorReturns struct {
    27  		result1 error
    28  	}
    29  	errorReturnsOnCall map[int]struct {
    30  		result1 error
    31  	}
    32  	ResetStub        func()
    33  	resetMutex       sync.RWMutex
    34  	resetArgsForCall []struct {
    35  	}
    36  	invocations      map[string][][]interface{}
    37  	invocationsMutex sync.RWMutex
    38  }
    39  
    40  func (fake *FakeInterceptTimeout) Channel() <-chan time.Time {
    41  	fake.channelMutex.Lock()
    42  	ret, specificReturn := fake.channelReturnsOnCall[len(fake.channelArgsForCall)]
    43  	fake.channelArgsForCall = append(fake.channelArgsForCall, struct {
    44  	}{})
    45  	fake.recordInvocation("Channel", []interface{}{})
    46  	fake.channelMutex.Unlock()
    47  	if fake.ChannelStub != nil {
    48  		return fake.ChannelStub()
    49  	}
    50  	if specificReturn {
    51  		return ret.result1
    52  	}
    53  	fakeReturns := fake.channelReturns
    54  	return fakeReturns.result1
    55  }
    56  
    57  func (fake *FakeInterceptTimeout) ChannelCallCount() int {
    58  	fake.channelMutex.RLock()
    59  	defer fake.channelMutex.RUnlock()
    60  	return len(fake.channelArgsForCall)
    61  }
    62  
    63  func (fake *FakeInterceptTimeout) ChannelCalls(stub func() <-chan time.Time) {
    64  	fake.channelMutex.Lock()
    65  	defer fake.channelMutex.Unlock()
    66  	fake.ChannelStub = stub
    67  }
    68  
    69  func (fake *FakeInterceptTimeout) ChannelReturns(result1 <-chan time.Time) {
    70  	fake.channelMutex.Lock()
    71  	defer fake.channelMutex.Unlock()
    72  	fake.ChannelStub = nil
    73  	fake.channelReturns = struct {
    74  		result1 <-chan time.Time
    75  	}{result1}
    76  }
    77  
    78  func (fake *FakeInterceptTimeout) ChannelReturnsOnCall(i int, result1 <-chan time.Time) {
    79  	fake.channelMutex.Lock()
    80  	defer fake.channelMutex.Unlock()
    81  	fake.ChannelStub = nil
    82  	if fake.channelReturnsOnCall == nil {
    83  		fake.channelReturnsOnCall = make(map[int]struct {
    84  			result1 <-chan time.Time
    85  		})
    86  	}
    87  	fake.channelReturnsOnCall[i] = struct {
    88  		result1 <-chan time.Time
    89  	}{result1}
    90  }
    91  
    92  func (fake *FakeInterceptTimeout) Error() error {
    93  	fake.errorMutex.Lock()
    94  	ret, specificReturn := fake.errorReturnsOnCall[len(fake.errorArgsForCall)]
    95  	fake.errorArgsForCall = append(fake.errorArgsForCall, struct {
    96  	}{})
    97  	fake.recordInvocation("Error", []interface{}{})
    98  	fake.errorMutex.Unlock()
    99  	if fake.ErrorStub != nil {
   100  		return fake.ErrorStub()
   101  	}
   102  	if specificReturn {
   103  		return ret.result1
   104  	}
   105  	fakeReturns := fake.errorReturns
   106  	return fakeReturns.result1
   107  }
   108  
   109  func (fake *FakeInterceptTimeout) ErrorCallCount() int {
   110  	fake.errorMutex.RLock()
   111  	defer fake.errorMutex.RUnlock()
   112  	return len(fake.errorArgsForCall)
   113  }
   114  
   115  func (fake *FakeInterceptTimeout) ErrorCalls(stub func() error) {
   116  	fake.errorMutex.Lock()
   117  	defer fake.errorMutex.Unlock()
   118  	fake.ErrorStub = stub
   119  }
   120  
   121  func (fake *FakeInterceptTimeout) ErrorReturns(result1 error) {
   122  	fake.errorMutex.Lock()
   123  	defer fake.errorMutex.Unlock()
   124  	fake.ErrorStub = nil
   125  	fake.errorReturns = struct {
   126  		result1 error
   127  	}{result1}
   128  }
   129  
   130  func (fake *FakeInterceptTimeout) ErrorReturnsOnCall(i int, result1 error) {
   131  	fake.errorMutex.Lock()
   132  	defer fake.errorMutex.Unlock()
   133  	fake.ErrorStub = nil
   134  	if fake.errorReturnsOnCall == nil {
   135  		fake.errorReturnsOnCall = make(map[int]struct {
   136  			result1 error
   137  		})
   138  	}
   139  	fake.errorReturnsOnCall[i] = struct {
   140  		result1 error
   141  	}{result1}
   142  }
   143  
   144  func (fake *FakeInterceptTimeout) Reset() {
   145  	fake.resetMutex.Lock()
   146  	fake.resetArgsForCall = append(fake.resetArgsForCall, struct {
   147  	}{})
   148  	fake.recordInvocation("Reset", []interface{}{})
   149  	fake.resetMutex.Unlock()
   150  	if fake.ResetStub != nil {
   151  		fake.ResetStub()
   152  	}
   153  }
   154  
   155  func (fake *FakeInterceptTimeout) ResetCallCount() int {
   156  	fake.resetMutex.RLock()
   157  	defer fake.resetMutex.RUnlock()
   158  	return len(fake.resetArgsForCall)
   159  }
   160  
   161  func (fake *FakeInterceptTimeout) ResetCalls(stub func()) {
   162  	fake.resetMutex.Lock()
   163  	defer fake.resetMutex.Unlock()
   164  	fake.ResetStub = stub
   165  }
   166  
   167  func (fake *FakeInterceptTimeout) Invocations() map[string][][]interface{} {
   168  	fake.invocationsMutex.RLock()
   169  	defer fake.invocationsMutex.RUnlock()
   170  	fake.channelMutex.RLock()
   171  	defer fake.channelMutex.RUnlock()
   172  	fake.errorMutex.RLock()
   173  	defer fake.errorMutex.RUnlock()
   174  	fake.resetMutex.RLock()
   175  	defer fake.resetMutex.RUnlock()
   176  	copiedInvocations := map[string][][]interface{}{}
   177  	for key, value := range fake.invocations {
   178  		copiedInvocations[key] = value
   179  	}
   180  	return copiedInvocations
   181  }
   182  
   183  func (fake *FakeInterceptTimeout) recordInvocation(key string, args []interface{}) {
   184  	fake.invocationsMutex.Lock()
   185  	defer fake.invocationsMutex.Unlock()
   186  	if fake.invocations == nil {
   187  		fake.invocations = map[string][][]interface{}{}
   188  	}
   189  	if fake.invocations[key] == nil {
   190  		fake.invocations[key] = [][]interface{}{}
   191  	}
   192  	fake.invocations[key] = append(fake.invocations[key], args)
   193  }
   194  
   195  var _ containerserver.InterceptTimeout = new(FakeInterceptTimeout)