Documentation
¶
Index ¶
- Constants
- Variables
- func CanExtra(e browser.Entry) error
- func CanHost(e browser.Entry) error
- func Check(sel []browser.Entry) error
- func Default(entries []browser.Entry) (browser.Entry, error)
- func Demoted(entries []browser.Entry) []browser.Entry
- func Fallback(o browser.Options, entries []browser.Entry) bool
- func Find(entries []browser.Entry, id string) (browser.Entry, bool)
- func Go(ctx context.Context, cfg Config, sel []browser.Entry) error
- func IsHeadless(e browser.Entry) bool
- func IsPair(e browser.Entry) bool
- func IsSix(e browser.Entry) bool
- func PageOrigins(page string, extra []string) ([]string, error)
- func PairEntry() browser.Entry
- func ProfileLabel(ep browser.Endpoint) string
- func Profiles(o browser.Options, in browser.Installed) []string
- func Resolve(entries []browser.Entry, ids []string) ([]browser.Entry, error)
- func ResolveSix(o browser.Options, port int, entries []browser.Entry, ids []string) ([]browser.Entry, error)
- func SixLabel(e browser.Entry) string
- func SlowLine(name string, elapsed int) string
- func WithPair(o browser.Options, entries []browser.Entry) []browser.Entry
- func WithSixRows(o browser.Options, entries []browser.Entry) []browser.Entry
- type Browser
- type Caps
- type Config
- type Event
- type Kind
- type Relink
Constants ¶
View Source
const ( RoleSeven = "seven" RoleExtra = "extra" )
View Source
const DefaultPage = "https://seven.sliccy.ai/"
View Source
const FallbackNotice = "" /* 131-byte string literal not displayed */
View Source
const KindPair browser.Kind = "default-browser"
View Source
const PairID = "default-browser"
View Source
const RelinkReason = "slicc is relinking"
View Source
const Schema = 1
Variables ¶
View Source
var ErrNoBrowser = errors.New("no browser to control: run `slicc open` to link seven in your everyday browser")
View Source
var Public = map[Kind]bool{ Discovered: true, Launched: true, Attached: true, Linked: true, LinkLost: true, BrowserGone: true, BrowserBack: true, BrowserSlow: true, Closed: true, Error: true, ForeignBrowser: true, }
Functions ¶
func IsHeadless ¶ added in v1.45.0
func ProfileLabel ¶ added in v1.29.3
func ResolveSix ¶ added in v1.30.0
Types ¶
type Config ¶
type Config struct {
Page string
Origins []string
Profile string
Profiles map[string]string
Headless bool
Kernel int
Name string
Version string
Allow policy.Rules
Deny policy.Rules
Expose []uint16
Browser browser.Options
Chosen bool
Register func(ctx context.Context, n *node.Node, pol *policy.Policy, browsers []Browser) (Caps, error)
Compute string
Relink <-chan Relink
Emit func(Event)
Logf func(format string, args ...any)
}
type Event ¶
type Event struct {
Schema int `json:"schema"`
Event Kind `json:"event"`
Entries []browser.Entry `json:"entries,omitempty"`
Browser string `json:"browser,omitempty"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Role string `json:"role,omitempty"`
Launched bool `json:"launched,omitempty"`
PID int `json:"pid,omitempty"`
Profile string `json:"profile,omitempty"`
ProfileDir string `json:"profileDir,omitempty"`
CDP string `json:"cdp,omitempty"`
WebSocketURL string `json:"webSocketDebuggerUrl,omitempty"`
Tab string `json:"tab,omitempty"`
Peer string `json:"peer,omitempty"`
Caps []string `json:"caps,omitempty"`
Policy string `json:"policy,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
Browsers []string `json:"browsers,omitempty"`
Stream string `json:"stream,omitempty"`
Count int `json:"count,omitempty"`
Kernel string `json:"kernel,omitempty"`
Compute string `json:"compute,omitempty"`
OpenedTab *bool `json:"openedTab,omitempty"`
Elapsed int `json:"elapsed,omitempty"`
URL string `json:"url,omitempty"`
Time time.Time `json:"-"`
}
func (Event) MarshalJSON ¶
type Kind ¶
type Kind string
const ( Discovered Kind = "discovered" Launched Kind = "launched" Attached Kind = "attached" Serving Kind = "serving" Connecting Kind = "connecting" Linked Kind = "linked" LinkLost Kind = "link-lost" StreamOpen Kind = "stream-open" StreamDone Kind = "stream-close" Dropped Kind = "dropped" Status Kind = "status" Kernel Kind = "kernel" BrowserGone Kind = "browser-gone" BrowserBack Kind = "browser-back" BrowserSlow Kind = "browser-slow" Closed Kind = "closed" Error Kind = "error" Pairing Kind = "pairing" ForeignBrowser Kind = "foreign-browser" )
Click to show internal directories.
Click to hide internal directories.