package testutil

import "google.golang.org/grpc/credentials/alts/core/testutil"

Package testutil include useful test utilities for the handshaker.

Index

Functions

func MakeFrame

func MakeFrame(pl string) []byte

MakeFrame creates a handshake frame.

func NewTestConn

func NewTestConn(in *bytes.Buffer, out *bytes.Buffer) net.Conn

NewTestConn creates a new instance of testConn object.

func NewUnresponsiveTestConn

func NewUnresponsiveTestConn() net.Conn

NewUnresponsiveTestConn creates a new instance of unresponsiveTestConn object.

Types

type Stats

type Stats struct {
	MaxConcurrentCalls int
	// contains filtered or unexported fields
}

Stats is used to collect statistics about concurrent handshake calls.

func (*Stats) Reset

func (s *Stats) Reset()

Reset resets the statistics.

func (*Stats) Update

func (s *Stats) Update() func()

Update updates the statistics by adding one call.

Source Files

testutil.go

Version
v1.12.2
Published
Jun 7, 2018
Platform
linux/amd64
Imports
6 packages
Last checked
54 seconds ago

Tools for package owners.