6 "git.curoverse.com/arvados.git/sdk/go/arvados"
9 type session interface {
10 // Receive processes a message received from the client. If a
11 // non-nil error is returned, the connection will be
15 // Filter returns true if the event should be queued for
16 // sending to the client. It should return as fast as
17 // possible, and must not block.
20 // EventMessage encodes the given event (from the front of the
21 // queue) into a form suitable to send to the client. If a
22 // non-nil error is returned, the connection is terminated. If
23 // the returned buffer is empty, nothing is sent to the client
24 // and the event is not counted in statistics.
26 // Unlike Filter, EventMessage can block without affecting
27 // other connections. If EventMessage is slow, additional
28 // incoming events will be queued. If the event queue fills
29 // up, the connection will be dropped.
30 EventMessage(*event) ([]byte, error)
33 type sessionFactory func(wsConn, chan<- interface{}, *sql.DB, permChecker, *arvados.Client) (session, error)