Documentation
¶
Index ¶
- type Endpoint
- func (e *Endpoint) CanReplace() bool
- func (e *Endpoint) Close()
- func (e *Endpoint) DoIncomingHandshake(ack *grav.TransportHandshakeAck) (*grav.TransportHandshake, error)
- func (e *Endpoint) DoOutgoingHandshake(handshake *grav.TransportHandshake) (*grav.TransportHandshakeAck, error)
- func (e *Endpoint) Send(msg grav.Message) error
- func (e *Endpoint) Start(recvFunc grav.ReceiveFunc)
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
Endpoint represents an HTTP endpoint that is "connected"
func (*Endpoint) CanReplace ¶
CanReplace returns true if the connection can be replaced
func (*Endpoint) DoIncomingHandshake ¶
func (e *Endpoint) DoIncomingHandshake(ack *grav.TransportHandshakeAck) (*grav.TransportHandshake, error)
DoIncomingHandshake does an incoming handshake
func (*Endpoint) DoOutgoingHandshake ¶
func (e *Endpoint) DoOutgoingHandshake(handshake *grav.TransportHandshake) (*grav.TransportHandshakeAck, error)
DoOutgoingHandshake does an outgoing handshake
func (*Endpoint) Start ¶
func (e *Endpoint) Start(recvFunc grav.ReceiveFunc)
Start "starts" the connection
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is an HTTP handler manager that pushes messages into a bus
func (*Transport) CreateConnection ¶
func (t *Transport) CreateConnection(endpoint string) (grav.Connection, error)
CreateConnection adds an HTTP/S endpoint to emit messages to
func (*Transport) HTTPHandlerFunc ¶
func (t *Transport) HTTPHandlerFunc() http.HandlerFunc
HTTPHandlerFunc returns an http.HandlerFunc for incoming messages
func (*Transport) HandlerFunc ¶
func (t *Transport) HandlerFunc() vk.HandlerFunc
HandlerFunc returns a vk handlerFunc for incoming messages use HTTPHAndlerFunc for a regular Go http.HandlerFunc
func (*Transport) Setup ¶
func (t *Transport) Setup(opts *grav.TransportOpts, connFunc grav.ConnectFunc, findFunc grav.FindFunc) error
Setup sets the transport up for connections
Click to show internal directories.
Click to hide internal directories.