Documentation ¶
Index ¶
- func CreateIndexerPidFile(logger *log.Logger, pidFilePath string) error
- func DecodeSignedTxn(bh sdk.BlockHeader, stb sdk.SignedTxnInBlock) (sdk.SignedTxn, sdk.ApplyData, error)
- func Diff(expected interface{}, actual interface{}) string
- func EncodeSignedTxn(bh sdk.BlockHeader, st sdk.SignedTxn, ad sdk.ApplyData) (sdk.SignedTxnInBlock, error)
- func EnsureInitialImport(db idb.IndexerDb, genesis sdk.Genesis) (bool, error)
- func FileExists(filePath string) bool
- func GetConfigFromDataDir(dataDirectory string, configFilename string, configFileTypes []string) (string, error)
- func IsDir(path string) bool
- func JSONOneLine(obj interface{}) string
- func KeysStringBool(m map[string]bool) string
- func MaybeFail(err error, errfmt string, params ...interface{})
- func PrintableUTF8OrEmpty(in string) string
- func ReadGenesis(in io.Reader) (sdk.Genesis, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIndexerPidFile ¶
CreateIndexerPidFile creates the pid file at the specified location
func DecodeSignedTxn ¶
func DecodeSignedTxn(bh sdk.BlockHeader, stb sdk.SignedTxnInBlock) (sdk.SignedTxn, sdk.ApplyData, error)
DecodeSignedTxn converts a SignedTxnInBlock from a block to SignedTxn and its associated ApplyData.
func Diff ¶
func Diff(expected interface{}, actual interface{}) string
Diff returns a diff of both values as long as both are of the same type and are a struct, map, slice, array or string. Otherwise it returns an empty string.
func EncodeSignedTxn ¶
func EncodeSignedTxn(bh sdk.BlockHeader, st sdk.SignedTxn, ad sdk.ApplyData) (sdk.SignedTxnInBlock, error)
EncodeSignedTxn converts a SignedTxn and ApplyData into a SignedTxnInBlock for that block.
func EnsureInitialImport ¶
EnsureInitialImport imports the genesis block if needed. Returns true if the initial import occurred.
func FileExists ¶
FileExists checks to see if the specified file (or directory) exists
func GetConfigFromDataDir ¶
func GetConfigFromDataDir(dataDirectory string, configFilename string, configFileTypes []string) (string, error)
GetConfigFromDataDir Given the data directory, configuration filename and a list of types, see if a configuration file that matches was located there. If no configuration file was there then an empty string is returned. If more than one filetype was matched, an error is returned.
func JSONOneLine ¶
func JSONOneLine(obj interface{}) string
JSONOneLine converts an object into JSON
func KeysStringBool ¶
KeysStringBool returns all of the keys in the map joined by a comma.
func PrintableUTF8OrEmpty ¶
PrintableUTF8OrEmpty checks to see if the entire string is a UTF8 printable string. If this is the case, the string is returned as is. Otherwise, the empty string is returned.
Types ¶
This section is empty.