Documentation ¶
Index ¶
- Constants
- func GetActivityServiceConfig(ctx context.Context) *lib.RuntimeContext
- func GetTaskListName(taskListNumber int) string
- func IsCancellationAlreadyRequestedError(err error) bool
- func IsEntityNotExistsError(err error) bool
- func IsNonRetryableError(err error) bool
- func IsServiceBusyError(err error) bool
- func RegisterWorker(w worker.Worker)
- func RetryOp(op func() error, isNonRetryableError func(error) bool) error
- type EchoActivityParams
Constants ¶
View Source
const ( // DefaultAvailabilityThreshold is the default threshold for availability DefaultAvailabilityThreshold = 0.99 // DefaultContextTimeout is the default context timeout for RPC calls DefaultContextTimeout = 3 * time.Second )
View Source
const ( // DefaultMaxRetryCount is the default max retry count DefaultMaxRetryCount = 5 // DefaultRetryBackoffDuration is the default backoff duration for retry DefaultRetryBackoffDuration = 50 * time.Millisecond )
View Source
const ( // ErrReasonValidationFailed is the failure reason for validation failure ErrReasonValidationFailed = "validation failed" // ErrReasonWorkflowNotExist is the error reason for workflow not exist ErrReasonWorkflowNotExist = "workflow not exist" )
View Source
const (
// EchoActivityName is the name of echoActivity
EchoActivityName = "echoActivity"
)
Variables ¶
This section is empty.
Functions ¶
func GetActivityServiceConfig ¶
func GetActivityServiceConfig(ctx context.Context) *lib.RuntimeContext
GetActivityServiceConfig returns the service config from activity context Returns nil if the context does not contain the service config
func GetTaskListName ¶
GetTaskListName returns the task list name for the given task list id
func IsCancellationAlreadyRequestedError ¶
IsCancellationAlreadyRequestedError returns if the err is a CancellationAlreadyRequestedError
func IsEntityNotExistsError ¶
IsEntityNotExistsError returns if the err is a EntityNotExistsError
func IsNonRetryableError ¶
IsNonRetryableError return true if the err is considered non-retryable
func IsServiceBusyError ¶
IsServiceBusyError returns if the err is a ServiceBusyError
func RegisterWorker ¶
RegisterWorker registers common activities
Types ¶
type EchoActivityParams ¶
type EchoActivityParams struct {
Payload []byte
}
EchoActivityParams is the paramer for echoActivity
Click to show internal directories.
Click to hide internal directories.