stress

package
v0.0.0-...-a2079b4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 43 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TLSConfig               *tls.Config         `json:"-"`
	ApiURL                  string              `json:"api_url"`
	TokenClientID           string              `json:"token_client_id"`
	TokenClientSecret       string              `json:"token_client_secret"`
	UserCount               int                 `json:"user_count"`
	ConcurrentRequests      int                 `json:"concurrent_requests"`
	IssuerProfileID         string              `json:"issuer_profile_id"`
	IssuerProfileVersion    string              `json:"issuer_profile_version"`
	VerifierProfileID       string              `json:"verifier_profile_id"`
	CredentialTemplateID    string              `json:"credential_template_id"`
	CredentialType          string              `json:"credential_type"`
	InitiateIssuanceRequest json.RawMessage     `json:"initiate_issuance_request"`
	DisableRevokeTest       bool                `json:"disable_revoke_test"`
	Detailed                bool                `json:"detailed"`
	DisableVPTest           bool                `json:"disable_vp_test"`
	VerifierProfileVersion  string              `json:"verifier_profile_version"`
	VerifierPresentationID  string              `json:"verifier_presentation_id"`
	WalletConfiguration     WalletConfiguration `json:"wallet_configuration"`
	Urls                    Urls                `json:"urls"`
}

type Metric

type Metric struct {
	Name string
	Avg  time.Duration
	Max  time.Duration
	Min  time.Duration
}

type PerCredentialData

type PerCredentialData struct {
	Metrics map[string]string `json:"metrics"`
	Error   string            `json:"error"`
}

type Result

type Result struct {
	UserCount          int                           `json:"user_count"`
	ConcurrentRequests int                           `json:"concurrent_requests"`
	Metrics            []*Metric                     `json:"metrics"`
	TotalDuration      time.Duration                 `json:"total_duration"`
	Errors             []error                       `json:"-"`
	PerCredentialData  map[string]*PerCredentialData `json:"per_credential_data"`
}

type Run

type Run struct {
	// contains filtered or unexported fields
}

func NewStressRun

func NewStressRun(
	cfg *Config,
) *Run

func (*Run) Run

func (r *Run) Run(ctx context.Context) (*Result, error)

type TestCase

type TestCase struct {
	// contains filtered or unexported fields
}

func NewTestCase

func NewTestCase(options ...TestCaseOption) (*TestCase, error)

func (*TestCase) Invoke

func (c *TestCase) Invoke() (string, interface{}, error)

type TestCaseOption

type TestCaseOption func(opts *TestCaseOptions)

func WithCredentialType

func WithCredentialType(credentialType string) TestCaseOption

func WithDisableRevokeTestCase

func WithDisableRevokeTestCase(disableRevokeTestCase bool) TestCaseOption

func WithDisableVPTestCase

func WithDisableVPTestCase(disableVpTestCase bool) TestCaseOption

func WithHTTPClient

func WithHTTPClient(client *http.Client) TestCaseOption

func WithInitiateIssuanceRequest

func WithInitiateIssuanceRequest(data json.RawMessage) TestCaseOption

func WithIssuerProfileID

func WithIssuerProfileID(issuerProfileID string) TestCaseOption

func WithIssuerProfileVersion

func WithIssuerProfileVersion(issuerProfileVersion string) TestCaseOption

func WithToken

func WithToken(token string) TestCaseOption

func WithUrls

func WithUrls(configuration Urls) TestCaseOption

func WithVCSAPIURL

func WithVCSAPIURL(apiURL string) TestCaseOption

func WithVerifierPresentationID

func WithVerifierPresentationID(presentationID string) TestCaseOption

func WithVerifierProfileID

func WithVerifierProfileID(verifierProfileID string) TestCaseOption

func WithVerifierProfileVersion

func WithVerifierProfileVersion(verifierProfileVersion string) TestCaseOption

func WithWalletConfiguration

func WithWalletConfiguration(configuration WalletConfiguration) TestCaseOption

type TestCaseOptions

type TestCaseOptions struct {
	// contains filtered or unexported fields
}

type Urls

type Urls struct {
	TrustRegistryHost     string `json:"trust_registry_host"`
	AttestationServiceURL string `json:"attestation_service_url"`
}

type WalletConfiguration

type WalletConfiguration struct {
	Name            string `json:"name"`
	Version         string `json:"version"`
	Type            string `json:"type"`
	Compliance      string `json:"compliance"`
	AttestationType string `json:"attestation_type"`
}

Jump to

Keyboard shortcuts

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