_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c17200
//pretty much copy the json code from here.
c17201
// Publish a message to a redis server.
c17202
// DigestSHA256Sum uses SHA256 digest to create the key which is the default behaviour since OpenSSL 1.1.0c
c17203
// EncryptBytes encrypts a slice of bytes that are base64 encoded in a manner compatible to OpenSSL encryption // functions using AES-256-CBC as encryption algorithm. This function generates // a random salt on every execution.
c17204
// EncryptBinaryBytes encrypts a slice of bytes in a manner compatible to OpenSSL encryption // functions using AES-256-CBC as encryption algorithm. This function generates // a random salt on every execution.
c17205
// MustGenerateSalt is a wrapper around GenerateSalt which will panic on an error. // This allows you to use this function as a parameter to EncryptBytesWithSaltAndDigestFunc
c17206
// pkcs7Unpad returns slice of the original data without padding.
c17207
// Setns sets namespace using syscall. Note that this should be a method // in syscall but it has not been added.
c17208
// New creates a new network namespace and returns a handle to it.
c17209
// GetFromPath gets a handle to a network namespace // identified by the path
c17210
// GetFromThread gets a handle to the network namespace of a given pid and tid.
c17211
// GetFromDocker gets a handle to the network namespace of a docker container. // Id is prefixed matched against the running docker containers, so a short // identifier can be used as long as it isn't ambiguous.
c17212
// Equal determines if two network handles refer to the same network // namespace. This is done by comparing the device and inode that the // file descriptors point to.
c17213
// String shows the file descriptor number and its dev and inode.
c17214
// ParseInt parse hex string value to int
c17215
// ParseBigInt parse hex string value to big.Int
c17216
// BigToHex covert big.Int to hexadecimal representation
c17217
// MarshalJSON implements the json.Unmarshaler interface.
c17218
// New create new rpc client with given url
c17219
// NewEthRPC create new rpc client with given url
c17220
// Call returns raw response of method call
c17221
// Web3ClientVersion returns the current client version.
c17222
// NetVersion returns the current network protocol version.
c17223
// NetListening returns true if client is actively listening for network connections.
c17224
// EthProtocolVersion returns the current ethereum protocol version.
c17225
// EthSyncing returns an object with data about the sync status or false.
c17226
// EthCoinbase returns the client coinbase address
c17227
// EthMining returns true if client is actively mining new blocks.
c17228
// EthGasPrice returns the current price per gas in wei.
c17229
// EthAccounts returns a list of addresses owned by client.
c17230
// EthBlockNumber returns the number of most recent block.
c17231
// EthGetBalance returns the balance of the account of given address in wei.
c17232
// EthGetStorageAt returns the value from a storage position at a given address.
c17233
// EthGetTransactionCount returns the number of transactions sent from an address.
c17234
// EthGetBlockTransactionCountByHash returns the number of transactions in a block from a block matching the given block hash.
c17235
// EthGetBlockTransactionCountByNumber returns the number of transactions in a block from a block matching the given block
c17236
// EthGetCode returns code at a given address.
c17237
// EthSendTransaction creates new message call transaction or a contract creation, if the data field contains code.
c17238
// EthSendRawTransaction creates new message call transaction or a contract creation for signed transactions.
c17239
// EthCall executes a new message call immediately without creating a transaction on the block chain.
c17240
// EthEstimateGas makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas.
c17241
// EthGetBlockByHash returns information about a block by hash.
c17242
// EthGetBlockByNumber returns information about a block by block number.
c17243
// EthGetTransactionByHash returns the information about a transaction requested by transaction hash.
c17244
// EthGetTransactionByBlockHashAndIndex returns information about a transaction by block hash and transaction index position.
c17245
// EthGetTransactionByBlockNumberAndIndex returns information about a transaction by block number and transaction index position.
c17246
// EthGetTransactionReceipt returns the receipt of a transaction by transaction hash. // Note That the receipt is not available for pending transactions.
c17247
// EthGetCompilers returns a list of available compilers in the client.
c17248
// EthNewFilter creates a new filter object.
c17249
// EthNewBlockFilter creates a filter in the node, to notify when a new block arrives. // To check if the state has changed, call EthGetFilterChanges.
c17250
// EthNewPendingTransactionFilter creates a filter in the node, to notify when new pending transactions arrive. // To check if the state has changed, call EthGetFilterChanges.
c17251
// EthUninstallFilter uninstalls a filter with given id.
c17252
// EthGetFilterChanges polling method for a filter, which returns an array of logs which occurred since last poll.
c17253
// EthGetLogs returns an array of all logs matching a given filter object.
c17254
// WithHttpClient set custom http client
c17255
// WithLogger set custom logger
c17256
// WithDebug set debug flag
c17257
// Flag is shorthand for CommandLine.Flag.
c17258
// FlagLong is shorthand for CommandLine.LongFlag.
c17259
// Flag calls FlagLong with only a short flag name.
c17260
// genericValue returns the object underlying the generic Value v, or nil if v // is not a generic Value.
c17261
// Uint64 creates an option that parses its value as a uint64.
c17262
// List creates an option that returns a slice of strings. The parameters // passed are converted from a comma seperated value list into a slice. // Subsequent occurrences append to the list.
c17263
// ListVar creats a list option and places the values in p. If p is pointing // to a list of values then those are considered the default values. The first // time name is seen in the options the list will be set to list specified by // the parameter to the option. Subsequent instances of the option will append // t...
c17264
// Var creates an option of the specified name. The type and value of the option // are represented by the first argument, of type Value, which typically holds a // user-defined implementation of Value. All options are ultimately created // as a Var.
c17265
// Uint16 creates an option that parses its value as an uint16.
c17266
// List creates an option that returns a slice of strings. The parameters // passed are converted from a comma separated value list into a slice. // Subsequent occurrences append to the list.
c17267
// Int32 creates an option that parses its value as an int32.
c17268
// Int creates an option that parses its value as an integer.
c17269
// Int16 creates an option that parses its value as a 16 bit integer.
c17270
// Int64 creates an option that parses its value as a 64 bit integer.
c17271
// Uint creates an option that parses its value as an unsigned integer.
c17272
// Uint32 creates an option that parses its value as a 32 bit unsigned integer.
c17273
// PrintUsage prints the usage line and set of options of set S to w.
c17274
// UsageLine returns the usage line for the set s. The set's program name and // parameters, if any, are not included.
c17275
// breakup breaks s up into strings no longer than max bytes.
c17276
// Parse uses Getopt to parse args using the options set for s. The first // element of args is used to assign the program for s if it is not yet set. On // error, Parse displays the error message as well as a usage message on // standard error and then exits the program.
c17277
// PrintUsage prints the usage of the program to w.
c17278
// New returns a newly created option set.
c17279
// Visit visits the options in s in lexicographical order, calling fn // for each. It visits only those options that have been set.
c17280
// VisitAll visits the command-line flags in lexicographical order, calling fn // for each. It visits all flags, even those not set.
c17281
// String returns a value option that stores is value as a string. The // initial value of the string is passed in value.
c17282
// init initializes thisPackage to our full package with the trailing . // included.
c17283
// calledFrom returns a string containing the file and linenumber of the first // stack frame above us that is not part of this package and is not a test. // This is used to determine where a flag was initialized.
c17284
// unknownOption returns an Error indicating an unknown option was // encountered.
c17285
// missingArg returns an Error inidicating option o was not passed // a required paramter.
c17286
// extraArg returns an Error inidicating option o was passed the // unexpected paramter value.
c17287
// setError returns an Error inidicating option o and the specified // error while setting it to value.
c17288
// Enum creates an option that can only be set to one of the enumerated strings // passed in values. Passing nil or an empty slice results in an option that // will always fail.
c17289
// Duration creates an option that parses its value as a time.Duration.
c17290
// sortName returns the name to sort the option on.
c17291
// Reset rests an option so that it appears it has not yet been seen.
c17292
// AddOption add the option o to set s if o is not already in set s.
c17293
// WithTTL sets the cache TTL
c17294
// isValid checks if the service is valid
c17295
// cp copies a service. Because we're caching handing back pointers would // create a race condition, so we do this instead its fast enough
c17296
// run starts the cache watcher loop // it creates a new watcher if there's a problem
c17297
// watch loops the next event and calls update // it returns if there's an error
c17298
// New returns a new cache
c17299
// ListAppEvents returns all app events based on eventType