projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '13078-cds-noheader' refs #13078
[arvados.git]
/
services
/
ws
/
session.go
diff --git
a/services/ws/session.go
b/services/ws/session.go
index 9c3cef1d9adc87b69e5fab6b543253fc3be04f6a..d41e74520e20ed71d93924eb970ac534d1f34a93 100644
(file)
--- a/
services/ws/session.go
+++ b/
services/ws/session.go
@@
-1,8
+1,20
@@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
package main
+import (
+ "database/sql"
+
+ "git.curoverse.com/arvados.git/sdk/go/arvados"
+)
+
type session interface {
type session interface {
- // Receive processes a message received from the client.
- Receive(map[string]interface{}, []byte)
+ // Receive processes a message received from the client. If a
+ // non-nil error is returned, the connection will be
+ // terminated.
+ Receive([]byte) error
// Filter returns true if the event should be queued for
// sending to the client. It should return as fast as
// Filter returns true if the event should be queued for
// sending to the client. It should return as fast as
@@
-21,3
+33,5
@@
type session interface {
// up, the connection will be dropped.
EventMessage(*event) ([]byte, error)
}
// up, the connection will be dropped.
EventMessage(*event) ([]byte, error)
}
+
+type sessionFactory func(wsConn, chan<- interface{}, *sql.DB, permChecker, *arvados.Client) (session, error)