datamover

package
v4.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package datamover implements a streaming data mover

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

A Builder for StreamingDataMover

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a new Builder

func (Builder) Build

func (sdmBuilder Builder) Build(name string) *Comp

Build a new StreamingDataMover

func (Builder) WithBufferSize

func (sdmBuilder Builder) WithBufferSize(
	inputBufferSize uint64,
) Builder

WithBufferSize sets the buffer size of StreamingDataMover

func (Builder) WithEngine

func (sdmBuilder Builder) WithEngine(
	inputEngine sim.Engine,
) Builder

WithEngine sets StreamingDataMover's engine

func (Builder) WithInsideByteGranularity

func (sdmBuilder Builder) WithInsideByteGranularity(
	inputInsideByteGranularity uint64,
) Builder

WithInsideByteGranularity sets the inside byte granularity of StreamingDataMover

func (Builder) WithInsidePortMapper

func (sdmBuilder Builder) WithInsidePortMapper(
	inputInsidePortMapper mem.AddressToPortMapper,
) Builder

WithInsidePortMapper sets the inside port mapper of StreamingDataMover

func (Builder) WithOutsideByteGranularity

func (sdmBuilder Builder) WithOutsideByteGranularity(
	inputOutsideByteGranularity uint64,
) Builder

WithOutsideByteGranularity sets the outside byte granularity of StreamingDataMover

func (Builder) WithOutsidePortMapper

func (sdmBuilder Builder) WithOutsidePortMapper(
	inputOutsidePortMapper mem.AddressToPortMapper,
) Builder

WithOutsidePortMapper sets the outside port mapper of StreamingDataMover

type Comp

type Comp struct {
	*sim.TickingComponent
	// contains filtered or unexported fields
}

Comp helps moving data from designated source and destination following the given move direction

func (*Comp) Tick

func (c *Comp) Tick() bool

Tick ticks

type DataMoveRequest

type DataMoveRequest struct {
	sim.MsgMeta
	SrcAddress uint64
	DstAddress uint64
	ByteSize   uint64
	SrcSide    DateMovePort
	DstSide    DateMovePort
}

A DataMoveRequest asks DataMover to transfer data

func (*DataMoveRequest) Clone

func (req *DataMoveRequest) Clone() sim.Msg

Clone creates a deep copy of the DataMoveRequest with a new ID

func (*DataMoveRequest) GenerateRsp

func (req *DataMoveRequest) GenerateRsp() sim.Msg

GenerateRsp creates a response message for the request.

func (*DataMoveRequest) Meta

func (req *DataMoveRequest) Meta() *sim.MsgMeta

Meta returns the metadata of the message

type DataMoveRequestBuilder

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

DataMoveRequestBuilder can build new data move requests

func MakeDataMoveRequestBuilder

func MakeDataMoveRequestBuilder() DataMoveRequestBuilder

MakeDataMoveRequestBuilder creates a new DataMoveRequestBuilder

func (DataMoveRequestBuilder) Build

Build creates a new DataMoveRequest.

func (DataMoveRequestBuilder) WithByteSize

func (b DataMoveRequestBuilder) WithByteSize(
	inputByteSize uint64,
) DataMoveRequestBuilder

WithByteSize sets the byte size of the data to be moved.

func (DataMoveRequestBuilder) WithDst

WithDst sets the destination port of the message. It should be the CtrlPort of the DataMover.

func (DataMoveRequestBuilder) WithDstAddress

func (b DataMoveRequestBuilder) WithDstAddress(
	inputDstAddress uint64,
) DataMoveRequestBuilder

WithDstAddress sets the destination address of the data to be moved.

func (DataMoveRequestBuilder) WithDstSide

WithDstSide sets the destination side of the data to be moved.

func (DataMoveRequestBuilder) WithSrc

WithSrc sets the source port of the message.

func (DataMoveRequestBuilder) WithSrcAddress

func (b DataMoveRequestBuilder) WithSrcAddress(
	inputSrcAddress uint64,
) DataMoveRequestBuilder

WithSrcAddress sets the source address of the data to be moved.

func (DataMoveRequestBuilder) WithSrcSide

WithSrcSide sets the source side of the data to be moved.

type DateMovePort

type DateMovePort string

DateMovePort is the port name that either serves as a source or destination. It can be either inside or outside.

const (
	InsidePort  DateMovePort = "inside"
	OutsidePort DateMovePort = "outside"
)

Jump to

Keyboard shortcuts

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