middleware

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClientPortWithPrometheus

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

ClusterClientPortWithPrometheus implements provisioning.ClusterClientPort interface with all methods wrapped with Prometheus metrics.

func NewClusterClientPortWithPrometheus

func NewClusterClientPortWithPrometheus(base provisioning.ClusterClientPort, instanceName string) ClusterClientPortWithPrometheus

NewClusterClientPortWithPrometheus returns an instance of the provisioning.ClusterClientPort decorated with prometheus summary metric.

func (ClusterClientPortWithPrometheus) EnableCluster

func (_d ClusterClientPortWithPrometheus) EnableCluster(ctx context.Context, server provisioning.Server) (clusterCertificate string, err error)

EnableCluster implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) EnableOSService

func (_d ClusterClientPortWithPrometheus) EnableOSService(ctx context.Context, server provisioning.Server, name string, config map[string]any) (err error)

EnableOSService implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) GetClusterJoinToken

func (_d ClusterClientPortWithPrometheus) GetClusterJoinToken(ctx context.Context, endpoint provisioning.Endpoint, memberName string) (joinToken string, err error)

GetClusterJoinToken implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) GetClusterNodeNames

func (_d ClusterClientPortWithPrometheus) GetClusterNodeNames(ctx context.Context, endpoint provisioning.Endpoint) (nodeNames []string, err error)

GetClusterNodeNames implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) GetOSData

func (_d ClusterClientPortWithPrometheus) GetOSData(ctx context.Context, endpoint provisioning.Endpoint) (oSData api.OSData, err error)

GetOSData implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) JoinCluster

func (_d ClusterClientPortWithPrometheus) JoinCluster(ctx context.Context, server provisioning.Server, joinToken string, endpoint provisioning.Endpoint) (err error)

JoinCluster implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) Ping

Ping implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) SetServerConfig

func (_d ClusterClientPortWithPrometheus) SetServerConfig(ctx context.Context, endpoint provisioning.Endpoint, config map[string]string) (err error)

SetServerConfig implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) SubscribeLifecycleEvents

func (_d ClusterClientPortWithPrometheus) SubscribeLifecycleEvents(ctx context.Context, endpoint provisioning.Endpoint) (lifecycleEventCh chan domain.LifecycleEvent, errCh chan error, err error)

SubscribeLifecycleEvents implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) SystemFactoryReset added in v0.2.0

func (_d ClusterClientPortWithPrometheus) SystemFactoryReset(ctx context.Context, endpoint provisioning.Endpoint, allowTPMResetFailure bool, seeds provisioning.TokenImageSeedConfigs, providerConfig api.TokenProviderConfig) (err error)

SystemFactoryReset implements provisioning.ClusterClientPort.

func (ClusterClientPortWithPrometheus) UpdateClusterCertificate

func (_d ClusterClientPortWithPrometheus) UpdateClusterCertificate(ctx context.Context, endpoint provisioning.Endpoint, certificatePEM string, keyPEM string) (err error)

UpdateClusterCertificate implements provisioning.ClusterClientPort.

type ClusterClientPortWithSlog

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

ClusterClientPortWithSlog implements provisioning.ClusterClientPort that is instrumented with slog logger.

func NewClusterClientPortWithSlog

NewClusterClientPortWithSlog instruments an implementation of the provisioning.ClusterClientPort with simple logging.

func (ClusterClientPortWithSlog) EnableCluster

func (_d ClusterClientPortWithSlog) EnableCluster(ctx context.Context, server provisioning.Server) (clusterCertificate string, err error)

EnableCluster implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) EnableOSService

func (_d ClusterClientPortWithSlog) EnableOSService(ctx context.Context, server provisioning.Server, name string, config map[string]any) (err error)

EnableOSService implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) GetClusterJoinToken

func (_d ClusterClientPortWithSlog) GetClusterJoinToken(ctx context.Context, endpoint provisioning.Endpoint, memberName string) (joinToken string, err error)

GetClusterJoinToken implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) GetClusterNodeNames

func (_d ClusterClientPortWithSlog) GetClusterNodeNames(ctx context.Context, endpoint provisioning.Endpoint) (nodeNames []string, err error)

GetClusterNodeNames implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) GetOSData

func (_d ClusterClientPortWithSlog) GetOSData(ctx context.Context, endpoint provisioning.Endpoint) (oSData api.OSData, err error)

GetOSData implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) JoinCluster

func (_d ClusterClientPortWithSlog) JoinCluster(ctx context.Context, server provisioning.Server, joinToken string, endpoint provisioning.Endpoint) (err error)

JoinCluster implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) Ping

