smclient

package
v0.0.0-...-15f1d61 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertsProvider

type AlertsProvider interface {
	GetAlertsChannel() (channel <-chan cloudprotocol.AlertItem)
}

AlertsProvider alert data provider interface.

type CertificateProvider

type CertificateProvider interface {
	GetCertificate(certType string) (certURL, ketURL string, err error)
}

CertificateProvider interface to get certificate.

type InstanceLauncher

type InstanceLauncher interface {
	RunInstances(instances []aostypes.InstanceInfo, forceRestart bool) error
	RuntimeStatusChannel() <-chan launcher.RuntimeStatus
	OverrideEnvVars(envVarsInfo []cloudprotocol.EnvVarsInstanceInfo) ([]cloudprotocol.EnvVarsInstanceStatus, error)
	CloudConnection(connected bool) error
}

InstanceLauncher service instances launcher interface.

type LayersProcessor

type LayersProcessor interface {
	ProcessDesiredLayers(layers []aostypes.LayerInfo) error
}

LayersProcessor process desired layer list.

type LogsProvider

type LogsProvider interface {
	GetInstanceLog(request cloudprotocol.RequestLog) error
	GetInstanceCrashLog(request cloudprotocol.RequestLog) error
	GetSystemLog(request cloudprotocol.RequestLog)
	GetLogsDataChannel() (channel <-chan cloudprotocol.PushLog)
}

LogsProvider logs data provider interface.

type MonitoringDataProvider

type MonitoringDataProvider interface {
	GetMonitoringDataChannel() (monitoringChannel <-chan cloudprotocol.NodeMonitoringData)
}

MonitoringDataProvider monitoring data provider interface.

type NetworkProvider

type NetworkProvider interface {
	UpdateNetworks(networkParameters []aostypes.NetworkParameters) error
}

type NodeDescription

type NodeDescription struct {
	NodeID     string
	NodeType   string
	SystemInfo cloudprotocol.SystemInfo
}

type SMClient

type SMClient struct {
	sync.Mutex
	// contains filtered or unexported fields
}

SMClient SM client instance.

func New

func New(config *config.Config, nodeDescription NodeDescription, certificateProvider CertificateProvider,
	servicesProcessor ServicesProcessor, layersProcessor LayersProcessor, launcher InstanceLauncher,
	unitConfigProcessor UnitConfigProcessor, alertsProvider AlertsProvider, monitoringProvider MonitoringDataProvider,
	logsProvider LogsProvider, networkManager NetworkProvider, cryptcoxontext *cryptutils.CryptoContext, insecure bool,
) (*SMClient, error)

New creates SM client fo communication with CM.

func (*SMClient) Close

func (client *SMClient) Close() (err error)

Close closes SM client.

type ServicesProcessor

type ServicesProcessor interface {
	ProcessDesiredServices(services []aostypes.ServiceInfo) error
}

ServicesProcessor process desired services list.

type UnitConfigProcessor

type UnitConfigProcessor interface {
	GetUnitConfigInfo() (version string)
	CheckUnitConfig(configJSON, version string) error
	UpdateUnitConfig(configJSON, version string) error
}

UnitConfigProcessor unit configuration handler.

Jump to

Keyboard shortcuts

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