Documentation ¶
Index ¶
- Constants
- func CheckHash(hash []byte, complexity byte) bool
- func CurrentExePath() string
- func RSAPublicKeyFromDer(publicKeyDer []byte) (publicKey *rsa.PublicKey, err error)
- func SplitRequest(path string) []string
- type HttpServer
- type Message
- type Router
- func (c *Router) DebugString() (result []byte)
- 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) GetMessages(frame []byte) (response []byte, count int, err error)
- func (c *Router) Put(frame []byte)
- func (c *Router) Start() error
- func (c *Router) StatString() (result []byte)
- func (c *Router) Stop() error
- type RouterSpeedStatistics
- type RouterStatistics
- type Storage
Constants ¶
View Source
const ( NONCE_COUNT = 1024 * 1024 INPUT_BUFFER_SIZE = 10 * 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 HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer() *HttpServer
func (*HttpServer) ServeHTTP ¶ added in v0.2.8
func (c *HttpServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*HttpServer) Start ¶
func (c *HttpServer) Start(server *Router, port int)
func (*HttpServer) Stop ¶
func (c *HttpServer) Stop() error
type Message ¶
func NewMessage ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) DebugString ¶
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) 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"` 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"` HttpRequestsNS int `json:"http_requests_ns"` HttpRequestsD int `json:"http_requests_d"` HttpRequestsS int `json:"http_requests_s"` HttpRequestsF int `json:"http_requests_f"` }
type Storage ¶
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) GetMessage ¶
func (*Storage) MessagesCount ¶
Click to show internal directories.
Click to hide internal directories.