Documentation
¶
Overview ¶
Package cdp captures an OpenObserve browser session by driving a Chromium-family browser over the Chrome DevTools Protocol. It implements webauth.Driver for openobserve-cli, and for o3 on platforms with no native WebView shell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoBrowser reports that no Chromium-family browser could be located. ErrNoBrowser = errNoBrowser // ErrCancelled reports that the user closed the browser before signing in. ErrCancelled = errors.New("browser sign-in was cancelled") // ErrTimeout reports that sign-in did not complete in time. ErrTimeout = errors.New("browser sign-in timed out") )
Sentinel errors the CLI layer maps onto its own cerrors codes.
Functions ¶
func DefaultProfileDir ¶
DefaultProfileDir is the CLI-owned persistent browser profile. Keeping the identity-provider session between logins is what stops every sign-in from requiring a full SSO round trip.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver captures a session by driving a Chromium-family browser over the DevTools Protocol. It implements webauth.Driver.
type Options ¶
type Options struct {
// ProfileDir is the browser profile to use. Empty means a temporary
// directory removed when Capture returns, which forces a fresh login every
// time; callers wanting a remembered identity-provider session pass a
// persistent path.
ProfileDir string
// Timeout bounds a whole sign-in. Zero selects defaultTimeout.
Timeout time.Duration
}
Options configures a Driver.
Click to show internal directories.
Click to hide internal directories.