package
1.0.5
Repository: https://github.com/blampe/tchannel-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CallEcho calls the "echo" endpoint from the given src to target.
Decrementor returns a function that can be called from multiple goroutines and ensures it will only return true n times.
DefaultOpts will return opts if opts is non-nil, NewOpts otherwise.
DurationArray returns an array with the given durations.
FrameRelay sets up a relay that can modify frames using relayFunc.
GetAcceptCloseHostPort returns a host:port that will accept a connection then immediately close it.
GetClosedHostPort will return a host:port that will refuse connections.
NewClient returns a new TChannel that is not listening.
NewClientChannel creates a TChannel that is not listening.
NewIncomingCall creates an incoming call for tests.
NewOpts returns a new ChannelOpts that can be used in a chained fashion.
NewServer returns a new TChannel server that listens on :0.
NewServerChannel creates a TChannel that is listening and returns the channel.
NewTestServer constructs a TestServer.
NowStub returns a stub time.Now function that allows the return values to to be controller by the caller.
Ping sends a ping from src to target.
RandBytes returns n random byte slice that points to a shared random byte array.
RandString returns a random alphanumeric string for testing.
RegisterEcho registers an echo endpoint on the given channel.
RegisterFunc registers a function as a handler for the given method name.
ResetSleepStub resets a Sleep stub.
RunN runs the given f n times (and passes the run's index) and waits till they complete.
SetTimeout is used to fail tests after a timeout.
SleepStub stubs a function variable that points to time.Sleep.
StrArray will return an array with the given strings.
StrMap returns a map where the keys are the given strings.
Timeout returns the timeout multiplied by any set multiplier.
WaitFor will retry f till it returns true for a maximum of timeout.
WaitWG waits for the given WaitGroup to be complete with a timeout and returns whether the WaitGroup completed within the timeout.
WithServer sets up a TChannel that is listening and runs the given function with the channel.
WithTestServer creates a new TestServer, runs the passed function, and then verifies that no resources were leaked.

# Constants

Default service names for the test channels.
Default service names for the test channels.

# Structs

ChannelOpts contains options to create a test channel using WithServer.
FakeIncomingCall implements IncomingCall interface.
LogFilter is a single substring match that can be ignored.
LogVerification contains options to control the log verification.
A TestServer encapsulates a TChannel server, a client factory, and functions to ensure that we're not leaking resources.