mock

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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

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) SetHeader

func (m *ServerStreamMock) SetHeader(md metadata.MD) 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 (*StreamInsertServerMock) Send

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL