client

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 50 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DockerImageProvider = "docker-image"
	// NOTE: this needs to be consistent with engineDefaultStateDir in internal/mage/engine.go
	DefaultStateDir = "/var/lib/dagger"

	ServicesDNSEnvName    = "_EXPERIMENTAL_DAGGER_SERVICES_DNS"
	DaggerCloudCacheToken = "_EXPERIMENTAL_DAGGER_CACHESERVICE_TOKEN"
)
View Source
const OCIStoreName = "dagger-oci"

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyDirSource

type AnyDirSource struct{}

Local dir imports

func (AnyDirSource) DiffCopy

func (AnyDirSource) Register

func (s AnyDirSource) Register(server *grpc.Server)

func (AnyDirSource) TarStream

type AnyDirTarget

type AnyDirTarget struct{}

Local dir exports

func (AnyDirTarget) DiffCopy

func (AnyDirTarget) DiffCopy(stream filesync.FileSend_DiffCopyServer) (rerr error)

func (AnyDirTarget) Register

func (t AnyDirTarget) Register(server *grpc.Server)

type Client

type Client struct {
	Params

	Recorder *progrock.Recorder
	// contains filtered or unexported fields
}

func Connect

func Connect(ctx context.Context, params Params) (_ *Client, _ context.Context, rerr error)

func (*Client) Close

func (c *Client) Close() (rerr error)

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context, _, _ string) (net.Conn, error)

func (*Client) Do

func (c *Client) Do(
	ctx context.Context,
	query string,
	opName string,
	variables map[string]any,
	data any,
) (rerr error)

func (*Client) ID

func (c *Client) ID() string

func (*Client) NestedDialContext

func (c *Client) NestedDialContext(ctx context.Context, _, _ string) (net.Conn, error)

func (*Client) ServeHTTP

func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Params

type Params struct {
	// The id of the server to connect to, or if blank a new one
	// should be started.
	ServerID string

	// Parent client IDs of this Dagger client.
	//
	// Used by Dagger-in-Dagger so that nested sessions can resolve addresses
	// passed from the parent.
	ParentClientIDs []string

	SecretToken string

	RunnerHost string // host of dagger engine runner serving buildkit apis
	UserAgent  string

	DisableHostRW bool

	JournalFile        string
	ProgrockWriter     progrock.Writer
	EngineNameCallback func(string)
	CloudURLCallback   func(string)
}

type SocketProvider

type SocketProvider struct {
	EnableHostNetworkAccess bool
}

func (SocketProvider) CheckAgent

func (SocketProvider) ForwardAgent

func (p SocketProvider) ForwardAgent(stream sshforward.SSH_ForwardAgentServer) error

func (SocketProvider) Register

func (p SocketProvider) Register(server *grpc.Server)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