blob: fb299037c9dcb612f3ea81e5bce1c08bf0c9776a [file] [log] [blame]
package lib
type ResponseType int32
const (
ResponseFinal ResponseType = 0
ResponseStream = 1
ResponseError = 2
ResponseServerRequest = 3
ResponseStreamClose = 4
ResponseDispatcherLookup = 5
ResponseAuthRequest = 6
ResponseCancel = 7
)
type Response struct {
Type ResponseType
Message interface{}
}
// This is basically an io.Writer interface, that allows passing error message
// strings. This is how the proxy will talk to the javascript/java clients.
type ClientWriter interface {
Send(messageType ResponseType, data interface{}) error
Error(err error)
}