Documentation ¶
Overview ¶
Package sngecomm provides common functionality used in the stompngo_examples project.
Package sngecomm provides common functionality used in the stompngo_examples project.
Index ¶
- Constants
- Variables
- func AckMode() string
- func CommonConnect(exampid, tag string, l *log.Logger) (net.Conn, *stompngo.Connection, error)
- func CommonDisconnect(n net.Conn, conn *stompngo.Connection, exampid, tag string, l *log.Logger) error
- func CommonTLSConnect(exampid, tag string, l *log.Logger, c *tls.Config) (net.Conn, *stompngo.Connection, error)
- func ConnectHeaders() stompngo.Headers
- func Cpuprof() string
- func CustomCiphers() []uint16
- func Dest() string
- func DumpTLSConfig(exampid string, c *tls.Config, n *tls.Conn)
- func Gorsleep() string
- func HandleAck(c *stompngo.Connection, h stompngo.Headers, id string)
- func HandleSubscribe(c *stompngo.Connection, d, i, a string) <-chan stompngo.MessageData
- func HandleUnsubscribe(c *stompngo.Connection, d, i string)
- func Logger() string
- func Mdml() int
- func Memprof() string
- func Ngors() int
- func Nqs() int
- func Partial() []byte
- func PartialSubstr(l int) []byte
- func Pbc() int
- func Pprof() bool
- func RecvFactor() float64
- func RecvWait() bool
- func SendFactor() float64
- func SendWait() bool
- func ServerIdent(c *stompngo.Connection) string
- func SetLogger(conn *stompngo.Connection)
- func SetMAXPROCS() bool
- func ShowRunParms(exampid string)
- func ShowStats(exampid, tag string, conn *stompngo.Connection)
- func UseCustomCiphers() bool
- func UseEOF() bool
- func ValueBetween(min, max int64, fact float64) int64
Constants ¶
const (
// EOFMsg is the EOF message body
EOFMsg = "STOMP_EOF"
)
Variables ¶
var (
Lcs = "NotAvailable"
)
Functions ¶
func AckMode ¶
func AckMode() string
AckMode returns an ACK mode value for those examples that use it.
func CommonConnect ¶ added in v1.0.4
Common example connect logic
func CommonDisconnect ¶ added in v1.0.4
func CommonDisconnect(n net.Conn, conn *stompngo.Connection, exampid, tag string, l *log.Logger) error
Common example disconnect logic
func CommonTLSConnect ¶ added in v1.0.4
func CommonTLSConnect(exampid, tag string, l *log.Logger, c *tls.Config) (net.Conn, *stompngo.Connection, error)
Common example TLS connect logic
func CustomCiphers ¶ added in v1.0.6
func CustomCiphers() []uint16
CustomCiphers returns a slice of custom ciphers
func DumpTLSConfig ¶
Dump a TLS Configuration Struct
func Gorsleep ¶ added in v1.0.7
func Gorsleep() string
Gorsleep returns an indication of whether go routines will sleep or not
func HandleAck ¶ added in v1.0.2
func HandleAck(c *stompngo.Connection, h stompngo.Headers, id string)
Handle ACKs for the different protocol levels.
func HandleSubscribe ¶ added in v1.0.2
func HandleSubscribe(c *stompngo.Connection, d, i, a string) <-chan stompngo.MessageData
Handle a subscribe for the different protocol levels.
func HandleUnsubscribe ¶ added in v1.0.2
func HandleUnsubscribe(c *stompngo.Connection, d, i string)
Handle a unsubscribe for the different protocol levels.
func Logger ¶ added in v1.0.7
func Logger() string
Logger returns an indication of whether to do logging
func Partial ¶
func Partial() []byte
Partial returns the partial byte slice for logging, random length
func PartialSubstr ¶ added in v1.0.7
PartialSubstr returns the partial string for logging, fixed length
func RecvWait ¶
func RecvWait() bool
RecvWait indicates whether to wait in receives to simulate message processing
func SendWait ¶
func SendWait() bool
SendWait indicates whether to wait in sends to simulate message processing
func ServerIdent ¶ added in v1.0.4
func ServerIdent(c *stompngo.Connection) string
Return broker identity
func ShowRunParms ¶
func ShowRunParms(exampid string)
func ShowStats ¶
func ShowStats(exampid, tag string, conn *stompngo.Connection)
Show connection metrics.
func UseCustomCiphers ¶ added in v1.0.6
func UseCustomCiphers() bool
UseCustomCiphers returns true if custom ciphers are to be used
func UseEOF ¶ added in v1.0.7
func UseEOF() bool
UseEOF returns true if en EOF message is to be used.
func ValueBetween ¶
Get a value between min amd max
Types ¶
This section is empty.