Documentation ¶
Index ¶
- type BrowserProvider
- func (p *BrowserProvider) ConfigureNode(ctx context.Context, node *v1.Node)
- func (p *BrowserProvider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *BrowserProvider) DeletePod(ctx context.Context, pod *v1.Pod) error
- func (p *BrowserProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, ...) (io.ReadCloser, error)
- func (p *BrowserProvider) GetPod(ctx context.Context, namespace, name string) (*v1.Pod, error)
- func (p *BrowserProvider) GetPodStats(ctx context.Context, namespace, name string) *stats.PodStats
- func (p *BrowserProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *BrowserProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *BrowserProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, ...) error
- func (p *BrowserProvider) UpdatePod(ctx context.Context, pod *v1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserProvider ¶
type BrowserProvider struct {
// contains filtered or unexported fields
}
BrowserProvider implements the virtual-kubelet provider interface
func NewBrowserProvider ¶
func NewBrowserProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32, clusterDomain string) (*BrowserProvider, error)
NewBrowserProvider creates a new Browser Provider
func (*BrowserProvider) ConfigureNode ¶
func (p *BrowserProvider) ConfigureNode(ctx context.Context, node *v1.Node)
ConfigureNode enables a provider to configure the node object that will be used for Kubernetes.
func (*BrowserProvider) CreatePod ¶
CreatePod takes a Kubernetes Pod and deploys it within the provider.
func (*BrowserProvider) DeletePod ¶
DeletePod takes a Kubernetes Pod and deletes it from the provider. Once a pod is deleted, the provider is expected to call the NotifyPods callback with a terminal pod status where all the containers are in a terminal state, as well as the pod. DeletePod may be called multiple times for the same pod.
func (*BrowserProvider) GetContainerLogs ¶
func (p *BrowserProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)
GetContainerLogs retrieves the logs of a container by name from the provider.
func (*BrowserProvider) GetPod ¶
GetPod retrieves a pod by name from the provider (can be cached). The Pod returned is expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.
func (*BrowserProvider) GetPodStats ¶
GetPodStats gets the metrics for a pod. As the browser does not provide the metrics needed we stub it out
func (*BrowserProvider) GetPodStatus ¶
func (p *BrowserProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
GetPodStatus retrieves the status of a pod by name from the provider. The PodStatus returned is expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.
func (*BrowserProvider) GetPods ¶
GetPods retrieves a list of all pods running on the provider (can be cached). The Pods returned are expected to be immutable, and may be accessed concurrently outside of the calling goroutine. Therefore it is recommended to return a version after DeepCopy.
func (*BrowserProvider) RunInContainer ¶
func (p *BrowserProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, attach api.AttachIO) error
RunInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.