Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &command.C{ Name: "status", Help: "Print the status of the storage server.", Run: func(env *command.Env) error { if len(env.Args) != 0 { return env.Usagef("extra arguments after command") } cfg := env.Config.(*config.Settings) return cfg.WithStore(cfg.Context, func(s config.CAS) error { cs, ok := s.Base().(chirpstore.CAS) if !ok { return errors.New("store does not support the status command") } data, err := cs.Status(cfg.Context) if err != nil { return err } fmt.Println(config.ToJSON(json.RawMessage(data))) return nil }) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.