github.com/anycable/anycable-go@v1.5.1/mocks/Subscriber.go (about)

     1  // Code generated by mockery v2.20.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	common "github.com/anycable/anycable-go/common"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // Subscriber is an autogenerated mock type for the Subscriber type
    14  type Subscriber struct {
    15  	mock.Mock
    16  }
    17  
    18  // Broadcast provides a mock function with given fields: msg
    19  func (_m *Subscriber) Broadcast(msg *common.StreamMessage) {
    20  	_m.Called(msg)
    21  }
    22  
    23  // BroadcastCommand provides a mock function with given fields: msg
    24  func (_m *Subscriber) BroadcastCommand(msg *common.RemoteCommandMessage) {
    25  	_m.Called(msg)
    26  }
    27  
    28  // IsMultiNode provides a mock function with given fields:
    29  func (_m *Subscriber) IsMultiNode() bool {
    30  	ret := _m.Called()
    31  
    32  	var r0 bool
    33  	if rf, ok := ret.Get(0).(func() bool); ok {
    34  		r0 = rf()
    35  	} else {
    36  		r0 = ret.Get(0).(bool)
    37  	}
    38  
    39  	return r0
    40  }
    41  
    42  // Shutdown provides a mock function with given fields: ctx
    43  func (_m *Subscriber) Shutdown(ctx context.Context) error {
    44  	ret := _m.Called(ctx)
    45  
    46  	var r0 error
    47  	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
    48  		r0 = rf(ctx)
    49  	} else {
    50  		r0 = ret.Error(0)
    51  	}
    52  
    53  	return r0
    54  }
    55  
    56  // Start provides a mock function with given fields: done
    57  func (_m *Subscriber) Start(done chan error) error {
    58  	ret := _m.Called(done)
    59  
    60  	var r0 error
    61  	if rf, ok := ret.Get(0).(func(chan error) error); ok {
    62  		r0 = rf(done)
    63  	} else {
    64  		r0 = ret.Error(0)
    65  	}
    66  
    67  	return r0
    68  }
    69  
    70  // Subscribe provides a mock function with given fields: stream
    71  func (_m *Subscriber) Subscribe(stream string) {
    72  	_m.Called(stream)
    73  }
    74  
    75  // Unsubscribe provides a mock function with given fields: stream
    76  func (_m *Subscriber) Unsubscribe(stream string) {
    77  	_m.Called(stream)
    78  }
    79  
    80  type mockConstructorTestingTNewSubscriber interface {
    81  	mock.TestingT
    82  	Cleanup(func())
    83  }
    84  
    85  // NewSubscriber creates a new instance of Subscriber. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    86  func NewSubscriber(t mockConstructorTestingTNewSubscriber) *Subscriber {
    87  	mock := &Subscriber{}
    88  	mock.Mock.Test(t)
    89  
    90  	t.Cleanup(func() { mock.AssertExpectations(t) })
    91  
    92  	return mock
    93  }