provider-kairos/internal/provider/start.go
Dimitris Karakasilis fdd0f02d3b
Remove the bus.EventAvailableReleases implementation (#496)
to let the kairos-agent handle upgrades from now on. It used to be that
provider-kairos returned releases from the provider-kairos repository
but it's no longer the case. Everything is release in the
kairos-io/kairos repository and the new versioneer library of the
kairos-sdk (which is used in the kairos-agent) is capabable of handling
both "standard" and "core" images.

Part of: https://github.com/kairos-io/kairos/issues/1999

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-12-08 14:04:27 +02:00

32 lines
660 B
Go

package provider
import (
"os"
"github.com/kairos-io/kairos-sdk/bus"
"github.com/mudler/go-pluggable"
)
func Start() error {
factory := pluggable.NewPluginFactory()
// Input: bus.EventInstallPayload
// Expected output: map[string]string{}
factory.Add(bus.EventInstall, Install)
factory.Add(bus.EventBootstrap, Bootstrap)
// Input: config
// Expected output: string
factory.Add(bus.EventChallenge, Challenge)
factory.Add(bus.EventRecovery, Recovery)
factory.Add(bus.EventRecoveryStop, RecoveryStop)
factory.Add(bus.EventInteractiveInstall, InteractiveInstall)
return factory.Run(pluggable.EventType(os.Args[1]), os.Stdin, os.Stdout)
}