Documentation
¶
Overview ¶
Package client provides access to the workflow service. You can use this client to:
Submit a *pb.WorkReq to the service Execute a *pb.WorkReq previously submitted Get the status of a *pb.WorkReq
See the README.md in the root workflow/ directory for more information.
SECURITY NOTICE: As this is an example for a book and is meant to be run in a secure environment, we use grpc.WithInsecure(). Aka, not production ready.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
Workflow represents our Workflow client. It uses a builtin circuit breaker wrapping an exponential backoff. The context passed to any method should be the maximum time you are willing to wait including all retries. If a call returns an error because the context expires, the circuit breaker will trip. Errors without gRPC status codes or with status codes of DeadlineExceeded or ResourceExhausted are considered fatal errors. Fatal errors do not get retries and do not trip the circuit breaker.
func (*Workflow) Exec ¶
Exec causes the server to execute a pb.WorkReq that was previously accepted by the server via a Submit() call.