Documentation ¶
Overview ¶
A workflow wraps a set of VNC requests together into a single object, allowing that object to be acted upon as a whole, rather than as individual requests.
The purpose of a workflow is to enable the VENUE VNC server to focus on a single client at a time, as simultaneous requests from multiple clients would otherwise conflict with one another.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientConn ¶
type ClientConn interface { FramebufferHeight() uint16 FramebufferWidth() uint16 KeyEvent(key keys.Key, down bool) error PointerEvent(button buttons.Button, x, y uint16) error Close() error DebugMetrics() FramebufferUpdateRequest(inc rfbflags.RFBFlag, x, y, w, h uint16) error ListenAndHandle() error }
ClientConn is a local interface to enable mocking of the go-vnc ClientConn.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event describes a single workflow event.
type Framebuffer ¶
type Framebuffer struct {
// contains filtered or unexported fields
}
Framebuffer maintains a local copy of the remote VNC image.
func NewFramebuffer ¶
func NewFramebuffer(w, h int) *Framebuffer
NewFramebuffer returns a new Framebuffer object.
func (*Framebuffer) Height ¶
func (f *Framebuffer) Height() int
Height returns the height of the framebuffer.
func (*Framebuffer) PNG ¶
func (f *Framebuffer) PNG() (string, error)
PNG converts the framebuffer into a base64 encoded PNG string.
func (*Framebuffer) Paint ¶
func (f *Framebuffer) Paint(r vnclib.Rectangle, colors []vnclib.Color)
Paint accepts a Rectangle and Color data, and paints the framebuffer with it.
func (*Framebuffer) Width ¶
func (f *Framebuffer) Width() int
Width returns the width of the framebuffer.
type VNC ¶
type VNC struct {
// contains filtered or unexported fields
}
The VNC type contains various handles relating to a VNC connection.
func (*VNC) ClientConn ¶
func (v *VNC) ClientConn() ClientConn
func (*VNC) DebugMetrics ¶
func (v *VNC) DebugMetrics()
DebugMetrics passes the call through to the connection.
func (*VNC) FramebufferRefresh ¶
FramebufferRefresh refreshes the local framebuffer image of the VNC server every period `p`.
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
Workflow holds a client connection to the VNC server, and a list of events.
func NewWorkflow ¶
func NewWorkflow(conn ClientConn) *Workflow
NewWorkflow returns a new workflow object.
func (*Workflow) MouseClick ¶
MouseClick moves the mouse to a position and left clicks.