Skip to content

Commit

Permalink
Fix missing disconnect file (#162)
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Jul 4, 2023
1 parent 7fa12fe commit 350cd9a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions states/disconnected.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package states

import (
"github.com/milvus-io/birdwatcher/configs"
"github.com/spf13/cobra"
)

type disconnectState struct {
cmdState
config *configs.Config
}

func (s *disconnectState) SetupCommands() {
cmd := &cobra.Command{}

s.mergeFunctionCommands(cmd, s)

s.rootCmd = cmd
s.setupFn = s.SetupCommands
}

func getDisconnectedState(config *configs.Config) State {
state := &disconnectState{
cmdState: cmdState{
label: "Offline",
},
config: config,
}

state.SetupCommands()
return state
}

0 comments on commit 350cd9a

Please sign in to comment.