load

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAgent

type CreateAgent struct {
	Id int

	Domain         string
	CreateInterval time.Duration

	API dsl.AdminAPI
}

CreateAgent creates PURLs in a given domain with a given interval.

Use this agent to simulate a user continuously generating PURLs.

func NewCreateAgent

func NewCreateAgent(id int, domain string, createInterval time.Duration, API dsl.AdminAPI) *CreateAgent

func (*CreateAgent) Run

func (a *CreateAgent) Run(t *testing.T, done <-chan struct{}, wg *sync.WaitGroup)

Run starts this agent's work loop.

Run ensures that the agent's Domain exists before starting to create PURLs.

The agent runs until a message is sent to the done channel. It will then decrement the given wait group.

You should use this method in a dedicated goroutine as this is a blocking function.

Jump to

Keyboard shortcuts

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