Documentation
¶
Index ¶
- func BackupState[T types.CloudRunCRD, S CloudRunCRDSpec](obj T, spec S) error
- func CommonHistory[T types.CloudRunCRD, S CloudRunCRDSpec](obj T, spec S) (string, error)
- func CreateAndWatchJob[T types.CloudRunCRD](ctx Context, obj T, newJob func() (*batchv1.Job, error), ...) error
- func DeleteJob(ctx Context, round int) error
- func GetJob(ctx Context, round int) (*batchv1.Job, error)
- func GetStatusFromPod(ctx Context, selector *metav1.LabelSelector) (status types.Status, message string, pod *apiv1.Pod, err error)
- func IsDoneOrFailed(crd types.CloudRunCRD) bool
- func Ptr[T any](b T) *T
- func PublishStatus(ctx Context, obj types.CloudRunCRD, err error)
- type CloudRunCRDSpec
- type Context
- type DefaultContext
- func (ctx *DefaultContext) CreateResource(obj client.Object, force, update bool) error
- func (ctx *DefaultContext) Error(err error, msg string, keysAndValues ...interface{})
- func (ctx *DefaultContext) Errorf(err error, format string, args ...interface{})
- func (ctx *DefaultContext) GetServiceLabels(round int) map[string]string
- func (ctx *DefaultContext) GetSubResource(obj client.Object, round int) (bool, error)
- func (ctx *DefaultContext) Info(msg string, keysAndValues ...interface{})
- func (ctx *DefaultContext) Infof(format string, args ...interface{})
- func (ctx *DefaultContext) Name() string
- func (ctx *DefaultContext) Namespace() string
- func (ctx *DefaultContext) NamespacedName() types.NamespacedName
- func (ctx *DefaultContext) NewObjectMeta(round int) apimetav1.ObjectMeta
- type History
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupState ¶
func BackupState[T types.CloudRunCRD, S CloudRunCRDSpec](obj T, spec S) error
func CommonHistory ¶
func CommonHistory[T types.CloudRunCRD, S CloudRunCRDSpec](obj T, spec S) (string, error)
func CreateAndWatchJob ¶
func GetStatusFromPod ¶
func IsDoneOrFailed ¶
func IsDoneOrFailed(crd types.CloudRunCRD) bool
func PublishStatus ¶
func PublishStatus(ctx Context, obj types.CloudRunCRD, err error)
Types ¶
type CloudRunCRDSpec ¶
type CloudRunCRDSpec interface {
v1alpha1.BuilderSpec | v1alpha1.DeployerSpec | v1alpha1.WorkflowSpec
}
type Context ¶
type Context interface {
context.Context
client.Client
Info(msg string, keysAndValues ...interface{})
Infof(format string, args ...interface{})
Error(err error, msg string, keysAndValues ...interface{})
Errorf(err error, format string, args ...interface{})
Name() string
Namespace() string
NamespacedName() types.NamespacedName
NewObjectMeta(round int) apimetav1.ObjectMeta
GetServiceLabels(round int) map[string]string
CreateResource(obj client.Object, force, update bool) error
GetSubResource(obj client.Object, round int) (bool, error)
}
type DefaultContext ¶
type DefaultContext struct {
context.Context
client.Client
logr.Logger
NamespacedNameVar types.NamespacedName
GetMasterResource func() (client.Object, error)
GetOwnerReferences func() (apimetav1.OwnerReference, error)
}
func (*DefaultContext) CreateResource ¶
func (ctx *DefaultContext) CreateResource(obj client.Object, force, update bool) error
func (*DefaultContext) Error ¶
func (ctx *DefaultContext) Error(err error, msg string, keysAndValues ...interface{})
func (*DefaultContext) Errorf ¶
func (ctx *DefaultContext) Errorf(err error, format string, args ...interface{})
func (*DefaultContext) GetServiceLabels ¶
func (ctx *DefaultContext) GetServiceLabels(round int) map[string]string
func (*DefaultContext) GetSubResource ¶
func (*DefaultContext) Info ¶
func (ctx *DefaultContext) Info(msg string, keysAndValues ...interface{})
func (*DefaultContext) Infof ¶
func (ctx *DefaultContext) Infof(format string, args ...interface{})
func (*DefaultContext) Name ¶
func (ctx *DefaultContext) Name() string
func (*DefaultContext) Namespace ¶
func (ctx *DefaultContext) Namespace() string
func (*DefaultContext) NamespacedName ¶
func (ctx *DefaultContext) NamespacedName() types.NamespacedName
func (*DefaultContext) NewObjectMeta ¶
func (ctx *DefaultContext) NewObjectMeta(round int) apimetav1.ObjectMeta
Click to show internal directories.
Click to hide internal directories.