...

Source file src/github.com/fluxcd/source-controller/api/v1beta2/source.go

Documentation: github.com/fluxcd/source-controller/api/v1beta2

     1  /*
     2  Copyright 2022 The Flux authors
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1beta2
    18  
    19  import (
    20  	"time"
    21  
    22  	"k8s.io/apimachinery/pkg/runtime"
    23  )
    24  
    25  const (
    26  	// SourceIndexKey is the key used for indexing objects based on their
    27  	// referenced Source.
    28  	SourceIndexKey string = ".metadata.source"
    29  )
    30  
    31  // Source interface must be supported by all API types.
    32  // Source is the interface that provides generic access to the Artifact and
    33  // interval. It must be supported by all kinds of the source.toolkit.fluxcd.io
    34  // API group.
    35  //
    36  // Deprecated: use the Source interface from api/v1 instead. This type will be
    37  // removed in a future release.
    38  //
    39  // +k8s:deepcopy-gen=false
    40  type Source interface {
    41  	runtime.Object
    42  	// GetRequeueAfter returns the duration after which the source must be
    43  	// reconciled again.
    44  	GetRequeueAfter() time.Duration
    45  	// GetArtifact returns the latest artifact from the source if present in
    46  	// the status sub-resource.
    47  	GetArtifact() *Artifact
    48  }
    49  

View as plain text