machine

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Machine

type Machine struct {
	BuildID  string
	Token    string
	Platform string

	Addr       string
	ServerName string
	CACert     string
	Cert       string
	Key        string
	// contains filtered or unexported fields
}

func Acquire

func Acquire(ctx context.Context, buildID, token, platform string) (*Machine, error)

Platform can be "amd64" or "arm64". This reports health continually to the Depot API and waits for the buildkit machine to be ready. This can be canceled by canceling the context.

func (*Machine) CheckReady

func (m *Machine) CheckReady(ctx context.Context) (*client.Client, error)

func (*Machine) Client

func (m *Machine) Client(ctx context.Context) (*client.Client, error)

func (*Machine) Connect

func (m *Machine) Connect(ctx context.Context) (*client.Client, error)

Connect waits until the buildkitd is ready to accept connections. It tries to connect to the buildkitd every one second until it succeeds or the context is canceled.

func (*Machine) Release

func (m *Machine) Release() error

func (*Machine) ReportHealth

func (m *Machine) ReportHealth() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL