Documentation ¶
Index ¶
- Constants
- func ActicateJob(client dapr_client.Client, context context.Context, ...) (*[]pb.ActivatedJob, error)
- func CheckZeebeConnection(ctx flow.Context) error
- func CheckZeebeConnectionTls(relativeCertPath string) func(ctx flow.Context) error
- func CreateProcessInstance(client dapr_client.Client, context context.Context, ...) (*pb.CreateProcessInstanceWithResultResponse, error)
- func ExecCommandOperation(context context.Context, client dapr_client.Client, ...) (out *dapr_client.BindingEvent, err error)
- func GetDaprClient(grpcPort int) dapr_client.Client
- func GetTestFile(fileName string, modifiers ...func(string) string) ([]byte, error)
- func IDModifier(id string) func(string) string
- func NameModifier(name string) func(string) string
- func ProvideKeyAndCert(relativeCertPath string) func(ctx flow.Context) error
- func RetryModifier(jobType string, retries int) func(string) string
- func TestID() string
- type DeployResourceResponseJson
- type DeploymentJson
- type DeploymentMetadataJson
- type EnvVars
Constants ¶
const ( SidecarName = "zeebeSidecar" CommandName = "zeebe-command" JobworkerTestName = "zeebe-jobworker-test" JobworkerCalcExecName = "zeebe-jobworker-calc-exec" JobworkerCalcAckName = "zeebe-jobworker-calc-ack" DockerComposeYaml = "../docker-compose.yml" DockerComposeTlsYaml = "../docker-compose-tls.yml" TlsKeyFile = "/tmp/dapr-cert-test-zeebe-key.pem" TlsCertFile = "/tmp/dapr-cert-test-zeebe-cert.pem" // TestProcessFile contains the basic test process file name. TestProcessFile string = "test.bpmn" // CalcProcessFile contains the calculation process file name. CalcProcessFile string = "calc.bpmn" TestDmnFile string = "test.dmn" )
Variables ¶
This section is empty.
Functions ¶
func ActicateJob ¶
func ActicateJob( client dapr_client.Client, context context.Context, payload map[string]interface{}, ) (*[]pb.ActivatedJob, error)
func CheckZeebeConnection ¶
func CheckZeebeConnectionTls ¶
func CreateProcessInstance ¶
func CreateProcessInstance( client dapr_client.Client, context context.Context, payload map[string]interface{}, ) (*pb.CreateProcessInstanceWithResultResponse, error)
CreateProcessInstance creates a process instance and returns the process instance data.
func ExecCommandOperation ¶
func ExecCommandOperation( context context.Context, client dapr_client.Client, operation bindings.OperationKind, data []byte, metadata map[string]string, ) (out *dapr_client.BindingEvent, err error)
ExecCommandOperation abstracts the command binding request for the different operations
func GetDaprClient ¶
func GetDaprClient(grpcPort int) dapr_client.Client
func GetTestFile ¶
GetTestFile loads the content of a test file. The function also accepts a list of modifier functions which allows to manipulate the content of the returned file.
func IDModifier ¶
IDModifier modifies an ID of a resource.
func NameModifier ¶
NameModifier modifies the name of a resource.
func ProvideKeyAndCert ¶
ProvideKeyAndCert copies the key and the cert to the temp directory so that it can be referenced in the config files
func RetryModifier ¶
RetryModifier modifies the job retries for a specific job type.
Types ¶
type DeployResourceResponseJson ¶
type DeployResourceResponseJson struct { Key int64 `json:"key,omitempty"` Deployments []*DeploymentJson `json:"deployments,omitempty"` }
func DeployResource ¶
func DeployResource( client dapr_client.Client, context context.Context, fileName string, expectedDeployments int, modifiers ...func(string) string, ) (*DeployResourceResponseJson, error)
DeployResource deploys a test resource. The function also accepts a list of modifier functions which allows to manipulate the content of the deployed resource. On success the function returns a JSON with the deployment information.
type DeploymentJson ¶
type DeploymentJson struct {
Metadata DeploymentMetadataJson `json:"metadata,omitempty"`
}
type DeploymentMetadataJson ¶
type DeploymentMetadataJson struct { Process *pb.ProcessMetadata `json:"process,omitempty"` Decision *pb.DecisionMetadata `json:"decision,omitempty"` DecisionRequirements *pb.DecisionRequirementsMetadata `json:"decisionRequirements,omitempty"` }