Documentation ¶
Index ¶
Constants ¶
View Source
const ( KubernetesType = "kubernetes" ComputeEngineType = "compute" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caps ¶
type Caps struct { Name string `json:"browserName"` Version string `json:"version"` W3CVersion string `json:"browserVersion"` ScreenResolution string `json:"screenResolution"` TestName string `json:"name"` TimeZone string `json:"timeZone"` PlatformName string `json:"platformName"` PlatformVersion string `json:"platformVersion"` DeviceName string `json:"deviceName"` App string `json:"app"` DisableAndroidWatchers string `json:"disableAndroidWatchers"` GridTimeout int `json:"gridTimeout"` NewCommandTimeout string `json:"newCommandTimeout"` }
Caps Browser capabilities
type ComputeClient ¶
func GetComputeClient ¶
func GetComputeClient() ComputeClient
func (ComputeClient) CreateGrid ¶
func (c ComputeClient) CreateGrid(gridBase *GridBase) (name string, err error)
func (ComputeClient) DeleteGrid ¶
func (c ComputeClient) DeleteGrid(name string) (err error)
func (ComputeClient) WaitUntilReady ¶
func (c ComputeClient) WaitUntilReady(name string, timeout int32) (ip string, err error)
type ComputeEngine ¶
func (ComputeEngine) StartWithCancel ¶
func (ce ComputeEngine) StartWithCancel() (grid *StartedGrid, err error)
type DefaultManager ¶
type DefaultManager struct {
GridConfig *GridConfig
}
DefaultManager Grid default manager
func (*DefaultManager) Find ¶
func (m *DefaultManager) Find(caps Caps) (GridStarter, bool)
Find Find grid matching capabilities
type Engine ¶
type Engine interface { CreateGrid(gridBase *GridBase) (string, error) DeleteGrid(name string) error WaitUntilReady(name string, timeout int32) (string, error) }
func GetEngineClient ¶
type Grid ¶
type Grid struct { Image string `yaml:"image"` Port int32 `yaml:"port"` BaseURL string `yaml:"baseURL"` HealthCheck string `yaml:"healthCheck"` EntryPoint string `yaml:"entryPoint"` VNCPort int32 `yaml:"vncPort"` Engine string `yaml:"engine"` MachineType string `yaml:"machineType"` CPURequest string `yaml:"cpuRequest"` MemoryRequest string `yaml:"memoryRequest"` CPULimit string `yaml:"cpuLimit"` MemoryLimit string `yaml:"memoryLimit"` }
type GridConfig ¶
type GridConfig struct { LastReloadTime time.Time Grids map[string]Versions // contains filtered or unexported fields }
func GetGridConfig ¶
func GetGridConfig() *GridConfig
func (*GridConfig) Load ¶
func (gc *GridConfig) Load(grids string) error
type GridStarter ¶
type GridStarter interface {
StartWithCancel() (*StartedGrid, error)
}
GridStarter Grid starter
func GetGridStarter ¶
func GetGridStarter(engineType string, gridBase GridBase, caps Caps) (grid GridStarter)
type Kubernetes ¶
Kubernetes kubernetes
func (Kubernetes) StartWithCancel ¶
func (k Kubernetes) StartWithCancel() (*StartedGrid, error)
StartWithCancel Start pod with cancel
type KubernetesClient ¶
type KubernetesClient struct {
Clientset *kubernetes.Clientset
}
KubernetesClient Kubernetes client
func GetKubernetesClient ¶
func GetKubernetesClient() *KubernetesClient
GetKubernetesClient Get kubernetes client
func (KubernetesClient) CreateGrid ¶
func (k KubernetesClient) CreateGrid(gridBase *GridBase) (podName string, err error)
CreateGrid Create browsers pod
func (KubernetesClient) DeleteGrid ¶
func (k KubernetesClient) DeleteGrid(name string) (err error)
DeleteGrid Delete pod
func (KubernetesClient) WaitUntilReady ¶
func (k KubernetesClient) WaitUntilReady(name string, timeout int32) (ip string, err error)
WaitUntilReady Wait until grid ready
type Manager ¶
type Manager interface {
Find(caps Caps, requestID uint64) (GridStarter, bool)
}
Manager Grid manager
type StartedGrid ¶
StartedGrid Started grid
Click to show internal directories.
Click to hide internal directories.