MCPcopy Create free account
hub / github.com/ethstorage/es-node / readRequiredFlag

Function readRequiredFlag

cmd/es-node/utils.go:241–249  ·  view source on GitHub ↗
(ctx *cli.Context, flag cli.StringFlag)

Source from the content-addressed store, hash-verified

239}
240
241func readRequiredFlag(ctx *cli.Context, flag cli.StringFlag) string {
242 name := flag.GetName()
243 if !ctx.IsSet(name) {
244 lg.Crit("Flag or environment variable is required", "flag", name, "envVar", flag.EnvVar)
245 }
246 value := ctx.String(name)
247 lg.Info("Read flag", "name", name, "value", value)
248 return value
249}
250
251func downloadBlobFromRPC(endpoint string, kvIndex uint64, hash common.Hash) ([]byte, error) {
252 rpcClient, err := rpc.DialOptions(context.Background(), endpoint, rpc.WithHTTPClient(http.DefaultClient))

Callers 3

initShardManagerFunction · 0.85
EsNodeInitFunction · 0.85
EsNodeSyncFunction · 0.85

Calls 3

GetNameMethod · 0.80
IsSetMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected