add comments

This commit is contained in:
Pavel Sviderski
2024-10-02 09:25:12 +10:00
parent 8fbf406007
commit c6358474ac
+3 -1
View File
@@ -174,7 +174,8 @@ func (m *Machine) Initialised() bool {
func (m *Machine) Run(ctx context.Context) error { func (m *Machine) Run(ctx context.Context) error {
// Configure and start the corrosion service on the loopback if the machine is not initialised as a cluster // Configure and start the corrosion service on the loopback if the machine is not initialised as a cluster
// member. This provides the store required for the machine to initialise a new cluster on it. // member. This provides the store required for the machine to initialise a new cluster on it. Once the machine
// is initialised, the corrosion service is managed by the networkController.
if !m.Initialised() { if !m.Initialised() {
if err := m.configureCorrosion(); err != nil { if err := m.configureCorrosion(); err != nil {
return fmt.Errorf("configure corrosion service: %w", err) return fmt.Errorf("configure corrosion service: %w", err)
@@ -203,6 +204,7 @@ func (m *Machine) Run(ctx context.Context) error {
return nil return nil
}, },
) )
// Signal that the machine is ready.
close(m.started) close(m.started)
// Control loop for managing the network controller. // Control loop for managing the network controller.