load

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 8 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, ctx context.Context, 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 the given context is cancelled. 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