api: Embed runtime.Object in Source interface
Embedding runtime.Object in Source interface makes the Source type more useful to interact with k8s API machinery. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
a0ea2481bb
commit
4d96fd80a8
|
|
@ -20,6 +20,7 @@ import (
|
|||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -31,6 +32,7 @@ const (
|
|||
// Source interface must be supported by all API types.
|
||||
// +k8s:deepcopy-gen=false
|
||||
type Source interface {
|
||||
runtime.Object
|
||||
// GetRequeueAfter returns the duration after which the source must be reconciled again.
|
||||
GetRequeueAfter() time.Duration
|
||||
// GetArtifact returns the latest artifact from the source if present in the
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/fluxcd/pkg/apis/acl"
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
|
|
|
|||
Loading…
Reference in New Issue