server

package
v0.0.0-...-b242329 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CH_STATE_INIT    = iota
	CH_STATE_OPEN    = iota
	CH_STATE_CLOSING = iota
	CH_STATE_CLOSED  = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPConnection

type AMQPConnection struct {
	// contains filtered or unexported fields
}

func NewAMQPConnection

func NewAMQPConnection(server *Server, network net.Conn) *AMQPConnection

func (*AMQPConnection) MarshalJSON

func (conn *AMQPConnection) MarshalJSON() ([]byte, error)

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(id uint16, conn *AMQPConnection) *Channel

func (*Channel) AcquireResources

func (channel *Channel) AcquireResources(qm *amqp.QueueMessage) bool

func (*Channel) AddUnackedMessage

func (channel *Channel) AddUnackedMessage(consumerTag string, msg *amqp.QueueMessage, queueName string) uint64

func (*Channel) FlowActive

func (channel *Channel) FlowActive() bool

func (*Channel) ReleaseResources

func (channel *Channel) ReleaseResources(qm *amqp.QueueMessage)

func (*Channel) SendContent

func (channel *Channel) SendContent(method amqp.MethodFrame, message *amqp.Message)

Send a method frame out to the client

func (*Channel) SendMethod

func (channel *Channel) SendMethod(method amqp.MethodFrame)

Send a method frame out to the client TODO: why isn't this taking a pointer?

type ConnectStatus

type ConnectStatus struct {
	// contains filtered or unexported fields
}

TODO: we can only be "in" one of these at once, so this should probably be one field

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(dbPath string, msgStorePath string, userJson map[string]interface{}, strictMode bool) *Server

func (*Server) Close

func (server *Server) Close() error

Close closes all open connections

func (*Server) MarshalJSON

func (server *Server) MarshalJSON() ([]byte, error)

func (*Server) OpenConnection

func (server *Server) OpenConnection(network net.Conn)

type User

type User struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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