tools

package
v0.0.100 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxInvocationDuration = 1 * time.Minute
)

Variables

View Source
var InvocationCanUseBuildkit = false
View Source
var LowLevelToolsProtocolVersion = 2
View Source
var MakeAlternativeRuntime func(cfg.Configuration) Runtime

Functions

func CanConsumePublicImages

func CanConsumePublicImages(conf cfg.Configuration) bool

func HostPlatform

func HostPlatform(ctx context.Context, conf cfg.Configuration) (specs.Platform, error)

func Run

func RunWithOpts

func RunWithOpts(ctx context.Context, conf cfg.Configuration, opts rtypes.RunToolOpts, onStart func()) error

Types

type LowLevelInvokeOptions

type LowLevelInvokeOptions[Req, Resp proto.Message] struct {
	RedactRequest  func(proto.Message) proto.Message
	RedactResponse func(proto.Message) proto.Message
}

func (LowLevelInvokeOptions[Req, Resp]) Invoke

func (oo LowLevelInvokeOptions[Req, Resp]) Invoke(ctx context.Context, conf cfg.Configuration, pkg schema.PackageName, opts rtypes.RunToolOpts, req Req, resolve ResolveMethodFunc[Req, Resp]) (Resp, error)

func (LowLevelInvokeOptions[Req, Resp]) InvokeOnBuildkit

func (oo LowLevelInvokeOptions[Req, Resp]) InvokeOnBuildkit(ctx context.Context, conf cfg.Configuration, method string, pkg schema.PackageName, imageID oci.ImageID, opts rtypes.RunToolOpts, req Req) (Resp, error)

type ResolveMethodFunc

type ResolveMethodFunc[Req, Resp proto.Message] func(*grpc.ClientConn) func(context.Context, Req, ...grpc.CallOption) (Resp, error)

type Runtime

type Runtime interface {
	RunWithOpts(context.Context, rtypes.RunToolOpts, func()) error
	HostPlatform(context.Context) (specs.Platform, error)
	CanConsumePublicImages() bool // Whether this runtime implementation can use an ImageID directly if one is available.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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