state

package
v0.0.0-...-1cb3484 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package state provides types and functions for eks connector state management

Index

Constants

View Source
const (
	SecretKeyManifest        = "manifest"
	SecretKeyRegistrationKey = "regkey"
	SecretKeyFingerprint     = "fingerprint"
	SecretKeyConnectorConfig = "connector-config"
)
View Source
const (
	DirSsmVault             = "/var/lib/amazon/ssm/Vault"
	FileManifest            = "Manifest"
	FileRegistrationKey     = "Store/RegistrationKey"
	FileInstanceFingerprint = "Store/InstanceFingerprint"
	EksConnectorConfig      = "EksConnectorConfig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystemPersistence

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

func (*FileSystemPersistence) Load

func (*FileSystemPersistence) Save

type MockPersistence

type MockPersistence struct {
	mock.Mock
}

MockPersistence is an autogenerated mock type for the Persistence type

func (*MockPersistence) Load

func (_m *MockPersistence) Load() (SerializedState, error)

Load provides a mock function with given fields:

func (*MockPersistence) Save

func (_m *MockPersistence) Save(state SerializedState) error

Save provides a mock function with given fields: state

type Persistence

type Persistence interface {
	Load() (SerializedState, error)
	Save(state SerializedState) error
}

func NewFileSystemPersistence

func NewFileSystemPersistence(stateConfig *config.StateConfig) Persistence

func NewSecretPersistence

func NewSecretPersistence(secret k8s.Secret) Persistence

type SecretPersistence

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

func (*SecretPersistence) Load

func (p *SecretPersistence) Load() (state SerializedState, err error)

func (*SecretPersistence) Save

func (p *SecretPersistence) Save(state SerializedState) (err error)

type SerializedState

type SerializedState map[string]string

type State

type State struct {
	ActivationId          string
	FingerPrint           string
	InstanceID            string
	PrivateKey            string
	PrivateKeyType        string
	PrivateKeyCreatedDate string
	Region                string
}

func Deserialize

func Deserialize(serializedState SerializedState) (state *State, err error)

func (*State) Serialize

func (state *State) Serialize() (serializedState SerializedState, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL