Documentation
¶
Overview ¶
Copyright The Ratify Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const (
KubeRefresherType = "kubeRefresher"
)
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, factory RefresherFactory)
Refresher is an interface that defines methods to be implemented by a each refresher
Types ¶
type KubeRefresher ¶
type KubeRefresher struct {
Provider kmp.KeyManagementProvider
ProviderType string
ProviderRefreshInterval string
Resource string
Result ctrl.Result
Status kmp.KeyManagementProviderStatus
}
func (*KubeRefresher) Create ¶
func (kr *KubeRefresher) Create(config RefresherConfig) (Refresher, error)
Create creates a new KubeRefresher instance
func (*KubeRefresher) GetResult ¶
func (kr *KubeRefresher) GetResult() interface{}
GetResult returns the result of the refresh as a ctrl.Result
func (*KubeRefresher) GetStatus ¶
func (kr *KubeRefresher) GetStatus() interface{}
type Refresher ¶
type Refresher interface {
// Refresh is a method that refreshes the certificates/keys
Refresh(ctx context.Context) error
// GetResult is a method that returns the result of the refresh
GetResult() interface{}
// GetStatus is a method that returns the status of the refresh
GetStatus() interface{}
}
Refresher is an interface that defines methods to be implemented by a each refresher
func CreateRefresherFromConfig ¶
func CreateRefresherFromConfig(refresherConfig RefresherConfig) (Refresher, error)
CreateRefresherFromConfig creates a new instance of the refresher using the provided configuration
type RefresherConfig ¶
type RefresherConfig struct {
RefresherType string // RefresherType is the type of the refresher
Provider keymanagementprovider.KeyManagementProvider // Provider is the key management provider
ProviderType string // ProviderType is the type of the provider
ProviderRefreshInterval string // ProviderRefreshInterval is the refresh interval for the provider
Resource string // Resource is the resource to be refreshed
}
RefresherConfig is a struct that holds the configuration for a refresher
type RefresherFactory ¶
type RefresherFactory interface {
// Create creates a new instance of the refresher using the provided configuration
// Create(config map[string]interface{}) (Refresher, error)
Create(config RefresherConfig) (Refresher, error)
}