mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-06 01:54:43 +00:00
Adds suspend and resume all cmd
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
68074d3543
commit
12a2100fcf
48 changed files with 210 additions and 29 deletions
|
|
@ -31,6 +31,7 @@ var suspendReceiverCmd = &cobra.Command{
|
|||
RunE: suspendCommand{
|
||||
apiType: receiverType,
|
||||
object: &receiverAdapter{¬ificationv1.Receiver{}},
|
||||
list: &receiverListAdapter{¬ificationv1.ReceiverList{}},
|
||||
}.run,
|
||||
}
|
||||
|
||||
|
|
@ -45,3 +46,7 @@ func (obj receiverAdapter) isSuspended() bool {
|
|||
func (obj receiverAdapter) setSuspended() {
|
||||
obj.Receiver.Spec.Suspend = true
|
||||
}
|
||||
|
||||
func (a receiverListAdapter) item(i int) suspendable {
|
||||
return &receiverAdapter{&a.ReceiverList.Items[i]}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue