Skip to content

v0.62.0

Compare
Choose a tag to compare
@bojand bojand released this 25 Oct 20:27
· 395 commits to master since this release

Changelog

v0.62.0 - 2020-10-25

  • [feature] [option] adding a func as a option to randomize each request #236

Example

func dataFunc(mtd *desc.MethodDescriptor, cd *runner.CallData) []byte {
	msg := &helloworld.HelloRequest{}
	msg.Name = cd.WorkerID
	binData, err := proto.Marshal(msg)
	return binData
}

report, err := runner.Run(
	"helloworld.Greeter.SayHello",
	"0.0.0.0:50051",
	runner.WithProtoFile("./testdata/greeter.proto", []string{}),
	runner.WithInsecure(true),
	runner.WithBinaryDataFunc(dataFunc),
)