Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeConfig ¶
func InitializeConfig(config *Config)
InitializeConfig initializes Config with default values.
Types ¶
type CAGrpcClient ¶
type CAGrpcClient interface { // Send CSR to the CA and gets the response or error. SendCSR(*pb.Request, platform.Client, *Config) (*pb.Response, error) }
CAGrpcClient is for implementing the GRPC client to talk to CA.
type CertUtil ¶
type CertUtil interface { // GetWaitTime returns the waiting time before renewing the certificate. GetWaitTime([]byte, time.Time, int) (time.Duration, error) }
CertUtil is an interface for utility functions on certificate.
type CertUtilImpl ¶
type CertUtilImpl struct { }
CertUtilImpl is the implementation of CertUtil, for production use.
func (CertUtilImpl) GetWaitTime ¶
func (cu CertUtilImpl) GetWaitTime(certBytes []byte, now time.Time, gracePeriodPercentage int) (time.Duration, error)
GetWaitTime returns the waititng time before renewing the cert, based on current time, the timestamps in cert and graceperiod.
type Config ¶
type Config struct { // Istio CA grpc server IstioCAAddress string // Organization of service ServiceIdentityOrg string RSAKeySize int // The environment this node agent is running on Env string // CSRInitialRetrialInterval is the retrial interval for certificate requests. CSRInitialRetrialInterval time.Duration // CSRMaxRetries is the number of retries for certificate requests. CSRMaxRetries int // CSRGracePeriodPercentage indicates the length of the grace period in the // percentage of the entire certificate TTL. CSRGracePeriodPercentage int // The Configuration for talking to the platform metadata server. PlatformConfig platform.ClientConfig }
Config is Node agent configuration.
type NodeAgent ¶
type NodeAgent interface {
Start() error
}
NodeAgent interface that should be implemented by various platform specific node agents.
func NewNodeAgent ¶
NewNodeAgent is constructor for Node agent based on the provided Environment variable.
Click to show internal directories.
Click to hide internal directories.