utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utils contains internal utilities for the github.com/jucrouzet/grpcutils package tests and code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCallFoo

func TestCallFoo(
	t *testing.T,
	impl foobar.DummyServiceServer,
	clientOpts []grpc.DialOption,
	serverOpts []grpc.ServerOption,
	clientContext ...context.Context,
) (*foobar.Empty, metadata.MD, metadata.MD, error)

TestCallFoo for tests

func TestCallFooS

func TestCallFooS(
	t *testing.T,
	impl foobar.DummyServiceServer,
	clientOpts []grpc.DialOption,
	serverOpts []grpc.ServerOption,
	clientContext ...context.Context,
) (metadata.MD, metadata.MD)

TestCallFooS for tests

Types

type ServerStream

type ServerStream struct {
	grpc.ServerStream
	Ctx context.Context
}

ServerStream composes a new grpc stream server with a new context

func (*ServerStream) Context

func (s *ServerStream) Context() context.Context

Context returns the server's context

Jump to

Keyboard shortcuts

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