benchgateway

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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) Close

func (gateway *BenchGateway) Close()

Close test gateway

func (*BenchGateway) HTTPBackends

func (gateway *BenchGateway) HTTPBackends() map[string]*testBackend.TestHTTPBackend

HTTPBackends returns the HTTP backends of the gateway

func (*BenchGateway) HTTPPort

func (gateway *BenchGateway) HTTPPort() int

HTTPPort ...

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) MakeTChannelRequest

func (gateway *BenchGateway) MakeTChannelRequest(
	ctx context.Context,
	thriftService string,
	method string,
	headers map[string]string,
	req, res zanzibar.RWTStruct,
) (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

Jump to

Keyboard shortcuts

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