Documentation ¶
Index ¶
- Constants
- Variables
- func CheckBuiltInTorrentFsError(err error) bool
- func RLPHashString(x interface{}) string
- func ReadData(inputFilePath string) ([]byte, error)
- func SwitchEndian(data []byte, bytes int) ([]byte, error)
- func ToAlignedData(data []byte, bytes int) ([]byte, error)
- type Config
- type Synapse
Constants ¶
View Source
const MinMemoryUsage int64 = 2 * 1024 * 1024 * 1024
View Source
const PLUGIN_PATH string = "plugins/"
View Source
const PLUGIN_POST_FIX string = "_cvm.so"
View Source
const ReservedMemoryUsage int64 = 512 * 1024 * 1024
Variables ¶
View Source
var ( ErrBuiltInTorrentFsPrefix = "BUILT-IN TORRENT FS ERROR" ErrInputFileNotExistFlag = "[ " + ErrBuiltInTorrentFsPrefix + " ] input file not exist" ErrModelFileNotExistFlag = "[ " + ErrBuiltInTorrentFsPrefix + " ] model file not exist" ErrInputFileNotExist = errors.New(ErrInputFileNotExistFlag) ErrModelFileNotExist = errors.New(ErrModelFileNotExistFlag) ErrFatal = errors.New("fatal") )
Functions ¶
func CheckBuiltInTorrentFsError ¶ added in v1.0.0
If infered by local, check struct error is enough. Else infered by remote, must be checked by error's text
func RLPHashString ¶ added in v1.0.0
func RLPHashString(x interface{}) string
Types ¶
type Config ¶
type Config struct { // StorageDir string `toml:",omitempty"` IsNotCache bool `toml:",omitempty"` DeviceType string `toml:",omitempty"` DeviceId int `toml:",omitempty"` IsRemoteInfer bool `toml:",omitempty"` InferURI string `toml:",omitempty"` Debug bool `toml:",omitempty"` MaxMemoryUsage int64 Storagefs torrentfs.CVMStorage }
type Synapse ¶
type Synapse struct {
// contains filtered or unexported fields
}
func (*Synapse) GetGasByInfoHash ¶ added in v1.0.0
func (*Synapse) InferByInfoHash ¶
Click to show internal directories.
Click to hide internal directories.