Documentation ¶
Index ¶
- Constants
- Variables
- func CalcFileBlockSizeAndScanSize(fsize int64) (int64, int64)
- func ConnectionFiltering(conn *net.TCPConn) bool
- func GetFileState(c chain.Chainer, fileHash string) (string, error)
- func VerifySign(pkey, signmsg, sign []byte) (bool, error)
- type Client
- type ConMgr
- type Filler
- type Fillermetamap
- type Message
- type MsgType
- type NetConn
- type Node
- type Notify
- type Scheduler
- type Server
- type Status
- type TagInfo
- type TcpCon
Constants ¶
View Source
const ( FileType_Invalid uint8 = iota FileType_file FileType_filler )
Variables ¶
View Source
var ( C_Filler chan Filler C_FillerMeta chan chain.FillerMetaInfo FillerMap *Fillermetamap )
View Source
var ( HEAD_FILE = []byte("c100") HEAD_FILLER = []byte("c101") )
Functions ¶
func ConnectionFiltering ¶ added in v0.5.3
func VerifySign ¶
Types ¶
type Client ¶
type ConMgr ¶
type ConMgr struct {
// contains filtered or unexported fields
}
type Fillermetamap ¶
type Fillermetamap struct { Fillermetas map[string][]chain.FillerMetaInfo // contains filtered or unexported fields }
func (*Fillermetamap) Add ¶
func (this *Fillermetamap) Add(pubkey string, data chain.FillerMetaInfo)
func (*Fillermetamap) Delete ¶
func (this *Fillermetamap) Delete(pubkey string)
func (*Fillermetamap) GetNum ¶
func (this *Fillermetamap) GetNum(pubkey string) int
type Message ¶
type Message struct { Pubkey []byte `json:"pubkey"` SignMsg []byte `json:"signmsg"` Sign []byte `json:"sign"` Bytes []byte `json:"bytes"` FileName string `json:"filename"` FileHash string `json:"filehash"` FileSize uint64 `json:"filesize"` MsgType MsgType `json:"msgtype"` LastMark bool `json:"lastmark"` FileType uint8 `json:"filetype"` }
type Node ¶
type Node struct { Confile confile.Confiler Chain chain.Chainer Logs logger.Logger Cache db.Cacher FileDir string TagDir string FillerDir string }
func (*Node) CoroutineMgr ¶
func (node *Node) CoroutineMgr()
CoroutineMgr is the management program of the cooperation program, which can start the cooperation program that unexpectedly exits.
func (*Node) FileBackupManagement ¶
file backup management
type TcpCon ¶
type TcpCon struct {
// contains filtered or unexported fields
}
func (*TcpCon) GetRemoteAddr ¶
func (*TcpCon) HandlerLoop ¶
Click to show internal directories.
Click to hide internal directories.