func (_d ClusterClientPortWithSlog) Ping(ctx context.Context, endpoint provisioning.Endpoint) (err error)

Ping implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) SetServerConfig

func (_d ClusterClientPortWithSlog) SetServerConfig(ctx context.Context, endpoint provisioning.Endpoint, config map[string]string) (err error)

SetServerConfig implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) SubscribeLifecycleEvents

func (_d ClusterClientPortWithSlog) SubscribeLifecycleEvents(ctx context.Context, endpoint provisioning.Endpoint) (lifecycleEventCh chan domain.LifecycleEvent, errCh chan error, err error)

SubscribeLifecycleEvents implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) SystemFactoryReset added in v0.2.0

func (_d ClusterClientPortWithSlog) SystemFactoryReset(ctx context.Context, endpoint provisioning.Endpoint, allowTPMResetFailure bool, seeds provisioning.TokenImageSeedConfigs, providerConfig api.TokenProviderConfig) (err error)

SystemFactoryReset implements provisioning.ClusterClientPort.

func (ClusterClientPortWithSlog) UpdateClusterCertificate

func (_d ClusterClientPortWithSlog) UpdateClusterCertificate(ctx context.Context, endpoint provisioning.Endpoint, certificatePEM string, keyPEM string) (err error)

UpdateClusterCertificate implements provisioning.ClusterClientPort.

type ClusterClientPortWithSlogOption

type ClusterClientPortWithSlogOption func(s *ClusterClientPortWithSlog)

func ClusterClientPortWithSlogWithInformativeErrFunc

func ClusterClientPortWithSlogWithInformativeErrFunc(isInformativeErrFunc func(error) bool) ClusterClientPortWithSlogOption

type ClusterProvisioningPortWithPrometheus

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

ClusterProvisioningPortWithPrometheus implements provisioning.ClusterProvisioningPort interface with all methods wrapped with Prometheus metrics.

func NewClusterProvisioningPortWithPrometheus

func NewClusterProvisioningPortWithPrometheus(base provisioning.ClusterProvisioningPort, instanceName string) ClusterProvisioningPortWithPrometheus

NewClusterProvisioningPortWithPrometheus returns an instance of the provisioning.ClusterProvisioningPort decorated with prometheus summary metric.

func (ClusterProvisioningPortWithPrometheus) Apply

Apply implements provisioning.ClusterProvisioningPort.

func (ClusterProvisioningPortWithPrometheus) Init

func (_d ClusterProvisioningPortWithPrometheus) Init(ctx context.Context, clusterName string, config provisioning.ClusterProvisioningConfig) (temporaryPath string, cleanup func() error, err error)

Init implements provisioning.ClusterProvisioningPort.

type ClusterProvisioningPortWithSlog

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

ClusterProvisioningPortWithSlog implements provisioning.ClusterProvisioningPort that is instrumented with slog logger.

func NewClusterProvisioningPortWithSlog

NewClusterProvisioningPortWithSlog instruments an implementation of the provisioning.ClusterProvisioningPort with simple logging.

func (ClusterProvisioningPortWithSlog) Apply

Apply implements provisioning.ClusterProvisioningPort.

func (ClusterProvisioningPortWithSlog) Init

func (_d ClusterProvisioningPortWithSlog) Init(ctx context.Context, clusterName string, config provisioning.ClusterProvisioningConfig) (temporaryPath string, cleanup func() error, err error)

Init implements provisioning.ClusterProvisioningPort.

type ClusterProvisioningPortWithSlogOption

type ClusterProvisioningPortWithSlogOption func(s *ClusterProvisioningPortWithSlog)

func ClusterProvisioningPortWithSlogWithInformativeErrFunc

func ClusterProvisioningPortWithSlogWithInformativeErrFunc(isInformativeErrFunc func(error) bool) ClusterProvisioningPortWithSlogOption

type FlasherPortWithPrometheus

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

FlasherPortWithPrometheus implements provisioning.FlasherPort interface with all methods wrapped with Prometheus metrics.

func NewFlasherPortWithPrometheus

func NewFlasherPortWithPrometheus(base provisioning.FlasherPort, instanceName string) FlasherPortWithPrometheus

NewFlasherPortWithPrometheus returns an instance of the provisioning.FlasherPort decorated with prometheus summary metric.

func (FlasherPortWithPrometheus) GenerateSeededImage

func (_d FlasherPortWithPrometheus) GenerateSeededImage(ctx context.Context, id uuid.UUID, seedConfig provisioning.TokenImageSeedConfigs, rc io.ReadCloser) (readCloser io.ReadCloser, err error)

GenerateSeededImage implements provisioning.FlasherPort.

