Documentation ¶
Index ¶
- Variables
- func ExecCommend(ctx context.Context, cli Docker, containerID string, command []string) (types.IDResponse, error)
- func GetSandbox(ctx context.Context, cli Docker) *types.Container
- func GetSandboxPorts() (map[nat.Port]struct{}, map[nat.Port][]nat.PortBinding, error)
- func InspectExecResp(ctx context.Context, cli Docker, containerID string) error
- func PullDockerImage(ctx context.Context, cli Docker, image string) error
- func ReadLogs(ctx context.Context, cli Docker, id string) (*bufio.Scanner, error)
- func RemoveSandbox(ctx context.Context, cli Docker, reader io.Reader) error
- func StartContainer(ctx context.Context, cli Docker, volumes []mount.Mount, ...) (string, error)
- func WaitForSandbox(reader *bufio.Scanner, message string) bool
- type Docker
- type FlyteDocker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Kubeconfig = f.FilePathJoin(f.UserHomeDir(), ".flyte", "k3s", "k3s.yaml") SuccessMessage = "Deploying Flyte..." ImageName = "cr.flyte.org/flyteorg/flyte-sandbox:dind" FlyteSandboxClusterName = "flyte-sandbox" Environment = []string{"SANDBOX=1", "KUBERNETES_API_PORT=30086", "FLYTE_HOST=localhost:30081", "FLYTE_AWS_ENDPOINT=http://localhost:30084"} Source = "/root" K3sDir = "/etc/rancher/" Client Docker Volumes = []mount.Mount{ { Type: mount.TypeBind, Source: f.FilePathJoin(f.UserHomeDir(), ".flyte"), Target: K3sDir, }, } ExecConfig = types.ExecConfig{ AttachStderr: true, Tty: true, WorkingDir: Source, AttachStdout: true, Cmd: []string{}, } StdWriterPrefixLen = 8 StartingBufLen = 32*1024 + StdWriterPrefixLen + 1 )
Functions ¶
func ExecCommend ¶ added in v0.1.29
func ExecCommend(ctx context.Context, cli Docker, containerID string, command []string) (types.IDResponse, error)
ExecCommend will execute a command in container and returns an execution id
func GetSandbox ¶
GetSandbox will return sandbox container if it exist
func GetSandboxPorts ¶
GetSandboxPorts will return sandbox ports
func InspectExecResp ¶ added in v0.1.29
func PullDockerImage ¶
PullDockerImage will Pull docker image
func RemoveSandbox ¶
RemoveSandbox will remove sandbox container if exist
Types ¶
type Docker ¶
type Docker interface { ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) }
func GetDockerClient ¶
GetDockerClient will returns the docker client
type FlyteDocker ¶
Click to show internal directories.
Click to hide internal directories.