Documentation ¶
Overview ¶
Package mock provides mock implementation for testing.
Copyright (C) 2019-2023 vdaas.org vald team <vald@vdaas.org>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type ServerStreamMock
- func (m *ServerStreamMock) Context() context.Context
- func (m *ServerStreamMock) RecvMsg(msg interface{}) error
- func (m *ServerStreamMock) SendHeader(md metadata.MD) error
- func (m *ServerStreamMock) SendMsg(msg interface{}) error
- func (m *ServerStreamMock) SetHeader(md metadata.MD) error
- func (m *ServerStreamMock) SetTrailer(md metadata.MD)
- type StreamInsertServerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerStreamMock ¶
type ServerStreamMock struct { SetHeaderFunc func(metadata.MD) error SendHeaderFunc func(metadata.MD) error SetTrailerFunc func(metadata.MD) ContextFunc func() context.Context SendMsgFunc func(interface{}) error RecvMsgFunc func(interface{}) error }
ServerStreamMock implements grpc.ServerStream mock implementation.
func (*ServerStreamMock) Context ¶
func (m *ServerStreamMock) Context() context.Context
func (*ServerStreamMock) RecvMsg ¶
func (m *ServerStreamMock) RecvMsg(msg interface{}) error
func (*ServerStreamMock) SendHeader ¶
func (m *ServerStreamMock) SendHeader(md metadata.MD) error
func (*ServerStreamMock) SendMsg ¶
func (m *ServerStreamMock) SendMsg(msg interface{}) error
func (*ServerStreamMock) SetTrailer ¶
func (m *ServerStreamMock) SetTrailer(md metadata.MD)
type StreamInsertServerMock ¶
type StreamInsertServerMock struct { SendFunc func(*payload.Object_StreamLocation) error RecvFunc func() (*payload.Insert_Request, error) grpc.ServerStream }
func (*StreamInsertServerMock) Recv ¶
func (m *StreamInsertServerMock) Recv() (*payload.Insert_Request, error)
func (*StreamInsertServerMock) Send ¶
func (m *StreamInsertServerMock) Send(l *payload.Object_StreamLocation) error