sngecomm

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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

View Source
const (
	// EOFMsg is the EOF message body
	EOFMsg = "STOMP_EOF"
)

Variables

View Source
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

func CommonConnect(exampid, tag string, l *log.Logger) (net.Conn,
	*stompngo.Connection,
	error)

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 ConnectHeaders

func ConnectHeaders() stompngo.Headers

Provide connect headers

func Cpuprof added in v1.0.7

func Cpuprof() string

Cpuprof returns the CPU profile file name

func CustomCiphers added in v1.0.6

func CustomCiphers() []uint16

CustomCiphers returns a slice of custom ciphers

func Dest

func Dest() string

Example destination

func DumpTLSConfig

func DumpTLSConfig(exampid string, c *tls.Config, n *tls.Conn)

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 Mdml

func Mdml() int

Mdml sets the Max Data Message Length

func Memprof added in v1.0.7

func Memprof() string

Memprof returns the memory profile file name

func Ngors added in v1.0.7

func Ngors() int

Ngors sets the number of go routines

func Nqs

func Nqs() int

Nqs sets the number of queues

func Partial

func Partial() []byte

Partial returns the partial byte slice for logging, random length

func PartialSubstr added in v1.0.7

func PartialSubstr(l int) []byte

PartialSubstr returns the partial string for logging, fixed length

func Pbc

func Pbc() int

Pbc returns the byte count to log

func Pprof

func Pprof() bool

Pprof indicates whether to use profiling or not

func RecvFactor

func RecvFactor() float64

RecvFactor returns the recv sleep factor

func RecvWait

func RecvWait() bool

RecvWait indicates whether to wait in receives to simulate message processing

func SendFactor

func SendFactor() float64

SendFactor returns the send sleep factor

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 SetLogger added in v1.0.7

func SetLogger(conn *stompngo.Connection)

Set Logger

func SetMAXPROCS

func SetMAXPROCS() bool

SetMAXPROCS returns true if max procs are to be set

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

func ValueBetween(min, max int64, fact float64) int64

Get a value between min amd max

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL