Documentation ¶
Overview ¶
Package pijector uses the Chromium devtools protocol to control a Chromium instance in debugging mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Version of Pijector. Overridden at build time.
Version = "development"
)
Functions ¶
func DefaultTransport ¶ added in v0.2.0
func DefaultTransport() http.RoundTripper
DefaultTransport for HTTP requests to the Pijector API. Useful for wrapping the transport from outside the library.
Types ¶
type RemoteOption ¶ added in v0.2.0
type RemoteOption func(*remoteInitOpt)
func WithClientTimeout ¶ added in v0.2.0
func WithClientTimeout(ttl time.Duration) RemoteOption
WithClientTimeout while connecting to the Pijector API.
func WithPassword ¶ added in v0.2.0
func WithPassword(password string) RemoteOption
WithPassword to authenticate to remote Pijector API.
func WithRoundTripper ¶ added in v0.2.0
func WithRoundTripper(rt http.RoundTripper) RemoteOption
WithRoundTripper for HTTP requests to the Pijector API.
type Screen ¶ added in v0.2.0
type Screen interface { // ID of the Screen, which is unique across Pijector instances. ID() string // Name of the Screen. Intended to be human-friendly. If name is not set when // the Screen is created, it will return ID(). Name() string // Show a url on the Screen. Show(u string) error // Snap a screenshot of the Screen's current display. Snap() (io.ReadCloser, error) // Stat of the Screen. Stat() (ScreenStatus, error) }
Screen represents a single Pijector display.
func AttachLocal ¶ added in v0.2.0
AttachLocal attaches a local Chromium instance via CDP at the provided addr, and identifies it in Pijector with the provided human-friendly name.
func AttachRemote ¶ added in v0.2.0
func AttachRemote(name, u string, opts ...RemoteOption) (Screen, error)
type ScreenStatus ¶ added in v0.2.0
ScreenStatus contains information about a Screen's current display.
Directories ¶
Path | Synopsis |
---|---|
Package admin serves an admin UI for a pijector server.
|
Package admin serves an admin UI for a pijector server. |
Package api is the HTTP API hander for a pijector server.
|
Package api is the HTTP API hander for a pijector server. |
cmd
|
|
Click to show internal directories.
Click to hide internal directories.