Documentation ¶
Overview ¶
statusPkg implements the chifra status command.
The chifra status tool reports on the state (and size) of the various TrueBlocks local binary caches. TrueBlocks produces nine difference caches: abis, blocks, monitors, names, objs, recons, slurps, traces, transactions. In general practice, these caches may take up a few GB of hard drive space, however, for very popular smart contract the size of the caches may grow rather large. Keep an eye on it.
The chifra status program allows you to manage the various TrueBlocks caches. You may list all of the caches, some of the cache, or even individual caches either in terse or full detail. The cache of interest is specified with the modes option.
TrueBlocks maintains caches for the index of address appearances, named addresses, abi files, as well as other data including blockchain data, and address monitors.
Index ¶
- func ResetOptions(testMode bool)
- func RunStatus(cmd *cobra.Command, args []string) error
- func ServeStatus(w http.ResponseWriter, r *http.Request) error
- func ToProgress(chain string, diagnose bool, meta *types.MetaData) string
- type CacheWalker
- type StatusOptions
- func (opts *StatusOptions) GetStatus(diagnose bool) (*types.Status, error)
- func (opts *StatusOptions) HandleDiagnose(rCtx *output.RenderCtx) error
- func (opts *StatusOptions) HandleModes(rCtx *output.RenderCtx) error
- func (opts *StatusOptions) HandleShow(rCtx *output.RenderCtx) error
- func (opts *StatusOptions) StatusInternal(rCtx *output.RenderCtx) error
- func (opts *StatusOptions) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
func RunStatus ¶
RunStatus handles the status command for the command line. Returns error only as per cobra.
func ServeStatus ¶
func ServeStatus(w http.ResponseWriter, r *http.Request) error
ServeStatus handles the status command for the API. Returns an error.
Types ¶
type CacheWalker ¶
type CacheWalker struct {
// contains filtered or unexported fields
}
type StatusOptions ¶
type StatusOptions struct { Modes []string `json:"modes,omitempty"` // The (optional) name of the binary cache to report on, terse otherwise Diagnose bool `json:"diagnose,omitempty"` // Same as the default but with additional diagnostics FirstRecord uint64 `json:"firstRecord,omitempty"` // The first record to process MaxRecords uint64 `json:"maxRecords,omitempty"` // The maximum number of records to process Chains bool `json:"chains,omitempty"` // Include a list of chain configurations in the output Healthcheck bool `json:"healthcheck,omitempty"` // An alias for the diagnose endpoint Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options Conn *rpc.Connection `json:"conn,omitempty"` // The connection to the RPC server BadFlag error `json:"badFlag,omitempty"` // An error flag if needed // EXISTING_CODE ModeTypes []walk.CacheType `json:"-"` }
StatusOptions provides all command options for the chifra status command.
func GetOptions ¶
func GetOptions() *StatusOptions
func GetStatusOptions ¶
func GetStatusOptions(args []string, g *globals.GlobalOptions) *StatusOptions
GetStatusOptions returns the options for this tool so other tools may use it.
func StatusFinishParseInternal ¶
func StatusFinishParseInternal(w io.Writer, values url.Values) *StatusOptions
func (*StatusOptions) GetStatus ¶
func (opts *StatusOptions) GetStatus(diagnose bool) (*types.Status, error)
func (*StatusOptions) HandleDiagnose ¶
func (opts *StatusOptions) HandleDiagnose(rCtx *output.RenderCtx) error
func (*StatusOptions) HandleModes ¶
func (opts *StatusOptions) HandleModes(rCtx *output.RenderCtx) error
func (*StatusOptions) HandleShow ¶
func (opts *StatusOptions) HandleShow(rCtx *output.RenderCtx) error
func (*StatusOptions) StatusInternal ¶
func (opts *StatusOptions) StatusInternal(rCtx *output.RenderCtx) error
StatusInternal handles the internal workings of the status command. Returns an error.
func (*StatusOptions) String ¶
func (opts *StatusOptions) String() string
String implements the Stringer interface