process

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(task *pb.Task) (result int, err error)

Exec executes a program

func RepeatHeartBeat

func RepeatHeartBeat(
	workCtx context.Context,
	workCancel context.CancelFunc,
	grpcDriver *client.GRPCDriver,
	queueID string, taskID string,
)

RepeatHeartBeat calls the heartbeat function repeatedly, until the task completes

func Work

func Work(grpcDriver *client.GRPCDriver, queueID string, workType string) (result int, err error)

Work manages getting, heartbeating, and completing or failing items, in a loop

Types

type MethodConfig added in v0.5.5

type MethodConfig struct {
	Name         []Name         `json:"name"`
	WaitForReady bool           `json:"waitForReady"`
	RetryPolicy  RetryPolicyDef `json:"retryPolicy"`
}

type Name added in v0.5.5

type Name struct {
	Service string `json:"service"`
}

type RetryPolicy added in v0.5.5

type RetryPolicy struct {
	MethodConfig []MethodConfig `json:"methodConfig"`
}

type RetryPolicyDef added in v0.5.5

type RetryPolicyDef struct {
	MaxAttempts          int      `json:"MaxAttempts"`
	InitialBackoff       string   `json:"InitialBackoff"`
	MaxBackoff           string   `json:"MaxBackoff"`
	BackoffMultiplier    float64  `json:"BackoffMultiplier"`
	RetryableStatusCodes []string `json:"RetryableStatusCodes"`
}

Jump to

Keyboard shortcuts

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