apiserver: k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing Index | Files

package testing

import "k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing"


Package Files


func WaitForBase64PluginToBeUp Uses

func WaitForBase64PluginToBeUp(plugin *Base64Plugin) error

WaitForBase64PluginToBeUp waits until the plugin is ready to serve requests.

type Base64Plugin Uses

type Base64Plugin struct {
    // contains filtered or unexported fields

Base64Plugin gRPC sever for a mock KMS provider. Uses base64 to simulate encrypt and decrypt.

func NewBase64Plugin Uses

func NewBase64Plugin(socketPath string) (*Base64Plugin, error)

NewBase64Plugin is a constructor for Base64Plugin.

func (*Base64Plugin) CleanUp Uses

func (s *Base64Plugin) CleanUp()

CleanUp stops gRPC server and the underlying listener.

func (*Base64Plugin) Decrypt Uses

func (s *Base64Plugin) Decrypt(ctx context.Context, request *kmsapi.DecryptRequest) (*kmsapi.DecryptResponse, error)

Decrypt performs base64 decoding of the payload of kms.DecryptRequest.

func (*Base64Plugin) Encrypt Uses

func (s *Base64Plugin) Encrypt(ctx context.Context, request *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error)

Encrypt performs base64 encoding of the payload of kms.EncryptRequest.

func (*Base64Plugin) EnterFailedState Uses

func (s *Base64Plugin) EnterFailedState()

EnterFailedState places the plugin into failed state.

func (*Base64Plugin) ExitFailedState Uses

func (s *Base64Plugin) ExitFailedState()

ExitFailedState removes the plugin from the failed state.

func (*Base64Plugin) LastEncryptRequest Uses

func (s *Base64Plugin) LastEncryptRequest() []byte

LastEncryptRequest returns the last EncryptRequest.Plain sent to the plugin.

func (*Base64Plugin) SetVersion Uses

func (s *Base64Plugin) SetVersion(ver string)

SetVersion sets the version of kms-plugin.

func (*Base64Plugin) Start Uses

func (s *Base64Plugin) Start() error

Start starts plugin's gRPC service.

func (*Base64Plugin) Version Uses

func (s *Base64Plugin) Version(ctx context.Context, request *kmsapi.VersionRequest) (*kmsapi.VersionResponse, error)

Version returns the version of the kms-plugin.

Package testing imports 15 packages (graph). Updated 2019-11-11. Refresh now. Tools for package owners.