Documentation ¶
Index ¶
- type Config
- type Conn
- func (c *Conn) Body() []byte
- func (c *Conn) ClientIP() string
- func (c *Conn) ConnID() uint64
- func (c *Conn) Get(key string) interface{}
- func (c *Conn) Method() string
- func (c *Conn) MultiPart() (*multipart.Form, error)
- func (c *Conn) Path() string
- func (c *Conn) Persistent() bool
- func (c *Conn) ReadHeader(key string) string
- func (c *Conn) Redirect(statusCode int, newHostPort string)
- func (c *Conn) Set(key string, val interface{})
- func (c *Conn) SetPersistent(b bool) *Conn
- func (c *Conn) WithHandler(...) *Conn
- func (c *Conn) WriteBinary(streamID int64, data []byte) error
- func (c *Conn) WriteHeader(key, value string)
- func (c *Conn) WriteStatus(status int)
- type Gateway
- func (g *Gateway) Addr() []string
- func (g *Gateway) CloseConn(connID uint64)
- func (g *Gateway) GetConn(connID uint64) rony.Conn
- func (g *Gateway) OpenConn(connID uint64, persistent bool, ...)
- func (g *Gateway) Protocol() rony.GatewayProtocol
- func (g *Gateway) REST(connID uint64, method, path string, body []byte, kvs ...*rony.KeyValue) (respBody []byte, respHdr map[string]string)
- func (g *Gateway) RPC(connID uint64, streamID int64, data []byte) error
- func (g *Gateway) Run()
- func (g *Gateway) Shutdown()
- func (g *Gateway) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) Persistent ¶
func (*Conn) ReadHeader ¶ added in v0.14.25
func (*Conn) SetPersistent ¶
func (*Conn) WithHandler ¶ added in v0.14.27
func (*Conn) WriteBinary ¶ added in v0.10.0
func (*Conn) WriteHeader ¶ added in v0.10.0
func (*Conn) WriteStatus ¶ added in v0.10.5
type Gateway ¶
type Gateway struct { gateway.ConnectHandler gateway.MessageHandler gateway.CloseHandler // contains filtered or unexported fields }
func (*Gateway) OpenConn ¶
func (g *Gateway) OpenConn( connID uint64, persistent bool, onReceiveMessage func(connID uint64, streamID int64, data []byte), hdr ...*rony.KeyValue, )
OpenConn opens a persistent connection to the gateway. For short lived use RPC or REST methods.
func (*Gateway) Protocol ¶ added in v0.7.2
func (g *Gateway) Protocol() rony.GatewayProtocol
func (*Gateway) REST ¶ added in v0.10.0
func (g *Gateway) REST( connID uint64, method, path string, body []byte, kvs ...*rony.KeyValue, ) (respBody []byte, respHdr map[string]string)
REST emulates a Http REST request.
Click to show internal directories.
Click to hide internal directories.