Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SecretFile propages the key/cert to the workload through file. SecretFile int = iota // 0 // WorkloadAPI propages the key/cert to the workload through API. WorkloadAPI // 1, unimplemented. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Mode specifies how the node agent communications to workload. Mode int // FileUtil is valid in FILE mode. It supports file I/O in a FS. FileUtil util.FileUtil // ServiceIdentityCertFile is valid in FILE mode. It specifies the file path for service identity certificate. ServiceIdentityCertFile string // ServiceIdentityPrivateKeyFile is valid in FILE mode. It specifies the file path for service identity private key. ServiceIdentityPrivateKeyFile string }
Config is the configuration for node agent to workload communication.
func NewSecretFileServerConfig ¶
NewSecretFileServerConfig creates a Config for propogating key/cert to workload through file.
type SecretFileServer ¶
type SecretFileServer struct {
// contains filtered or unexported fields
}
SecretFileServer is an implementation of SecretServer that writes the key/cert into file system.
func (*SecretFileServer) SetServiceIdentityCert ¶
func (sf *SecretFileServer) SetServiceIdentityCert(content []byte) error
SetServiceIdentityCert sets the service identity certificate into the file system.
func (*SecretFileServer) SetServiceIdentityPrivateKey ¶
func (sf *SecretFileServer) SetServiceIdentityPrivateKey(content []byte) error
SetServiceIdentityPrivateKey sets the service identity private key into the file system.
type SecretServer ¶
type SecretServer interface { // SetServiceIdentityPrivateKey sets the service identity private key to the channel accessible to the workload. SetServiceIdentityPrivateKey([]byte) error // SetServiceIdentityCert sets the service identity cert to the channel accessible to the workload. SetServiceIdentityCert([]byte) error }
SecretServer is for implementing the communication from the node agent to the workload.
func NewSecretServer ¶
func NewSecretServer(cfg Config) (SecretServer, error)
NewSecretServer instantiates a SecretServer according to the configuration.
Click to show internal directories.
Click to hide internal directories.