func (FlasherPortWithPrometheus) GetProviderConfig

func (_d FlasherPortWithPrometheus) GetProviderConfig(ctx context.Context, tokenID uuid.UUID) (tokenProviderConfig *api.TokenProviderConfig, err error)

GetProviderConfig implements provisioning.FlasherPort.

type FlasherPortWithSlog

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

FlasherPortWithSlog implements provisioning.FlasherPort that is instrumented with slog logger.

func NewFlasherPortWithSlog

func NewFlasherPortWithSlog(base provisioning.FlasherPort, log *slog.Logger, opts ...FlasherPortWithSlogOption) FlasherPortWithSlog

NewFlasherPortWithSlog instruments an implementation of the provisioning.FlasherPort with simple logging.

func (FlasherPortWithSlog) GenerateSeededImage

func (_d FlasherPortWithSlog) GenerateSeededImage(ctx context.Context, id uuid.UUID, seedConfig provisioning.TokenImageSeedConfigs, rc io.ReadCloser) (readCloser io.ReadCloser, err error)

GenerateSeededImage implements provisioning.FlasherPort.

func (FlasherPortWithSlog) GetProviderConfig

func (_d FlasherPortWithSlog) GetProviderConfig(ctx context.Context, tokenID uuid.UUID) (tokenProviderConfig *api.TokenProviderConfig, err error)

GetProviderConfig implements provisioning.FlasherPort.

type FlasherPortWithSlogOption

type FlasherPortWithSlogOption func(s *FlasherPortWithSlog)

func FlasherPortWithSlogWithInformativeErrFunc

func FlasherPortWithSlogWithInformativeErrFunc(isInformativeErrFunc func(error) bool) FlasherPortWithSlogOption

type ServerClientPortWithPrometheus

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

ServerClientPortWithPrometheus implements provisioning.ServerClientPort interface with all methods wrapped with Prometheus metrics.

func NewServerClientPortWithPrometheus

func NewServerClientPortWithPrometheus(base provisioning.ServerClientPort, instanceName string) ServerClientPortWithPrometheus

NewServerClientPortWithPrometheus returns an instance of the provisioning.ServerClientPort decorated with prometheus summary metric.

func (ServerClientPortWithPrometheus) GetOSData

func (_d ServerClientPortWithPrometheus) GetOSData(ctx context.Context, endpoint provisioning.Endpoint) (oSData api.OSData, err error)

GetOSData implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) GetProviderConfig

GetProviderConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) GetResources

func (_d ServerClientPortWithPrometheus) GetResources(ctx context.Context, endpoint provisioning.Endpoint) (hardwareData api.HardwareData, err error)

GetResources implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) GetServerType

func (_d ServerClientPortWithPrometheus) GetServerType(ctx context.Context, endpoint provisioning.Endpoint) (serverType api.ServerType, err error)

GetServerType implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) GetVersionData added in v0.2.2

func (_d ServerClientPortWithPrometheus) GetVersionData(ctx context.Context, endpoint provisioning.Endpoint) (serverVersionData api.ServerVersionData, err error)

GetVersionData implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) Ping

Ping implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) Poweroff added in v0.2.2

func (_d ServerClientPortWithPrometheus) Poweroff(ctx context.Context, server provisioning.Server) (err error)

Poweroff implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) Reboot added in v0.2.2

Reboot implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) UpdateNetworkConfig

func (_d ServerClientPortWithPrometheus) UpdateNetworkConfig(ctx context.Context, server provisioning.Server) (err error)

UpdateNetworkConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) UpdateProviderConfig

func (_d ServerClientPortWithPrometheus) UpdateProviderConfig(ctx context.Context, server provisioning.Server, providerConfig provisioning.ServerSystemProvider) (err error)

UpdateProviderConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithPrometheus) UpdateStorageConfig added in v0.2.0

func (_d ServerClientPortWithPrometheus) UpdateStorageConfig(ctx context.Context, server provisioning.Server) (err error)

UpdateStorageConfig implements provisioning.ServerClientPort.

type ServerClientPortWithSlog

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

ServerClientPortWithSlog implements provisioning.ServerClientPort that is instrumented with slog logger.

func NewServerClientPortWithSlog

NewServerClientPortWithSlog instruments an implementation of the provisioning.ServerClientPort with simple logging.

func (ServerClientPortWithSlog) GetOSData

func (_d ServerClientPortWithSlog) GetOSData(ctx context.Context, endpoint provisioning.Endpoint) (oSData api.OSData, err error)

GetOSData implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) GetProviderConfig

GetProviderConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) GetResources

