Help us shape the future of Go! Take the 2026 Go Developer Survey

publish

package
v0.1.114 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

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