Documentation ¶
Index ¶
- func BeEquivalentToError(expected error) types.GomegaMatcher
- func GetDataFromContext(ctx context.Context, cli client.Client, ctxName, name, ns string, ...) (*value.Value, error)
- func GetLogConfigFromStep(ctx context.Context, cli client.Client, ctxName, name, ns, step string) (*types.LogConfig, error)
- func GetLogsFromPod(ctx context.Context, clientSet kubernetes.Interface, cli client.Client, ...) (io.ReadCloser, error)
- func GetLogsFromURL(ctx context.Context, url string) (io.ReadCloser, error)
- func GetPodListFromResources(ctx context.Context, cli client.Client, resources []types.Resource) ([]corev1.Pod, error)
- func JSONMarshal(o interface{}) []byte
- func ResumeWorkflow(ctx context.Context, cli client.Client, run *v1alpha1.WorkflowRun) error
- func TerminateWorkflow(ctx context.Context, cli client.Client, run *v1alpha1.WorkflowRun) error
- type AlreadyExistMatcher
- type ErrorMatcher
- type NotFoundMatcher
- type WorkflowOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeEquivalentToError ¶
func BeEquivalentToError(expected error) types.GomegaMatcher
BeEquivalentToError matches the error to take care of nil.
func GetDataFromContext ¶
func GetDataFromContext(ctx context.Context, cli client.Client, ctxName, name, ns string, paths ...string) (*value.Value, error)
GetDataFromContext get data from workflow context
func GetLogConfigFromStep ¶
func GetLogConfigFromStep(ctx context.Context, cli client.Client, ctxName, name, ns, step string) (*types.LogConfig, error)
GetLogConfigFromStep get log config from step
func GetLogsFromPod ¶
func GetLogsFromPod(ctx context.Context, clientSet kubernetes.Interface, cli client.Client, podName, ns, cluster string, opts *corev1.PodLogOptions) (io.ReadCloser, error)
GetLogsFromPod get logs from pod
func GetLogsFromURL ¶
GetLogsFromURL get logs from url
func GetPodListFromResources ¶
func GetPodListFromResources(ctx context.Context, cli client.Client, resources []types.Resource) ([]corev1.Pod, error)
GetPodListFromResources get pod list from resources
func ResumeWorkflow ¶
ResumeWorkflow resume workflow
func TerminateWorkflow ¶
TerminateWorkflow terminate workflow
Types ¶
type AlreadyExistMatcher ¶
type AlreadyExistMatcher struct { }
AlreadyExistMatcher matches the error to be already exist
func (AlreadyExistMatcher) FailureMessage ¶
func (matcher AlreadyExistMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage builds an error message.
func (AlreadyExistMatcher) Match ¶
func (matcher AlreadyExistMatcher) Match(actual interface{}) (success bool, err error)
Match matches error.
func (AlreadyExistMatcher) NegatedFailureMessage ¶
func (matcher AlreadyExistMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage builds an error message.
type ErrorMatcher ¶
type ErrorMatcher struct {
ExpectedError error
}
ErrorMatcher matches errors.
func (ErrorMatcher) FailureMessage ¶
func (matcher ErrorMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage builds an error message.
func (ErrorMatcher) Match ¶
func (matcher ErrorMatcher) Match(actual interface{}) (success bool, err error)
Match matches an error.
func (ErrorMatcher) NegatedFailureMessage ¶
func (matcher ErrorMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage builds an error message.
type NotFoundMatcher ¶
type NotFoundMatcher struct { }
NotFoundMatcher matches the error to be not found.
func (NotFoundMatcher) FailureMessage ¶
func (matcher NotFoundMatcher) FailureMessage(actual interface{}) (message string)
FailureMessage builds an error message.
func (NotFoundMatcher) Match ¶
func (matcher NotFoundMatcher) Match(actual interface{}) (success bool, err error)
Match matches the api error.
func (NotFoundMatcher) NegatedFailureMessage ¶
func (matcher NotFoundMatcher) NegatedFailureMessage(actual interface{}) (message string)
NegatedFailureMessage builds an error message.
type WorkflowOperator ¶
type WorkflowOperator interface { Suspend(ctx context.Context) error Resume(ctx context.Context) error Rollback(ctx context.Context) error Restart(ctx context.Context) error Terminate(ctx context.Context) error }
WorkflowOperator is operation handler for workflow's suspend/resume/rollback/restart/terminate
func NewWorkflowRunOperator ¶
func NewWorkflowRunOperator(cli client.Client, w io.Writer, run *v1alpha1.WorkflowRun) WorkflowOperator
NewWorkflowRunOperator get an workflow operator with k8sClient, ioWriter(optional, useful for cli) and application