stall

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FtpFileStaller

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

Acts as an IO.reader stream. It generates data using the generator and encoder and sends data in a requested chunk size It internally tracks how many bytes have been sent and gives an EOF once all req

func NewFtpFileStall

func NewFtpFileStall(args *NewFtpFileStallerArgs) *FtpFileStaller

func (*FtpFileStaller) BindToPool

func (f *FtpFileStaller) BindToPool(deregisterChan chan stallLib.Staller)

func (*FtpFileStaller) Close

func (f *FtpFileStaller) Close()

Shuts down the staller instance and cleans up any resources

func (*FtpFileStaller) GetGroupIdentifier

func (f *FtpFileStaller) GetGroupIdentifier() string

Gets the group identifier for the staller

func (*FtpFileStaller) GetIdentifier

func (f *FtpFileStaller) GetIdentifier() uint64

Gets the identifier for the staller

func (*FtpFileStaller) Halt

func (f *FtpFileStaller) Halt()

func (*FtpFileStaller) Read

func (f *FtpFileStaller) Read(p []byte) (n int, err error)

io.Reader interface implementation

func (*FtpFileStaller) String

func (f *FtpFileStaller) String() string

type FtpFileStallerFactory

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

func NewFtpFileStallerFactory

func NewFtpFileStallerFactory(
	config *config.Config,
	stallerPool *stall.StallerPool,
	configGenerators *generator.ConfigGeneratorCollection,
	secretGenerators *secrets.SecretGeneratorCollection,
) *FtpFileStallerFactory

func (*FtpFileStallerFactory) FromName

func (f *FtpFileStallerFactory) FromName(ctx ftpserver.ClientContext, name string, size int) *FtpFileStaller

Creates a single file stalling handle

type NewFtpFileStallerArgs

type NewFtpFileStallerArgs struct {
	// DI container for the ftp server
	Config *config.Config

	// Id of this specific staller
	Id uint64

	// Group identifier for the stalling client
	GroupId string

	// The associated encoder for the staller
	Encoder encoder.Encoder

	// The associated generator for the staller
	Generator generator.Generator

	// Number of bytes to send as part of the staller action
	BytesToSend int
}

Acts as an IO.reader stream. It generates data using the generator and encoder and sends data in a requested chunk size It internally tracks how many bytes have been sent and gives an EOF once all req

Jump to

Keyboard shortcuts

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