Documentation ¶
Index ¶
- func TypeVerify(t Type) *errors.Error
- type Expect
- type Job
- type MemQueue
- func (m *MemQueue) Append(msg *Message) (*Job, *errors.Error)
- func (m *MemQueue) Confirm(hash string) (*Job, *errors.Error)
- func (m *MemQueue) Get(hash string) (*Job, *errors.Error)
- func (m *MemQueue) Head() (*Job, *errors.Error)
- func (m *MemQueue) Remove(hash string) (*Job, *errors.Error)
- func (m *MemQueue) Tail() (*Job, *errors.Error)
- type Message
- type Notifier
- type Option
- type Payload
- type Peer
- type Queue
- type ReplyPayload
- type Request
- type RequestPayload
- type State
- type Twelve
- type Type
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeVerify ¶
Types ¶
type Expect ¶
type MemQueue ¶
type MemQueue struct {
// contains filtered or unexported fields
}
func NewMemQueue ¶
func NewMemQueue() *MemQueue
type Message ¶
type Message struct { Type Type `json:"t"` Version Version `json:"v"` ID string `json:"i"` Nonce int64 `json:"n"` Timestamp int64 `json:"tp"` Payload []byte `json:"pd"` Signature string `json:"s"` Peer *Peer `json:"pr"` // contains filtered or unexported fields }
func NewMessage ¶
func (*Message) GetReplyPayload ¶
func (msg *Message) GetReplyPayload() *ReplyPayload
func (*Message) GetRequestPayload ¶
func (msg *Message) GetRequestPayload() *RequestPayload
type ReplyPayload ¶
type ReplyPayload struct { ID string `json:"i"` // Request ID Signature string `json:"s"` // Request Signature }
func ReplyPayloadOf ¶
func ReplyPayloadOf(byteData []byte) (*ReplyPayload, *errors.Error)
func (*ReplyPayload) Verify ¶
func (p *ReplyPayload) Verify() *errors.Error
type RequestPayload ¶
type RequestPayload struct { Action string `json:"a"` Parameter []byte `json:"p"` // contains filtered or unexported fields }
func RequestPayloadOf ¶
func RequestPayloadOf(byteData []byte) (*RequestPayload, *errors.Error)
func (*RequestPayload) GetHash ¶
func (p *RequestPayload) GetHash() string
func (*RequestPayload) Verify ¶
func (p *RequestPayload) Verify() *errors.Error
Click to show internal directories.
Click to hide internal directories.