Documentation ¶
Index ¶
- Constants
- func CheckHash(hash []byte, complexity byte) bool
- func CurrentExePath() string
- func NewHost(address string) *host
- func NewRange(prefix string) *rng
- func RSAPublicKeyFromDer(publicKeyDer []byte) (publicKey *rsa.PublicKey, err error)
- func SplitRequest(path string) []string
- type AddressStorage
- func (c *AddressStorage) Clear()
- func (c *AddressStorage) GetBillingInfo() BillingInfo
- func (c *AddressStorage) GetMessage(afterId uint64, maxSize uint64) (data []byte, lastId uint64, count int)
- func (c *AddressStorage) MessagesCount() (count int)
- func (c *AddressStorage) Put(id uint64, frame []byte) error
- type BillingInfo
- type Contract01
- type HttpServer
- type Message
- type Network
- func (c *Network) AddHostToRange(prefix string, address string)
- func (c *Network) GetLocalIPs() (result []string)
- func (c *Network) GetLocalPrefixes() []string
- func (c *Network) GetNodesAddressesByAddress(address string) []string
- func (c *Network) ReloadFromInternet()
- func (c *Network) SaveToFile(fileName string) error
- func (c *Network) String() string
- type Nonces
- type Router
- func (c *Router) DebugString() (result []byte)
- func (c *Router) DeclareHttpRequestB()
- func (c *Router) DeclareHttpRequestD()
- func (c *Router) DeclareHttpRequestF()
- func (c *Router) DeclareHttpRequestN()
- func (c *Router) DeclareHttpRequestNS()
- func (c *Router) DeclareHttpRequestR()
- func (c *Router) DeclareHttpRequestS()
- func (c *Router) DeclareHttpRequestW()
- func (c *Router) GetBillingInfo(addr string) (BillingInfo, error)
- func (c *Router) GetMessages(frame []byte) (response []byte, count int, err error)
- func (c *Router) Put(frame []byte) error
- func (c *Router) Start() error
- func (c *Router) StatString() (result []byte)
- func (c *Router) Stop() error
- type RouterSpeedStatistics
- type RouterStatistics
- type System
- type Udr
- type UdrRecord
- type UdrState
Constants ¶
View Source
const ( NONCE_SIZE = 16 NONCE_COMPLEXITY_POS = 4 )
View Source
const ( NONCE_COUNT = 1024 * 1024 INPUT_BUFFER_SIZE = 1024 * 1024 STORING_TIMEOUT = 60 * time.Second )
View Source
const AddressBytesSize = 30
View Source
const AddressSize = int((AddressBytesSize * 8) / 5)
View Source
const (
VERSION = int(24)
)
Variables ¶
This section is empty.
Functions ¶
func CurrentExePath ¶
func CurrentExePath() string
func RSAPublicKeyFromDer ¶
func SplitRequest ¶
Types ¶
type AddressStorage ¶
func NewAddressStorage ¶
func NewAddressStorage() *AddressStorage
func (*AddressStorage) Clear ¶
func (c *AddressStorage) Clear()
func (*AddressStorage) GetBillingInfo ¶
func (c *AddressStorage) GetBillingInfo() BillingInfo
func (*AddressStorage) GetMessage ¶
func (*AddressStorage) MessagesCount ¶
func (c *AddressStorage) MessagesCount() (count int)
type BillingInfo ¶
type Contract01 ¶
type Contract01 struct {
// contains filtered or unexported fields
}
func NewContract01 ¶
func NewContract01() *Contract01
func (*Contract01) CounterError ¶
func (c *Contract01) CounterError() int
func (*Contract01) CounterSuccess ¶
func (c *Contract01) CounterSuccess() int
func (*Contract01) IsPremium ¶
func (c *Contract01) IsPremium(xchgAddress string) bool
func (*Contract01) Records ¶
func (c *Contract01) Records() []api.ShopRecord
func (*Contract01) RecordsCount ¶
func (c *Contract01) RecordsCount() int
func (*Contract01) Start ¶
func (c *Contract01) Start() error
func (*Contract01) Stop ¶
func (c *Contract01) Stop()
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer() *HttpServer
func (*HttpServer) Start ¶
func (c *HttpServer) Start(server *Router, port int)
func (*HttpServer) Stop ¶
func (c *HttpServer) Stop() error
type Message ¶
func NewMessage ¶
type Network ¶
type Network struct { Name string `json:"name"` Ranges []*rng `json:"ranges"` Gateways []*host `json:"gateways"` // contains filtered or unexported fields }
func NewNetwork ¶
func NewNetwork() *Network
func NewNetworkDefault ¶
func NewNetworkDefault() *Network
func NewNetworkFromBytes ¶
func NewNetworkFromFile ¶
func NewNetworkFromInternet ¶
func NewNetworkFromInternet() *Network
func (*Network) AddHostToRange ¶
func (*Network) GetLocalIPs ¶
func (*Network) GetLocalPrefixes ¶
func (*Network) GetNodesAddressesByAddress ¶
func (*Network) ReloadFromInternet ¶
func (c *Network) ReloadFromInternet()
func (*Network) SaveToFile ¶
type Nonces ¶
type Nonces struct {
// contains filtered or unexported fields
}
func (*Nonces) Next ¶
func (c *Nonces) Next() [NONCE_SIZE]byte
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) DebugString ¶
func (*Router) DeclareHttpRequestB ¶
func (c *Router) DeclareHttpRequestB()
func (*Router) DeclareHttpRequestD ¶
func (c *Router) DeclareHttpRequestD()
func (*Router) DeclareHttpRequestF ¶
func (c *Router) DeclareHttpRequestF()
func (*Router) DeclareHttpRequestN ¶
func (c *Router) DeclareHttpRequestN()
func (*Router) DeclareHttpRequestNS ¶
func (c *Router) DeclareHttpRequestNS()
func (*Router) DeclareHttpRequestR ¶
func (c *Router) DeclareHttpRequestR()
func (*Router) DeclareHttpRequestS ¶
func (c *Router) DeclareHttpRequestS()
func (*Router) DeclareHttpRequestW ¶
func (c *Router) DeclareHttpRequestW()
func (*Router) GetBillingInfo ¶
func (c *Router) GetBillingInfo(addr string) (BillingInfo, error)
func (*Router) GetMessages ¶
Get message request
func (*Router) StatString ¶
type RouterSpeedStatistics ¶
type RouterSpeedStatistics struct { SpeedHttpRequests int `json:"http_requests"` SpeedHttpRequestsR int `json:"http_requests_r"` SpeedHttpRequestsW int `json:"http_requests_w"` SpeedHttpRequestsN int `json:"http_requests_n"` SpeedHttpRequestsNS int `json:"http_requests_ns"` SpeedHttpRequestsD int `json:"http_requests_d"` SpeedHttpRequestsF int `json:"http_requests_f"` SpeedFramesIn int `json:"frames_in"` SpeedFramesOut int `json:"frames_out"` SpeedBytesIn int `json:"bytes_in"` SpeedBytesOut int `json:"bytes_out"` SpeedBytesKIn int `json:"kilobytes_in"` SpeedBytesKOut int `json:"kilobytes_out"` SpeedBytesMIn int `json:"megabytes_in"` SpeedBytesMOut int `json:"megabytes_out"` Contract01CounterSuccess int `json:"contract01_success"` Contract01CounterError int `json:"contract01_error"` Contract01CounterRecords int `json:"contract01_records"` Version int `json:"version"` }
type RouterStatistics ¶
type RouterStatistics struct { FramesIn int `json:"frames_in"` FramesOut int `json:"frames_out"` BytesIn int `json:"bytes_in"` BytesOut int `json:"bytes_out"` HttpRequests int `json:"http_requests"` HttpRequestsR int `json:"http_requests_r"` HttpRequestsW int `json:"http_requests_w"` HttpRequestsN int `json:"http_requests_n"` HttpRequestsB int `json:"http_requests_b"` HttpRequestsNS int `json:"http_requests_ns"` HttpRequestsD int `json:"http_requests_d"` HttpRequestsS int `json:"http_requests_s"` HttpRequestsF int `json:"http_requests_f"` Contract01CounterSuccess int `json:"contract01_success"` Contract01CounterError int `json:"contract01_error"` Contract01CounterRecords int `json:"contract01_records"` }
type Udr ¶
type Udr struct {
// contains filtered or unexported fields
}
func (*Udr) GetIPByXchgAddress ¶
Click to show internal directories.
Click to hide internal directories.