Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // NumPara NumParams int // Scope and ScopeParam indicate the scope required by the caller. // TODO(twiesing): Once we actually include scopes, make them dynamic Scope component.Scope ScopeParam string // Handle handles this action. // // ctx is closed once the underlying connection is closed. // out is an io.Writer that is automatically sent to the client. // params holds exactly NumParams parameters. Handle func(ctx context.Context, in io.Reader, out io.Writer, params ...string) error }
Action is anything that can be retrieved from a
type ActionMap ¶
ActionMap handles a set of WebSocket actions
func (ActionMap) Handle ¶
func (am ActionMap) Handle(auth *auth.Auth, conn *websocketx.Connection) (name string, err error)
Handle handles a new incoming websocket connection by switching on the subprotocol. See appropriate protocol handlers for documentation.
type CallMessage ¶
CallMessage is sent by the client to the server to invoke a remote procedure
type ResultMessage ¶
type ResultMessage struct { Success bool `json:"success"` Message string `json:"message,omitempty"` }
ResultMessage is sent by the server to the client to report the success of a remote procedure
type SignalMessage ¶
type SignalMessage struct {
Signal Signal `json:"signal"`
}
SignalMessage is sent from the client to the server to stop the current procedure
Click to show internal directories.
Click to hide internal directories.