bootstrap

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricCredDnloadAttempt - Metric Cred Dnload Attempt
	MetricCredDnloadAttempt = "credentials_download_attempted"
	// MetricCredDnloadSucc - Metric Cred Dnload Succ
	MetricCredDnloadSucc = "credentials_download_succeeded"
)

Variables

View Source
var (
	// ErrInvalidBootstrapSecret invalid bootstrap secret
	ErrInvalidBootstrapSecret = errors.New("invalid bootstrap secret")
	// CertExpirationMetric is a prometheus metric for Site Agent Temporal certificate expiration
	CertExpirationMetric = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "temporal_cert_expiration",
		Help: "The expiration date of the Temporal certificate",
	})
)
View Source
var ManagerAccess *Manager.ManagerAccess

ManagerAccess - access to all managers

Functions

This section is empty.

Types

type BoostrapAPI

type BoostrapAPI struct{}

BoostrapAPI - all API interface nolint

func NewBootstrapManager

func NewBootstrapManager(superForge *elektratypes.Elektra, superAPI *Manager.ManagerAPI, superConf *Manager.ManagerConf) *BoostrapAPI

NewBootstrapManager - returns a new instance of helm manager

func (*BoostrapAPI) DownloadAndStoreCreds

func (bs *BoostrapAPI) DownloadAndStoreCreds(otpOverride []byte) error

DownloadAndStoreCreds - Download and Store Temporal credentials

func (*BoostrapAPI) GetState

func (bs *BoostrapAPI) GetState() []string

GetState - handle http request

func (*BoostrapAPI) Init

func (bs *BoostrapAPI) Init()

Init - initialize the bootstrap manager

func (*BoostrapAPI) RegisterSubscriber

func (api *BoostrapAPI) RegisterSubscriber() error

RegisterSubscriber registers the Bootstrap workflows and activities with the Temporal client

func (*BoostrapAPI) RotateTemporalCertAccessOTP

func (bs *BoostrapAPI) RotateTemporalCertAccessOTP(ctx workflow.Context, base64EncodedEncryptedOTP string) error

RotateTemporalCertAccessOTP is a workflow to receive and process Base64 encoded encrypted OTP using ReceiveAndSaveOTP activity

func (*BoostrapAPI) Start

func (bs *BoostrapAPI) Start()

Start bootstrap

type OTPHandler

type OTPHandler struct {
	SecretInterface coreV1Types.SecretInterface
}

OTPHandler handles OTP related activities

func NewOTPHandler

func NewOTPHandler(secretInterface coreV1Types.SecretInterface) OTPHandler

NewOTPHandler returns a new OTPHandler activity

func (*OTPHandler) ReceiveAndSaveOTP

func (o *OTPHandler) ReceiveAndSaveOTP(ctx context.Context, base64EncodedEncryptedOtp string) error

ReceiveAndSaveOTP receives a new OTP and updates the bootstrap info

Jump to

Keyboard shortcuts

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