Documentation
¶
Index ¶
- type CMServer
- func (server *CMServer) Close()
- func (server *CMServer) StartFOTAUpdate(ctx context.Context, req *empty.Empty) (ret *empty.Empty, err error)
- func (server *CMServer) StartSOTAUpdate(ctx context.Context, req *empty.Empty) (ret *empty.Empty, err error)
- func (server *CMServer) SubscribeNotifications(req *empty.Empty, ...) (err error)
- type CertificateProvider
- type UpdateFOTAStatus
- type UpdateHandler
- type UpdateSOTAStatus
- type UpdateState
- type UpdateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMServer ¶
type CMServer struct {
pb.UnimplementedUpdateSchedulerServiceServer
sync.Mutex
// contains filtered or unexported fields
}
CMServer CM server instance.
func New ¶
func New( cfg *config.Config, handler UpdateHandler, certProvider CertificateProvider, cryptocontext *cryptutils.CryptoContext, insecure bool, ) (server *CMServer, err error)
New creates new IAM server instance.
func (*CMServer) StartFOTAUpdate ¶
func (server *CMServer) StartFOTAUpdate(ctx context.Context, req *empty.Empty) (ret *empty.Empty, err error)
StartFOTAUpdate triggers FOTA update.
func (*CMServer) StartSOTAUpdate ¶
func (server *CMServer) StartSOTAUpdate(ctx context.Context, req *empty.Empty) (ret *empty.Empty, err error)
StartSOTAUpdate triggers SOTA update.
func (*CMServer) SubscribeNotifications ¶
func (server *CMServer) SubscribeNotifications( req *empty.Empty, stream pb.UpdateSchedulerService_SubscribeNotificationsServer, ) (err error)
SubscribeNotifications subscribes on SOTA FOTA packages status changes.
type CertificateProvider ¶
type CertificateProvider interface {
GetCertificate(certType string, issuer []byte, serial string) (certURL, keyURL string, err error)
SubscribeCertChanged(certType string) (<-chan *iamanager.CertInfo, error)
}
CertificateProvider certificate and key provider interface.
type UpdateFOTAStatus ¶
type UpdateFOTAStatus struct {
Components []cloudprotocol.ComponentStatus
UpdateStatus
}
UpdateFOTAStatus FOTA update status for update scheduler service.
type UpdateHandler ¶
type UpdateHandler interface {
GetFOTAStatusChannel() (channel <-chan UpdateFOTAStatus)
GetSOTAStatusChannel() (channel <-chan UpdateSOTAStatus)
GetFOTAStatus() (status UpdateFOTAStatus)
GetSOTAStatus() (status UpdateSOTAStatus)
StartFOTAUpdate() (err error)
StartSOTAUpdate() (err error)
}
UpdateHandler interface for SOTA/FOTA update.
type UpdateSOTAStatus ¶
type UpdateSOTAStatus struct {
UnitConfig *cloudprotocol.UnitConfigStatus
InstallServices []cloudprotocol.ServiceStatus
RemoveServices []cloudprotocol.ServiceStatus
InstallLayers []cloudprotocol.LayerStatus
RemoveLayers []cloudprotocol.LayerStatus
RebalanceRequest bool
UpdateStatus
}
UpdateSOTAStatus SOTA update status for update scheduler service.
type UpdateState ¶
type UpdateState int
UpdateState type for update state.
const ( NoUpdate UpdateState = iota Downloading ReadyToUpdate Updating )
Update states.
func (UpdateState) String ¶
func (state UpdateState) String() string
type UpdateStatus ¶
type UpdateStatus struct {
State UpdateState
Error *cloudprotocol.ErrorInfo
}
UpdateStatus represents SOTA/FOTA status.
Click to show internal directories.
Click to hide internal directories.