Documentation ¶
Index ¶
- Constants
- func PurgeIncomingLogEntryJSON(entries chan *IncomingLogEntryJSON)
- func PurgeInternalLogEntryJSON(entries chan *InternalLogEntryJSON)
- func PurgeLogQueryJSON(queries chan *LogQueryJSON)
- func PurgeOutgoingLogEntryJSON(entries chan *OutgoingLogEntryJSON)
- type AcceptJSON
- type AcceptResultJSON
- type Credentials
- type IncomingLogEntryJSON
- type InternalLogEntryJSON
- type LogQueryJSON
- type MessageHeaderJSON
- type OutgoingLogEntryJSON
- type PasswordJSON
- type ProtocolHandler
- type StatJSON
- type TransferJSON
- type TruncateJSON
- type UserInfoJSON
Constants ¶
View Source
const ( //The body is a sequnce of IncomingLogEntryJSON terminated by \0. //<IncomingLogEntryJSON>\0<IncomingLogEntryJSON>\0...\0<IncomingLogEntryJSON>\0\0 // //The message has no response. ActionWrite = "write" //The body is a sequence of LogQueryJSON terminated by \0. //<LogQueryJSON>\0<LogQueryJSON>\0...\0<LogQueryJSON>\0\0 // //The response is a sequnce of OutgoingLogEntryJSON. //<OutgoingLogEntryJSON>\0<OutgoingLogEntryJSON>\0...\0<OutgoingLogEntryJSON>\0\0 ActionRead = "read" //The body is a sequence of LogQueryJSON terminated by \0. //<LogQueryJSON>\0<LogQueryJSON>\0...\0<LogQueryJSON>\0\0 // //The response is a sequnce of InternalLogEntryJSON. //<InternalLogEntryJSON>\0<InternalLogEntryJSON>\0...\0<InternalLogEntryJSON>\0\0 ActionInternalRead = "iread" //The body is \0 terminated TruncateJSON. //The action has no response. ActionTruncate = "truncate" //The body is \0 terminated TransferJSON. ActionTransfer = "transfer" //The body is \0 terminated AcceptJSON followed by //a sequnce of InternalLogEntryJSON. //<AcceptJSON>\0<InternalLogEntryJSON>\0<InternalLogEntryJSON>\0...\0<InternalLogEntryJSON>\0\0 // //The response is \0 terminated AcceptResultJSON. ActionAccept = "accept" //The body is a sequence of StatJSON terminated by \0. //<StatJSON>\0<StatJSON>\0...\0<StatJSON>\0\0 ActionStat = "stat" //The body is \0 terminated UserInfoJSON. ActionUser = "user" //The body is \0 terminated PasswordJSON. ActionPassword = "pass" )
Actions of the messages.
Variables ¶
This section is empty.
Functions ¶
func PurgeIncomingLogEntryJSON ¶
func PurgeIncomingLogEntryJSON(entries chan *IncomingLogEntryJSON)
func PurgeInternalLogEntryJSON ¶
func PurgeInternalLogEntryJSON(entries chan *InternalLogEntryJSON)
func PurgeLogQueryJSON ¶
func PurgeLogQueryJSON(queries chan *LogQueryJSON)
func PurgeOutgoingLogEntryJSON ¶
func PurgeOutgoingLogEntryJSON(entries chan *OutgoingLogEntryJSON)
Types ¶
type IncomingLogEntryJSON ¶
type IncomingLogEntryJSON struct { Sev int Src string //The message is always in plain text. //Compressing and decompressing of the messages is //the responsibility of the hub. Msg string }
The log entries written by applications.
func (*IncomingLogEntryJSON) IsValid ¶
func (m *IncomingLogEntryJSON) IsValid() bool
Validates the incoming message.
type InternalLogEntryJSON ¶
type InternalLogEntryJSON struct { Sev int Src string Enc int //The value is base64 string if the Enc is EncodingDeflate; //if the End is EncodingPlain, then Msg is plain text. Msg string Ts int64 }
The log entries for the internal communication.
type LogQueryJSON ¶
The log query.
type MessageHeaderJSON ¶
type MessageHeaderJSON struct { //The action to perform (one of Action... contants). //The action determines the structures of the body. Action string //Name of the user performing the operation. Usr string //Password of the user performing the operation. Pass string }
The message header that each message starts with.
type OutgoingLogEntryJSON ¶
type OutgoingLogEntryJSON struct { IncomingLogEntryJSON Ts int64 }
The log entries returned by the hub to its clients.
type ProtocolHandler ¶
type ProtocolHandler interface { Write(*Credentials, chan *IncomingLogEntryJSON) Read(*Credentials, chan *LogQueryJSON, chan *OutgoingLogEntryJSON) InternalRead(*Credentials, chan *LogQueryJSON, chan *InternalLogEntryJSON) Truncate(*Credentials, *TruncateJSON) Transfer(*Credentials, *TransferJSON) Accept(*Credentials, *AcceptJSON, chan *InternalLogEntryJSON, chan *AcceptResultJSON) Stat(*Credentials, chan *StatJSON) User(*Credentials, *UserInfoJSON) Password(*Credentials, *PasswordJSON) Close() }
The interface which a protocol handler must implement.
type TransferJSON ¶
The transfer command.
Click to show internal directories.
Click to hide internal directories.