grpcclient

package
v0.0.0-...-f7b9b20 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcServerSimulator

type GrpcServerSimulator struct {
	Opts       *Opts
	Randomizer *rand.Rand
	// contains filtered or unexported fields
}

func New

func New(
	log *logger.Logger,
	optFuncs ...OptFunc,
) *GrpcServerSimulator

Create an gRPC server simulator instance

func (*GrpcServerSimulator) Simulate

func (g *GrpcServerSimulator) Simulate(
	users []string,
)

Starts simulating gRPC server

type OptFunc

type OptFunc func(*Opts)

func WithRequestInterval

func WithRequestInterval(requestInterval string) OptFunc

Configure HTTP server request interval

func WithServerEndpoint

func WithServerEndpoint(serverEndpoint string) OptFunc

Configure HTTP server endpoint

func WithServerPort

func WithServerPort(serverPort string) OptFunc

Configure HTTP server port

func WithServiceName

func WithServiceName(serviceName string) OptFunc

Configure service name of simulator

type Opts

type Opts struct {
	ServiceName     string
	RequestInterval int64
	ServerEndpoint  string
	ServerPort      string
}

Jump to

Keyboard shortcuts

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