distributed

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

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

Catalog contains a map of workers and clients Catalog is used to configure the distributed indexer.

func NewCatalog

func NewCatalog(cfg config.QueueConfig) (*Catalog, error)

NewCatalog returns a Catalog configured with the values specified in config.QueueConfig. Error is non-nill if config.QueueConfig contains a duplicate queue name.

func (*Catalog) Notifier

func (c *Catalog) Notifier(name string) (*asynq.Client, error)

Notifier returns a *asynq.Client by `name`. An error is returned if name is empty or if a *asynq.Client doesn't exist for `name`.

func (*Catalog) Worker

func (c *Catalog) Worker(name string) (*TipSetWorker, error)

Worker returns a runnable *asynq.Server by `name`. An error is returned if name is empty or if a *asynq.Server doesn't exist for `name`.

type Queue

type Queue interface {
	EnqueueTipSet(ctx context.Context, ts *types.TipSet, indexType indexer.IndexerType, tasks ...string) error
}

type TipSetIndexer

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

func NewTipSetIndexer

func NewTipSetIndexer(q Queue) *TipSetIndexer

func (*TipSetIndexer) TipSet

func (t *TipSetIndexer) TipSet(ctx context.Context, ts *types.TipSet, opts ...indexer.Option) (bool, error)

type TipSetWorker

type TipSetWorker struct {
	RedisConfig  asynq.RedisClientOpt
	ServerConfig asynq.Config
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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