publish

package
v0.1.87 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputDataSourceFile  = "file"
	InputDataSourceArgs  = "args"
	InputDataSourceStdin = "stdin"
)
View Source
const (
	ArgRpcURL = "rpc-url"
	ArgForkID = "fork-id"
)

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "publish",
	Short: "Publish transactions to the network with high-throughput",
	Long:  cmdUsage,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		publishInputArgs.rpcURL = flag_loader.GetRpcUrlFlagValue(cmd)
	},
	RunE: publish,
}

Functions

This section is empty.

Types

type JobFn

type JobFn func(ctx context.Context, workerID uint64)

type WorkerPool

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

WorkerPool manages a pool of worker goroutines

func NewWorkerPool

func NewWorkerPool(numWorkers, queueSize uint64) *WorkerPool

NewWorkerPool creates a new worker pool

func (*WorkerPool) Start

func (wp *WorkerPool) Start(ctx context.Context)

Start starts the worker pool

func (*WorkerPool) Stop

func (wp *WorkerPool) Stop()

Stop stops the worker pool and waits for all workers to finish

func (*WorkerPool) SubmitJob

func (wp *WorkerPool) SubmitJob(job JobFn)

SubmitJob submits a job to the worker pool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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