Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotAuthorized = errors.New("stomp: not authorized")
ErrNotAuthorized is returned when the peer connection is not authorized to establish a connection with the STOMP server.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
Authorizer is a callback function used to authenticate a peer connection prior to establishing the session. If the callback returns a non-nil error an error message is sent to the peer and the connection is closed.
func BasicAuth ¶
func BasicAuth(username, password string) Authorizer
BasicAuth is a authorization callback function that authorizes the peer connection using a basic, global username and password.
type Option ¶
type Option func(*Server)
Option configures server options.
func WithAuth ¶
func WithAuth(auth Authorizer) Option
WithAuth returns an Option which configures custom authorization for the STOMP server.
func WithCredentials ¶
WithCredentials returns an Option which configures basic authorization using the given username and password
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ...
func (*Server) Client ¶
Client returns a stomp.Client that has a direct peer connection to the server.
func (*Server) HandleDests ¶
func (s *Server) HandleDests(w http.ResponseWriter, r *http.Request)
HandleDests writes a JSON-encoded list of destinations to the http.Request.
func (*Server) HandleSessions ¶
func (s *Server) HandleSessions(w http.ResponseWriter, r *http.Request)
HandleSessions writes a JSON-encoded list of sessions to the http.Request.