local

package
v0.0.0-...-0a6e51c Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOrCreateKey

func ParseOrCreateKey(hexKeyStr string) (*keys.PrivateKey, error)

ParseOrCreateKey parses the provided key as a hex string or creates a fresh one if empty.

Types

type Client

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

func (*Client) Delete

func (c *Client) Delete(containerID, objectID string) DeleteResponse

func (*Client) Get

func (c *Client) Get(containerID, objectID string) GetResponse

func (*Client) Put

func (c *Client) Put(containerID string, headers map[string]string, payload datagen.Payload) PutResponse

type DeleteResponse

type DeleteResponse SuccessOrErrorResponse

type GetResponse

type GetResponse SuccessOrErrorResponse

type Limiter

type Limiter interface {
	engine.MetricRegister
	IsFull() bool
}

func NewLimiter

func NewLimiter(maxSizeGB int64) Limiter

type Local

type Local struct {
	ResolveEngine func(context.Context, string, string, bool, int64) (*engine.StorageEngine, Limiter, error)
	// contains filtered or unexported fields
}

Local represents an instance of the module for every VU.

func NewLocalModuleInstance

func NewLocalModuleInstance(vu modules.VU, resolveEngine func(context.Context, string, string, bool, int64) (*engine.StorageEngine, Limiter, error)) *Local

func (*Local) Connect

func (s *Local) Connect(configFile, configDir, hexKey string, debug bool, maxSizeGB int64) (*Client, error)

func (*Local) Exports

func (s *Local) Exports() modules.Exports

Exports implements the modules.Instance interface and returns the exports of the JS module.

func (*Local) VU

func (s *Local) VU() modules.VU

type PutResponse

type PutResponse struct {
	Success  bool
	ObjectID string
	Error    string
	Abort    bool
}

type RootModule

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

RootModule is the global module object type. It is instantiated once per test run and will be used to create k6/x/frostfs/local module instances for each VU.

func (*RootModule) GetOrCreateEngine

func (r *RootModule) GetOrCreateEngine(ctx context.Context, configFile string, configDir string, debug bool, maxSizeGB int64) (*engine.StorageEngine, Limiter, error)

GetOrCreateEngine returns the current engine instance for the given configuration file or directory, creating a new one if none exists. Note that the identity of configuration files is their file name for the purposes of test runs.

func (*RootModule) NewModuleInstance

func (r *RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance implements the modules.Module interface and returns a new instance for each VU.

type SuccessOrErrorResponse

type SuccessOrErrorResponse struct {
	Success bool
	Error   string
}

Directories

Path Synopsis
Package rawclient provides a basic interface to the local storage engine.
Package rawclient provides a basic interface to the local storage engine.

Jump to

Keyboard shortcuts

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