Documentation ¶
Overview ¶
The frame package contains constants associated with STOMP frames.
Keeping these constants in a separate package helps prevent the stomp package from getting to busy, as none of these constants are needed when calling the stomp package.
Index ¶
Constants ¶
const ( AckAuto = "auto" // Client does not send ACK AckClient = "client" // Client sends ACK/NACK AckClientIndividual = "client-individual" // Client sends ACK/NACK for individual messages )
Valid values for the "ack" header entry.
const ( // Connect commands. CONNECT = "CONNECT" STOMP = "STOMP" CONNECTED = "CONNECTED" // Client commands. SEND = "SEND" SUBSCRIBE = "SUBSCRIBE" UNSUBSCRIBE = "UNSUBSCRIBE" ACK = "ACK" NACK = "NACK" BEGIN = "BEGIN" COMMIT = "COMMIT" ABORT = "ABORT" DISCONNECT = "DISCONNECT" // Server commands. MESSAGE = "MESSAGE" RECEIPT = "RECEIPT" ERROR = "ERROR" )
STOMP frame commands. Used upper case naming convention to avoid clashing with STOMP header names.
const ( ContentLength = "content-length" ContentType = "content-type" Receipt = "receipt" AcceptVersion = "accept-version" Host = "host" Version = "version" Login = "login" Passcode = "passcode" HeartBeat = "heart-beat" Session = "session" Server = "server" Destination = "destination" Id = "id" Ack = "ack" Transaction = "transaction" ReceiptId = "receipt-id" Subscription = "subscription" MessageId = "message-id" Message = "message" )
STOMP header names. Some of the header names have commands with the same name (eg Ack, Message, Receipt). Commands use an upper-case naming convention, header names use pascal-case naming convention.
Variables ¶
This section is empty.
Functions ¶
func ParseHeartBeat ¶
ParseHeartBeat parses the value of a STOMP heart-beat entry and returns two time durations. Returns an error if the heart-beat value is not in the correct format, or if the time durations are too big to be represented by the time.Duration type.
Types ¶
This section is empty.