istio: istio.io/istio/security/pkg/util Index | Files | Directories

package util

import "istio.io/istio/security/pkg/util"

Index

Package Files

certutil.go configutil.go

func InsertDataToConfigMap Uses

func InsertDataToConfigMap(client corev1.ConfigMapsGetter, meta metav1.ObjectMeta, data map[string]string) error

InsertDataToConfigMap inserts a data to a configmap in a namespace. client: the k8s client interface. namespace: the namespace of the configmap. value: the value of the data to insert. configName: the name of the configmap. dataName: the name of the data in the configmap.

func UpdateDataInConfigMap Uses

func UpdateDataInConfigMap(client corev1.ConfigMapsGetter, cm *v1.ConfigMap, data map[string]string) error

type CertUtil Uses

type CertUtil interface {
    // GetWaitTime returns the waiting time before renewing the certificate.
    GetWaitTime([]byte, time.Time, time.Duration) (time.Duration, error)
}

CertUtil is an interface for utility functions on certificate.

type CertUtilImpl Uses

type CertUtilImpl struct {
    // contains filtered or unexported fields
}

CertUtilImpl is the implementation of CertUtil, for production use.

func NewCertUtil Uses

func NewCertUtil(gracePeriodPercentage int) CertUtilImpl

NewCertUtil returns a new CertUtilImpl

func (CertUtilImpl) GetWaitTime Uses

func (cu CertUtilImpl) GetWaitTime(certBytes []byte, now time.Time, minGracePeriod time.Duration) (time.Duration, error)

GetWaitTime returns the waititng time before renewing the cert, based on current time, the timestamps in cert and graceperiod.

Directories

PathSynopsis
mock

Package util imports 8 packages (graph) and is imported by 7 packages. Updated 2020-02-18. Refresh now. Tools for package owners.