tasks

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeGapFillTipSet = "tipset:gapfill"
)
View Source
const (
	TypeIndexTipSet = "tipset:index"
)

Variables

This section is empty.

Functions

func NewGapFillTipSetTask

func NewGapFillTipSetTask(ctx context.Context, ts *types.TipSet, tasks []string) (*asynq.Task, error)

func NewIndexTipSetTask

func NewIndexTipSetTask(ctx context.Context, ts *types.TipSet, tasks []string) (*asynq.Task, error)

Types

type AsynqGapFillTipSetTaskHandler

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

func (*AsynqGapFillTipSetTaskHandler) HandleGapFillTipSetTask

func (gh *AsynqGapFillTipSetTaskHandler) HandleGapFillTipSetTask(ctx context.Context, t *asynq.Task) error

type AsynqTipSetTaskHandler

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

func NewIndexHandler

func NewIndexHandler(i indexer.Indexer) *AsynqTipSetTaskHandler

func (*AsynqTipSetTaskHandler) HandleIndexTipSetTask

func (ih *AsynqTipSetTaskHandler) HandleIndexTipSetTask(ctx context.Context, t *asynq.Task) error

type GapFillTipSetPayload

type GapFillTipSetPayload struct {
	TipSet       *types.TipSet
	Tasks        []string
	TraceCarrier *tracing.TraceCarrier `json:",omitempty"`
}

func (GapFillTipSetPayload) Attributes added in v0.10.1

func (g GapFillTipSetPayload) Attributes() []attribute.KeyValue

Attributes returns a slice of attributes for populating tracing span attributes.

func (GapFillTipSetPayload) HasTraceCarrier

func (g GapFillTipSetPayload) HasTraceCarrier() bool

HasTraceCarrier returns true iff payload contains a trace.

func (GapFillTipSetPayload) MarshalLogObject added in v0.10.1

func (g GapFillTipSetPayload) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implement ObjectMarshaler and allows user-defined types to efficiently add themselves to the logging context, and to selectively omit information which shouldn't be included in logs (e.g., passwords).

type IndexTipSetPayload

type IndexTipSetPayload struct {
	TipSet       *types.TipSet
	Tasks        []string
	TraceCarrier *tracing.TraceCarrier `json:",omitempty"`
}

func (IndexTipSetPayload) Attributes added in v0.10.1

func (i IndexTipSetPayload) Attributes() []attribute.KeyValue

Attributes returns a slice of attributes for populating tracing span attributes.

func (IndexTipSetPayload) HasTraceCarrier

func (i IndexTipSetPayload) HasTraceCarrier() bool

HasTraceCarrier returns true iff payload contains a trace.

func (IndexTipSetPayload) MarshalLogObject added in v0.10.1

func (i IndexTipSetPayload) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implement ObjectMarshaler and allows user-defined types to efficiently add themselves to the logging context, and to selectively omit information which shouldn't be included in logs (e.g., passwords).

Jump to

Keyboard shortcuts

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