func (_d ServerClientPortWithSlog) GetResources(ctx context.Context, endpoint provisioning.Endpoint) (hardwareData api.HardwareData, err error)

GetResources implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) GetServerType

func (_d ServerClientPortWithSlog) GetServerType(ctx context.Context, endpoint provisioning.Endpoint) (serverType api.ServerType, err error)

GetServerType implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) GetVersionData added in v0.2.2

func (_d ServerClientPortWithSlog) GetVersionData(ctx context.Context, endpoint provisioning.Endpoint) (serverVersionData api.ServerVersionData, err error)

GetVersionData implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) Ping

func (_d ServerClientPortWithSlog) Ping(ctx context.Context, endpoint provisioning.Endpoint) (err error)

Ping implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) Poweroff added in v0.2.2

func (_d ServerClientPortWithSlog) Poweroff(ctx context.Context, server provisioning.Server) (err error)

Poweroff implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) Reboot added in v0.2.2

func (_d ServerClientPortWithSlog) Reboot(ctx context.Context, server provisioning.Server) (err error)

Reboot implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) UpdateNetworkConfig

func (_d ServerClientPortWithSlog) UpdateNetworkConfig(ctx context.Context, server provisioning.Server) (err error)

UpdateNetworkConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) UpdateProviderConfig

func (_d ServerClientPortWithSlog) UpdateProviderConfig(ctx context.Context, server provisioning.Server, providerConfig provisioning.ServerSystemProvider) (err error)

UpdateProviderConfig implements provisioning.ServerClientPort.

func (ServerClientPortWithSlog) UpdateStorageConfig added in v0.2.0

func (_d ServerClientPortWithSlog) UpdateStorageConfig(ctx context.Context, server provisioning.Server) (err error)

UpdateStorageConfig implements provisioning.ServerClientPort.

type ServerClientPortWithSlogOption

type ServerClientPortWithSlogOption func(s *ServerClientPortWithSlog)

func ServerClientPortWithSlogWithInformativeErrFunc

func ServerClientPortWithSlogWithInformativeErrFunc(isInformativeErrFunc func(error) bool) ServerClientPortWithSlogOption

type UpdateSourcePortWithPrometheus

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

UpdateSourcePortWithPrometheus implements provisioning.UpdateSourcePort interface with all methods wrapped with Prometheus metrics.

func NewUpdateSourcePortWithPrometheus

func NewUpdateSourcePortWithPrometheus(base provisioning.UpdateSourcePort, instanceName string) UpdateSourcePortWithPrometheus

NewUpdateSourcePortWithPrometheus returns an instance of the provisioning.UpdateSourcePort decorated with prometheus summary metric.

func (UpdateSourcePortWithPrometheus) GetLatest

func (_d UpdateSourcePortWithPrometheus) GetLatest(ctx context.Context, limit int) (updates provisioning.Updates, err error)

GetLatest implements provisioning.UpdateSourcePort.

func (UpdateSourcePortWithPrometheus) GetUpdateFileByFilenameUnverified

func (_d UpdateSourcePortWithPrometheus) GetUpdateFileByFilenameUnverified(ctx context.Context, update provisioning.Update, filename string) (readCloser io.ReadCloser, n int, err error)

GetUpdateFileByFilenameUnverified implements provisioning.UpdateSourcePort.

type UpdateSourcePortWithSlog

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

UpdateSourcePortWithSlog implements provisioning.UpdateSourcePort that is instrumented with slog logger.

func NewUpdateSourcePortWithSlog

NewUpdateSourcePortWithSlog instruments an implementation of the provisioning.UpdateSourcePort with simple logging.

func (UpdateSourcePortWithSlog) GetLatest

func (_d UpdateSourcePortWithSlog) GetLatest(ctx context.Context, limit int) (updates provisioning.Updates, err error)

GetLatest implements provisioning.UpdateSourcePort.

func (UpdateSourcePortWithSlog) GetUpdateFileByFilenameUnverified

func (_d UpdateSourcePortWithSlog) GetUpdateFileByFilenameUnverified(ctx context.Context, update provisioning.Update, filename string) (readCloser io.ReadCloser, n int, err error)

GetUpdateFileByFilenameUnverified implements provisioning.UpdateSourcePort.

type UpdateSourcePortWithSlogOption

type UpdateSourcePortWithSlogOption func(s *UpdateSourcePortWithSlog)

func UpdateSourcePortWithSlogWithInformativeErrFunc

func UpdateSourcePortWithSlogWithInformativeErrFunc(isInformativeErrFunc func(error) bool) UpdateSourcePortWithSlogOption

Jump to

Keyboard shortcuts

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