client

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 49 Imported by: 2

Documentation

Index

Constants

View Source
const InstrumentationLibrary = "dagger.io/engine.client"

Variables

This section is empty.

Functions

func Tracer added in v0.11.0

func Tracer() trace.Tracer

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
	// 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) Dagger added in v0.8.8

func (c *Client) Dagger() *dagger.Client

A client to the Dagger API hooked up directly with this engine client.

func (*Client) DialContext

func (c *Client) DialContext(ctx context.Context, _, _ string) (conn net.Conn, err 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) ServeHTTP

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

type DirectConn added in v0.8.8

type DirectConn func(*http.Request) (*http.Response, error)

func EngineConn added in v0.8.8

func EngineConn(engineClient *Client) DirectConn

func (DirectConn) Close added in v0.8.8

func (f DirectConn) Close() error

func (DirectConn) Do added in v0.8.8

func (f DirectConn) Do(r *http.Request) (*http.Response, error)

func (DirectConn) Host added in v0.8.8

func (f DirectConn) Host() string

type Params

type Params struct {
	// The id to connect to the API server with. If blank, will be set to a
	// new random value.
	ID string

	// The id of the server to connect to, or if blank a new one should be started.
	// Needed separately from the client ID as that ID is a digest which could
	// be reused across multiple servers.
	ServerID string

	SecretToken string

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

	DisableHostRW bool

	EngineNameCallback func(string)
	CloudURLCallback   func(string)
	EngineTrace        sdktrace.SpanExporter
	EngineLogs         sdklog.LogExporter
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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