Documentation ¶
Index ¶
- type HyperProvider
- func (p *HyperProvider) Capacity(ctx context.Context) v1.ResourceList
- func (p *HyperProvider) CreatePod(ctx context.Context, pod *v1.Pod) error
- func (p *HyperProvider) DeletePod(ctx context.Context, pod *v1.Pod) (err error)
- func (p *HyperProvider) ExecInContainer(name string, uid apitypes.UID, container string, cmd []string, in io.Reader, ...) error
- func (p *HyperProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
- func (p *HyperProvider) GetPod(ctx context.Context, namespace, name string) (pod *v1.Pod, err error)
- func (p *HyperProvider) GetPodFullName(namespace string, pod string) string
- func (p *HyperProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
- func (p *HyperProvider) GetPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *HyperProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
- func (p *HyperProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
- func (p *HyperProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
- func (p *HyperProvider) OperatingSystem() string
- func (p *HyperProvider) 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 HyperProvider ¶
type HyperProvider struct {
// contains filtered or unexported fields
}
HyperProvider implements the virtual-kubelet provider interface and communicates with hyper.sh APIs.
func NewHyperProvider ¶
func NewHyperProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string) (*HyperProvider, error)
NewHyperProvider creates a new HyperProvider
func (*HyperProvider) Capacity ¶
func (p *HyperProvider) Capacity(ctx context.Context) v1.ResourceList
Capacity returns a resource list containing the capacity limits set for hyper.sh.
func (*HyperProvider) CreatePod ¶
CreatePod accepts a Pod definition and creates a hyper.sh deployment
func (*HyperProvider) ExecInContainer ¶ added in v0.4.1
func (p *HyperProvider) ExecInContainer(name string, uid apitypes.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
ExecInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr. TODO: Implementation
func (*HyperProvider) GetContainerLogs ¶
func (p *HyperProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, tail int) (string, error)
GetContainerLogs retrieves the logs of a container by name from the provider.
func (*HyperProvider) GetPod ¶
func (p *HyperProvider) GetPod(ctx context.Context, namespace, name string) (pod *v1.Pod, err error)
GetPod returns a pod by name that is running inside hyper.sh returns nil if a pod by that name is not found.
func (*HyperProvider) GetPodFullName ¶ added in v0.4.1
func (p *HyperProvider) GetPodFullName(namespace string, pod string) string
Get full pod name as defined in the provider context TODO: Implementation
func (*HyperProvider) GetPodStatus ¶
func (p *HyperProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error)
GetPodStatus returns the status of a pod by name that is running inside hyper.sh returns nil if a pod by that name is not found.
func (*HyperProvider) GetPods ¶
GetPods returns a list of all pods known to be running within hyper.sh.
func (*HyperProvider) NodeAddresses ¶
func (p *HyperProvider) NodeAddresses(ctx context.Context) []v1.NodeAddress
NodeAddresses returns a list of addresses for the node status within Kubernetes.
func (*HyperProvider) NodeConditions ¶
func (p *HyperProvider) NodeConditions(ctx context.Context) []v1.NodeCondition
NodeConditions returns a list of conditions (Ready, OutOfDisk, etc), for updates to the node status within Kubernetes.
func (*HyperProvider) NodeDaemonEndpoints ¶
func (p *HyperProvider) NodeDaemonEndpoints(ctx context.Context) *v1.NodeDaemonEndpoints
NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status within Kubernetes.
func (*HyperProvider) OperatingSystem ¶
func (p *HyperProvider) OperatingSystem() string
OperatingSystem returns the operating system for this provider. This is a noop to default to Linux for now.