Skip to content

Commit

Permalink
Apply linter fix on clusterd
Browse files Browse the repository at this point in the history
  • Loading branch information
gboutry committed Feb 13, 2024
1 parent 37a0c0d commit 90de0c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sunbeam-microcluster/cmd/sunbeamd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ func (c *cmdDaemon) Run(_ *cobra.Command, _ []string) error {
// Placeholder for post-action hooks that can be run by MicroCluster.
h := &config.Hooks{
// OnBootstrap is run after the daemon is initialized and bootstrapped.
OnBootstrap: func(s *state.State, initConfig map[string]string) error {
OnBootstrap: func(_ *state.State, _ map[string]string) error {
logger.Info("This is a hook that runs after the daemon is initialized and bootstrapped")

return nil
},

// OnStart is run after the daemon is started.
OnStart: func(s *state.State) error {
OnStart: func(_ *state.State) error {
logger.Info("This is a hook that runs after the daemon first starts")

return nil
Expand All @@ -90,28 +90,28 @@ func (c *cmdDaemon) Run(_ *cobra.Command, _ []string) error {
},

// PreJoin is run after the daemon is initialized and joins a cluster.
PreJoin: func(s *state.State, initConfig map[string]string) error {
PreJoin: func(_ *state.State, _ map[string]string) error {
logger.Info("This is a hook that runs after the daemon is initialized and joins an existing cluster, before OnNewMember runs on all peers")

return nil
},

// PostRemove is run after the daemon is removed from a cluster.
PostRemove: func(s *state.State, force bool) error {
PostRemove: func(s *state.State, _ bool) error {
logger.Infof("This is a hook that is run on peer %q after a cluster member is removed", s.Name())

return nil
},

// PreRemove is run before the daemon is removed from the cluster.
PreRemove: func(s *state.State, force bool) error {
PreRemove: func(s *state.State, _ bool) error {
logger.Infof("This is a hook that is run on peer %q just before it is removed", s.Name())

return nil
},

// OnHeartbeat is run after a successful heartbeat round.
OnHeartbeat: func(s *state.State) error {
OnHeartbeat: func(_ *state.State) error {
logger.Info("This is a hook that is run on the dqlite leader after a successful heartbeat")

return nil
Expand Down

0 comments on commit 90de0c9

Please sign in to comment.