testutil

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Local = "local"

Variables

This section is empty.

Functions

This section is empty.

Types

type StubResponseWriter

type StubResponseWriter struct {
	DoCall       func(context.Context, uint32, []byte) ([]byte, error)
	DoNotify     func(context.Context, uint32, []byte) error
	DoSend       func(context.Context, iproto.Packet) error
	DoOnClose    func(func())
	DoClose      func()
	DoDone       func() <-chan struct{}
	DoShutdown   func()
	DoRemoteAddr func() net.Addr
	DoLocalAddr  func() net.Addr
}

func NewFakeResponseWriter

func NewFakeResponseWriter() *StubResponseWriter

func (*StubResponseWriter) Call

func (s *StubResponseWriter) Call(ctx context.Context, message uint32, data []byte) ([]byte, error)

func (*StubResponseWriter) Close

func (s *StubResponseWriter) Close()

func (*StubResponseWriter) Done

func (s *StubResponseWriter) Done() <-chan struct{}

func (*StubResponseWriter) GetBytes

func (s *StubResponseWriter) GetBytes(n int) []byte

func (*StubResponseWriter) LocalAddr

func (s *StubResponseWriter) LocalAddr() net.Addr

func (*StubResponseWriter) Notify

func (s *StubResponseWriter) Notify(ctx context.Context, message uint32, data []byte) error

func (*StubResponseWriter) OnClose

func (s *StubResponseWriter) OnClose(f func())

func (*StubResponseWriter) PutBytes

func (s *StubResponseWriter) PutBytes([]byte)

func (*StubResponseWriter) RemoteAddr

func (s *StubResponseWriter) RemoteAddr() net.Addr

func (*StubResponseWriter) Send

func (s *StubResponseWriter) Send(ctx context.Context, packet iproto.Packet) error

func (*StubResponseWriter) Shutdown

func (s *StubResponseWriter) Shutdown()

Jump to

Keyboard shortcuts

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