publish

package
v0.1.122-dev Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "publish",
	Short: "Publish transactions to the network with high-throughput.",
	Long:  cmdUsage,
	PreRunE: func(cmd *cobra.Command, args []string) (err error) {
		publishInputArgs.rpcURL, err = flag.GetRPCURL(cmd)
		if err != nil {
			return err
		}
		return nil
	},
	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