worker

package
v0.0.9-beta Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Request *pbsubstreams.Request
}

func (*Job) MarshalLogObject

func (j *Job) MarshalLogObject(enc zapcore.ObjectEncoder) error

type Pool

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

func NewPool

func NewPool(workerCount int, grpcClientFactory func() (pbsubstreams.StreamClient, []grpc.CallOption, error)) *Pool

func (*Pool) Borrow

func (p *Pool) Borrow() *Worker

func (*Pool) ReturnWorker

func (p *Pool) ReturnWorker(worker *Worker)

type Worker

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

func (*Worker) Run

func (w *Worker) Run(ctx context.Context, job *Job, respFunc substreams.ResponseFunc) error

Jump to

Keyboard shortcuts

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