processor

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFSProcessor

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

IPFSProcessor is a struct that implements the Processor interface for IPFS.

func NewIPFSProcessor

func NewIPFSProcessor(q queue.Queue, b backend.Backend, ipfsGateway string, pollTime time.Duration, concurrency int) *IPFSProcessor

NewIPFSProcessor creates a new IPFSProcessor instance with the specified queue, IPFS gateway, and ticker time.

func (*IPFSProcessor) FetchCID

func (p *IPFSProcessor) FetchCID(cid string) (ipfs.Metadata, error)

FetchCID fetches the content of the specified CID from the IPFS gateway and returns it as an ipfs.Metadata struct.

func (*IPFSProcessor) Run

func (p *IPFSProcessor) Run()

Run starts the IPFSProcessor and processes items from the queue.

func (*IPFSProcessor) Stop

func (p *IPFSProcessor) Stop()

Stop stops the IPFSProcessor.

func (*IPFSProcessor) Wait

func (p *IPFSProcessor) Wait()

Wait waits for the IPFSProcessor to stop.

func (*IPFSProcessor) Work

func (p *IPFSProcessor) Work(item queue.QueueItem) error

Jump to

Keyboard shortcuts

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