diff --git a/states/disconnected.go b/states/disconnected.go new file mode 100644 index 0000000..61324c9 --- /dev/null +++ b/states/disconnected.go @@ -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 +}