Documentation ¶
Index ¶
- type MockAppChannel
- func (_m *MockAppChannel) GetAppConfig(_ context.Context, _ string) (*config.ApplicationConfig, error)
- func (_m *MockAppChannel) GetInvokedRequest() map[string][]byte
- func (_m *MockAppChannel) HealthProbe(ctx context.Context) (bool, error)
- func (_m *MockAppChannel) Init()
- func (_m *MockAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest, appID string) (*invokev1.InvokeMethodResponse, error)
- func (_m *MockAppChannel) SetAppHealth(ah *apphealth.AppHealth)
- type MockClientConn
- type MockServer
- func (m *MockServer) HealthCheck(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.HealthCheckResponse, error)
- func (m *MockServer) Init()
- func (m *MockServer) ListInputBindings(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.ListInputBindingsResponse, error)
- func (m *MockServer) ListTopicSubscriptions(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.ListTopicSubscriptionsResponse, error)
- func (m *MockServer) OnBindingEvent(ctx context.Context, in *runtimev1pb.BindingEventRequest) (*runtimev1pb.BindingEventResponse, error)
- func (m *MockServer) OnBulkTopicEventAlpha1(ctx context.Context, in *runtimev1pb.TopicEventBulkRequest) (*runtimev1pb.TopicEventBulkResponse, error)
- func (m *MockServer) OnInvoke(ctx context.Context, in *commonv1pb.InvokeRequest) (*commonv1pb.InvokeResponse, error)
- func (m *MockServer) OnTopicEvent(ctx context.Context, in *runtimev1pb.TopicEventRequest) (*runtimev1pb.TopicEventResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAppChannel ¶
MockAppChannel is an autogenerated mock type for the AppChannel type
func NewMockAppChannel ¶ added in v1.9.0
func NewMockAppChannel(t mockConstructorTestingTNewMockAppChannel) *MockAppChannel
NewMockAppChannel creates a new instance of MockAppChannel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockAppChannel) GetAppConfig ¶ added in v1.2.0
func (_m *MockAppChannel) GetAppConfig(_ context.Context, _ string) (*config.ApplicationConfig, error)
GetAppConfig provides a mock function with given fields:
func (*MockAppChannel) GetInvokedRequest ¶ added in v1.10.0
func (_m *MockAppChannel) GetInvokedRequest() map[string][]byte
func (*MockAppChannel) HealthProbe ¶ added in v1.9.0
func (_m *MockAppChannel) HealthProbe(ctx context.Context) (bool, error)
HealthProbe provides a mock function with given fields: ctx
func (*MockAppChannel) Init ¶ added in v1.10.0
func (_m *MockAppChannel) Init()
func (*MockAppChannel) InvokeMethod ¶
func (_m *MockAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest, appID string) (*invokev1.InvokeMethodResponse, error)
InvokeMethod provides a mock function with given fields: ctx, req, appID
func (*MockAppChannel) SetAppHealth ¶ added in v1.9.0
func (_m *MockAppChannel) SetAppHealth(ah *apphealth.AppHealth)
SetAppHealth provides a mock function with given fields: ah
type MockClientConn ¶ added in v1.3.0
type MockClientConn struct { grpc.ClientConnInterface InvokeFn func(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error }
MockClientConn is a mock implementation of grpc.ClientConnInterface.
func (*MockClientConn) Close ¶ added in v1.3.0
func (m *MockClientConn) Close() error
Close implements io.Closer.
func (*MockClientConn) Invoke ¶ added in v1.3.0
func (m *MockClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
type MockServer ¶ added in v1.0.0
type MockServer struct { Error error Subscriptions []*runtimev1pb.TopicSubscription Bindings []string BindingEventResponse runtimev1pb.BindingEventResponse TopicEventResponseStatus runtimev1pb.TopicEventResponse_TopicEventResponseStatus ListTopicSubscriptionsResponse *runtimev1pb.ListTopicSubscriptionsResponse RequestsReceived map[string]*runtimev1pb.TopicEventBulkRequest BulkResponsePerPath map[string]*runtimev1pb.TopicEventBulkResponse ValidateCloudEventExtension *map[string]interface{} // contains filtered or unexported fields }
MockServer implementation of fake user app server. It implements both AppCallback and AppCallbackHealthCheck.
func (*MockServer) HealthCheck ¶ added in v1.9.0
func (m *MockServer) HealthCheck(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.HealthCheckResponse, error)
func (*MockServer) Init ¶ added in v1.10.0
func (m *MockServer) Init()
func (*MockServer) ListInputBindings ¶ added in v1.0.0
func (m *MockServer) ListInputBindings(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.ListInputBindingsResponse, error)
func (*MockServer) ListTopicSubscriptions ¶ added in v1.0.0
func (m *MockServer) ListTopicSubscriptions(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.ListTopicSubscriptionsResponse, error)
func (*MockServer) OnBindingEvent ¶ added in v1.0.0
func (m *MockServer) OnBindingEvent(ctx context.Context, in *runtimev1pb.BindingEventRequest) (*runtimev1pb.BindingEventResponse, error)
func (*MockServer) OnBulkTopicEventAlpha1 ¶ added in v1.10.0
func (m *MockServer) OnBulkTopicEventAlpha1(ctx context.Context, in *runtimev1pb.TopicEventBulkRequest) (*runtimev1pb.TopicEventBulkResponse, error)
func (*MockServer) OnInvoke ¶ added in v1.0.0
func (m *MockServer) OnInvoke(ctx context.Context, in *commonv1pb.InvokeRequest) (*commonv1pb.InvokeResponse, error)
func (*MockServer) OnTopicEvent ¶ added in v1.0.0
func (m *MockServer) OnTopicEvent(ctx context.Context, in *runtimev1pb.TopicEventRequest) (*runtimev1pb.TopicEventResponse, error)