Documentation ¶
Index ¶
- func CreateGateway(seedConfig map[string]interface{}, opts *testGateway.Options, ...) (testGateway.TestGateway, error)
- type BenchGateway
- func (gateway *BenchGateway) AllLogs() map[string][]testGateway.LogMessage
- func (gateway *BenchGateway) Close()
- func (gateway *BenchGateway) Config() *zanzibar.StaticConfig
- func (gateway *BenchGateway) HTTPBackends() map[string]*testBackend.TestHTTPBackend
- func (gateway *BenchGateway) HTTPPort() int
- func (gateway *BenchGateway) Logs(level string, msg string) []testGateway.LogMessage
- func (gateway *BenchGateway) MakeRequest(method string, url string, headers map[string]string, body io.Reader) (*http.Response, error)
- func (gateway *BenchGateway) MakeRequestWithHeaderValues(method string, url string, headers zanzibar.Header, body io.Reader) (*http.Response, error)
- func (gateway *BenchGateway) MakeTChannelRequest(ctx context.Context, thriftService string, method string, ...) (bool, map[string]string, error)
- func (gateway *BenchGateway) TChannelBackends() map[string]*testBackend.TestTChannelBackend
- type CreateGatewayFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGateway ¶
func CreateGateway( seedConfig map[string]interface{}, opts *testGateway.Options, createGateway CreateGatewayFn, ) (testGateway.TestGateway, error)
CreateGateway bootstrap gateway for testing
Types ¶
type BenchGateway ¶
type BenchGateway struct { ActualGateway *zanzibar.Gateway Dependencies interface{} // contains filtered or unexported fields }
BenchGateway for testing
func (*BenchGateway) AllLogs ¶
func (gateway *BenchGateway) AllLogs() map[string][]testGateway.LogMessage
AllLogs ...
func (*BenchGateway) Config ¶
func (gateway *BenchGateway) Config() *zanzibar.StaticConfig
Config returns static config loaded from file + seed config
func (*BenchGateway) HTTPBackends ¶
func (gateway *BenchGateway) HTTPBackends() map[string]*testBackend.TestHTTPBackend
HTTPBackends returns the HTTP backends of the gateway
func (*BenchGateway) Logs ¶
func (gateway *BenchGateway) Logs( level string, msg string, ) []testGateway.LogMessage
Logs ...
func (*BenchGateway) MakeRequest ¶
func (gateway *BenchGateway) MakeRequest( method string, url string, headers map[string]string, body io.Reader, ) (*http.Response, error)
MakeRequest helper
func (*BenchGateway) MakeRequestWithHeaderValues ¶
func (gateway *BenchGateway) MakeRequestWithHeaderValues( method string, url string, headers zanzibar.Header, body io.Reader, ) (*http.Response, error)
MakeRequestWithHeaderValues helper
func (*BenchGateway) MakeTChannelRequest ¶
func (gateway *BenchGateway) MakeTChannelRequest( ctx context.Context, thriftService string, method string, headers map[string]string, req, res zanzibar.RWTStruct, timeoutAndRetryOptions *zanzibar.TimeoutAndRetryOptions, ) (bool, map[string]string, error)
MakeTChannelRequest helper
func (*BenchGateway) TChannelBackends ¶
func (gateway *BenchGateway) TChannelBackends() map[string]*testBackend.TestTChannelBackend
TChannelBackends returns the TChannel backends of the gateway
type CreateGatewayFn ¶
type CreateGatewayFn func( config *zanzibar.StaticConfig, opts *zanzibar.Options, ) (*zanzibar.Gateway, interface{}, error)
CreateGatewayFn creates a new gateway to benchmark
Click to show internal directories.
Click to hide internal directories.