diff --git a/commands/build.go b/commands/build.go index 0a209cfd..107e0b61 100644 --- a/commands/build.go +++ b/commands/build.go @@ -104,12 +104,10 @@ type buildOptions struct { exportPush bool exportLoad bool - control.ControlOptions - invokeConfig *invokeConfig } -func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error) { +func (o *buildOptions) toControllerOptions() (*cbuild.Options, error) { var err error buildArgs, err := listToMap(o.buildArgs, true) @@ -122,7 +120,7 @@ func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error return nil, err } - opts := controllerapi.BuildOptions{ + opts := cbuild.Options{ Allow: o.allow, Annotations: o.annotations, BuildArgs: buildArgs, @@ -420,7 +418,7 @@ func getImageID(resp map[string]string) string { return dgst } -func runBasicBuild(ctx context.Context, dockerCli command.Cli, opts *controllerapi.BuildOptions, printer *progress.Printer) (*client.SolveResponse, *build.Inputs, error) { +func runBasicBuild(ctx context.Context, dockerCli command.Cli, opts *cbuild.Options, printer *progress.Printer) (*client.SolveResponse, *build.Inputs, error) { resp, res, dfmap, err := cbuild.RunBuild(ctx, dockerCli, opts, dockerCli.In(), printer, false) if res != nil { res.Done() @@ -428,15 +426,12 @@ func runBasicBuild(ctx context.Context, dockerCli command.Cli, opts *controllera return resp, dfmap, err } -func runControllerBuild(ctx context.Context, dockerCli command.Cli, opts *controllerapi.BuildOptions, options buildOptions, printer *progress.Printer) (*client.SolveResponse, *build.Inputs, error) { +func runControllerBuild(ctx context.Context, dockerCli command.Cli, opts *cbuild.Options, options buildOptions, printer *progress.Printer) (*client.SolveResponse, *build.Inputs, error) { if options.invokeConfig != nil && (options.dockerfileName == "-" || options.contextPath == "-") { // stdin must be usable for monitor return nil, nil, errors.Errorf("Dockerfile or context from stdin is not supported with invoke") } - c, err := controller.NewController(ctx, options.ControlOptions, dockerCli, printer) - if err != nil { - return nil, nil, err - } + c := controller.NewController(ctx, dockerCli) defer func() { if err := c.Close(); err != nil { logrus.Warnf("failed to close server connection %v", err) @@ -445,7 +440,7 @@ func runControllerBuild(ctx context.Context, dockerCli command.Cli, opts *contro // NOTE: buildx server has the current working directory different from the client // so we need to resolve paths to abosolute ones in the client. - opts, err = controllerapi.ResolveOptionPaths(opts) + opts, err := cbuild.ResolveOptionPaths(opts) if err != nil { return nil, nil, err } @@ -471,7 +466,7 @@ func runControllerBuild(ctx context.Context, dockerCli command.Cli, opts *contro }) } - ref, resp, inputs, err = c.Build(ctx, opts, pr, printer) + resp, inputs, err = c.Build(ctx, opts, pr, printer) if err != nil { var be *controllererrors.BuildError if errors.As(err, &be) { @@ -515,8 +510,8 @@ func runControllerBuild(ctx context.Context, dockerCli command.Cli, opts *contro resp, retErr = monitorBuildResult.Resp, monitorBuildResult.Err } } else { - if err := c.Disconnect(ctx, ref); err != nil { - logrus.Warnf("disconnect error: %v", err) + if err := c.Close(); err != nil { + logrus.Warnf("close error: %v", err) } } @@ -653,14 +648,6 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions, debugConfig *debug.D flags.StringVar(&options.sbom, "sbom", "", `Shorthand for "--attest=type=sbom"`) flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--attest=type=provenance"`) - if confutil.IsExperimental() { - // TODO: move this to debug command if needed - flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect") - flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux)") - flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)") - cobrautil.MarkFlagsExperimental(flags, "root", "detach", "server-config") - } - flags.StringVar(&options.callFunc, "call", "build", `Set method for evaluating build ("check", "outline", "targets")`) flags.VarPF(callAlias(&options.callFunc, "check"), "check", "", `Shorthand for "--call=check"`) flags.Lookup("check").NoOptDefVal = "true" @@ -1017,12 +1004,12 @@ func (cfg *invokeConfig) needsDebug(retErr error) bool { } } -func (cfg *invokeConfig) runDebug(ctx context.Context, ref string, options *controllerapi.BuildOptions, c control.BuildxController, stdin io.ReadCloser, stdout io.WriteCloser, stderr console.File, progress *progress.Printer) (*monitor.MonitorBuildResult, error) { +func (cfg *invokeConfig) runDebug(ctx context.Context, ref string, options *cbuild.Options, c control.BuildxController, stdin io.ReadCloser, stdout io.WriteCloser, stderr console.File, progress *progress.Printer) (*monitor.MonitorBuildResult, error) { con := console.Current() if err := con.SetRaw(); err != nil { // TODO: run disconnect in build command (on error case) - if err := c.Disconnect(ctx, ref); err != nil { - logrus.Warnf("disconnect error: %v", err) + if err := c.Close(); err != nil { + logrus.Warnf("close error: %v", err) } return nil, errors.Errorf("failed to configure terminal: %v", err) } diff --git a/commands/debug/root.go b/commands/debug/root.go index bf68de0d..f63bde3a 100644 --- a/commands/debug/root.go +++ b/commands/debug/root.go @@ -3,11 +3,9 @@ package debug import ( "context" "os" - "runtime" "github.com/containerd/console" "github.com/docker/buildx/controller" - "github.com/docker/buildx/controller/control" controllerapi "github.com/docker/buildx/controller/pb" "github.com/docker/buildx/monitor" "github.com/docker/buildx/util/cobrautil" @@ -35,7 +33,6 @@ type DebuggableCmd interface { } func RootCmd(dockerCli command.Cli, children ...DebuggableCmd) *cobra.Command { - var controlOptions control.ControlOptions var progressMode string var options DebugConfig @@ -50,10 +47,7 @@ func RootCmd(dockerCli command.Cli, children ...DebuggableCmd) *cobra.Command { } ctx := context.TODO() - c, err := controller.NewController(ctx, controlOptions, dockerCli, printer) - if err != nil { - return err - } + c := controller.NewController(ctx, dockerCli) defer func() { if err := c.Close(); err != nil { logrus.Warnf("failed to close server connection %v", err) @@ -76,13 +70,9 @@ func RootCmd(dockerCli command.Cli, children ...DebuggableCmd) *cobra.Command { flags := cmd.Flags() flags.StringVar(&options.InvokeFlag, "invoke", "", "Launch a monitor with executing specified command") flags.StringVar(&options.OnFlag, "on", "error", "When to launch the monitor ([always, error])") - - flags.StringVar(&controlOptions.Root, "root", "", "Specify root directory of server to connect for the monitor") - flags.BoolVar(&controlOptions.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server for the monitor (supported only on linux)") - flags.StringVar(&controlOptions.ServerConfig, "server-config", "", "Specify buildx server config file for the monitor (used only when launching new server)") flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty", "rawjson") for the monitor. Use plain to show container output`) - cobrautil.MarkFlagsExperimental(flags, "invoke", "on", "root", "detach", "server-config") + cobrautil.MarkFlagsExperimental(flags, "invoke", "on") for _, c := range children { cmd.AddCommand(c.NewDebugger(&options)) diff --git a/commands/root.go b/commands/root.go index e71867c4..d42eb44b 100644 --- a/commands/root.go +++ b/commands/root.go @@ -7,7 +7,6 @@ import ( debugcmd "github.com/docker/buildx/commands/debug" historycmd "github.com/docker/buildx/commands/history" imagetoolscmd "github.com/docker/buildx/commands/imagetools" - "github.com/docker/buildx/controller/remote" "github.com/docker/buildx/util/cobrautil/completion" "github.com/docker/buildx/util/confutil" "github.com/docker/buildx/util/logutil" @@ -124,7 +123,6 @@ func addCommands(cmd *cobra.Command, opts *rootOptions, dockerCli command.Cli) { cmd.AddCommand(debugcmd.RootCmd(dockerCli, newDebuggableBuild(dockerCli, opts), )) - remote.AddControllerCommands(cmd, dockerCli) } cmd.RegisterFlagCompletionFunc( //nolint:errcheck diff --git a/controller/build/build.go b/controller/build/build.go index bcf8eb02..4eebaabf 100644 --- a/controller/build/build.go +++ b/controller/build/build.go @@ -34,7 +34,7 @@ const defaultTargetName = "default" // NOTE: When an error happens during the build and this function acquires the debuggable *build.ResultHandle, // this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can // inspect the result and debug the cause of that error. -func RunBuild(ctx context.Context, dockerCli command.Cli, in *controllerapi.BuildOptions, inStream io.Reader, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, *build.Inputs, error) { +func RunBuild(ctx context.Context, dockerCli command.Cli, in *Options, inStream io.Reader, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, *build.Inputs, error) { if in.NoCache && len(in.NoCacheFilter) > 0 { return nil, nil, nil, errors.Errorf("--no-cache and --no-cache-filter cannot currently be used together") } diff --git a/controller/pb/path.go b/controller/build/options.go similarity index 71% rename from controller/pb/path.go rename to controller/build/options.go index b793a2de..dba752b9 100644 --- a/controller/pb/path.go +++ b/controller/build/options.go @@ -1,15 +1,52 @@ -package pb +package build import ( "path/filepath" "strings" + "github.com/docker/buildx/controller/pb" + sourcepolicy "github.com/moby/buildkit/sourcepolicy/pb" "github.com/moby/buildkit/util/gitutil" ) +type Options struct { + ContextPath string + DockerfileName string + CallFunc *pb.CallFunc + NamedContexts map[string]string + Allow []string + Attests []*pb.Attest + BuildArgs map[string]string + CacheFrom []*pb.CacheOptionsEntry + CacheTo []*pb.CacheOptionsEntry + CgroupParent string + Exports []*pb.ExportEntry + ExtraHosts []string + Labels map[string]string + NetworkMode string + NoCacheFilter []string + Platforms []string + Secrets []*pb.Secret + ShmSize int64 + SSH []*pb.SSH + Tags []string + Target string + Ulimits *pb.UlimitOpt + Builder string + NoCache bool + Pull bool + ExportPush bool + ExportLoad bool + SourcePolicy *sourcepolicy.Policy + Ref string + GroupRef string + Annotations []string + ProvenanceResponseMode string +} + // ResolveOptionPaths resolves all paths contained in BuildOptions // and replaces them to absolute paths. -func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { +func ResolveOptionPaths(options *Options) (_ *Options, err error) { localContext := false if options.ContextPath != "" && options.ContextPath != "-" { if !isRemoteURL(options.ContextPath) { @@ -56,7 +93,7 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { } options.NamedContexts = contexts - var cacheFrom []*CacheOptionsEntry + var cacheFrom []*pb.CacheOptionsEntry for _, co := range options.CacheFrom { switch co.Type { case "local": @@ -87,7 +124,7 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { } options.CacheFrom = cacheFrom - var cacheTo []*CacheOptionsEntry + var cacheTo []*pb.CacheOptionsEntry for _, co := range options.CacheTo { switch co.Type { case "local": @@ -117,7 +154,7 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { } } options.CacheTo = cacheTo - var exports []*ExportEntry + var exports []*pb.ExportEntry for _, e := range options.Exports { if e.Destination != "" && e.Destination != "-" { e.Destination, err = filepath.Abs(e.Destination) @@ -129,7 +166,7 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { } options.Exports = exports - var secrets []*Secret + var secrets []*pb.Secret for _, s := range options.Secrets { if s.FilePath != "" { s.FilePath, err = filepath.Abs(s.FilePath) @@ -141,7 +178,7 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { } options.Secrets = secrets - var ssh []*SSH + var ssh []*pb.SSH for _, s := range options.SSH { var ps []string for _, pt := range s.Paths { diff --git a/controller/pb/path_test.go b/controller/build/options_test.go similarity index 67% rename from controller/pb/path_test.go rename to controller/build/options_test.go index cc969f33..548351d0 100644 --- a/controller/pb/path_test.go +++ b/controller/build/options_test.go @@ -1,12 +1,12 @@ -package pb +package build import ( "os" "path/filepath" "testing" + "github.com/docker/buildx/controller/pb" "github.com/stretchr/testify/require" - "google.golang.org/protobuf/proto" ) func TestResolvePaths(t *testing.T) { @@ -16,59 +16,59 @@ func TestResolvePaths(t *testing.T) { require.NoError(t, os.Chdir(tmpwd)) tests := []struct { name string - options *BuildOptions - want *BuildOptions + options *Options + want *Options }{ { name: "contextpath", - options: &BuildOptions{ContextPath: "test"}, - want: &BuildOptions{ContextPath: filepath.Join(tmpwd, "test")}, + options: &Options{ContextPath: "test"}, + want: &Options{ContextPath: filepath.Join(tmpwd, "test")}, }, { name: "contextpath-cwd", - options: &BuildOptions{ContextPath: "."}, - want: &BuildOptions{ContextPath: tmpwd}, + options: &Options{ContextPath: "."}, + want: &Options{ContextPath: tmpwd}, }, { name: "contextpath-dash", - options: &BuildOptions{ContextPath: "-"}, - want: &BuildOptions{ContextPath: "-"}, + options: &Options{ContextPath: "-"}, + want: &Options{ContextPath: "-"}, }, { name: "contextpath-ssh", - options: &BuildOptions{ContextPath: "git@github.com:docker/buildx.git"}, - want: &BuildOptions{ContextPath: "git@github.com:docker/buildx.git"}, + options: &Options{ContextPath: "git@github.com:docker/buildx.git"}, + want: &Options{ContextPath: "git@github.com:docker/buildx.git"}, }, { name: "dockerfilename", - options: &BuildOptions{DockerfileName: "test", ContextPath: "."}, - want: &BuildOptions{DockerfileName: filepath.Join(tmpwd, "test"), ContextPath: tmpwd}, + options: &Options{DockerfileName: "test", ContextPath: "."}, + want: &Options{DockerfileName: filepath.Join(tmpwd, "test"), ContextPath: tmpwd}, }, { name: "dockerfilename-dash", - options: &BuildOptions{DockerfileName: "-", ContextPath: "."}, - want: &BuildOptions{DockerfileName: "-", ContextPath: tmpwd}, + options: &Options{DockerfileName: "-", ContextPath: "."}, + want: &Options{DockerfileName: "-", ContextPath: tmpwd}, }, { name: "dockerfilename-remote", - options: &BuildOptions{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, - want: &BuildOptions{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, + options: &Options{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, + want: &Options{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, }, { name: "contexts", - options: &BuildOptions{NamedContexts: map[string]string{ + options: &Options{NamedContexts: map[string]string{ "a": "test1", "b": "test2", "alpine": "docker-image://alpine@sha256:0123456789", "project": "https://github.com/myuser/project.git", }}, - want: &BuildOptions{NamedContexts: map[string]string{ + want: &Options{NamedContexts: map[string]string{ "a": filepath.Join(tmpwd, "test1"), "b": filepath.Join(tmpwd, "test2"), "alpine": "docker-image://alpine@sha256:0123456789", "project": "https://github.com/myuser/project.git", }}, }, { name: "cache-from", - options: &BuildOptions{ - CacheFrom: []*CacheOptionsEntry{ + options: &Options{ + CacheFrom: []*pb.CacheOptionsEntry{ { Type: "local", Attrs: map[string]string{"src": "test"}, @@ -79,8 +79,8 @@ func TestResolvePaths(t *testing.T) { }, }, }, - want: &BuildOptions{ - CacheFrom: []*CacheOptionsEntry{ + want: &Options{ + CacheFrom: []*pb.CacheOptionsEntry{ { Type: "local", Attrs: map[string]string{"src": filepath.Join(tmpwd, "test")}, @@ -94,8 +94,8 @@ func TestResolvePaths(t *testing.T) { }, { name: "cache-to", - options: &BuildOptions{ - CacheTo: []*CacheOptionsEntry{ + options: &Options{ + CacheTo: []*pb.CacheOptionsEntry{ { Type: "local", Attrs: map[string]string{"dest": "test"}, @@ -106,8 +106,8 @@ func TestResolvePaths(t *testing.T) { }, }, }, - want: &BuildOptions{ - CacheTo: []*CacheOptionsEntry{ + want: &Options{ + CacheTo: []*pb.CacheOptionsEntry{ { Type: "local", Attrs: map[string]string{"dest": filepath.Join(tmpwd, "test")}, @@ -121,8 +121,8 @@ func TestResolvePaths(t *testing.T) { }, { name: "exports", - options: &BuildOptions{ - Exports: []*ExportEntry{ + options: &Options{ + Exports: []*pb.ExportEntry{ { Type: "local", Destination: "-", @@ -149,8 +149,8 @@ func TestResolvePaths(t *testing.T) { }, }, }, - want: &BuildOptions{ - Exports: []*ExportEntry{ + want: &Options{ + Exports: []*pb.ExportEntry{ { Type: "local", Destination: "-", @@ -180,8 +180,8 @@ func TestResolvePaths(t *testing.T) { }, { name: "secrets", - options: &BuildOptions{ - Secrets: []*Secret{ + options: &Options{ + Secrets: []*pb.Secret{ { FilePath: "test1", }, @@ -195,8 +195,8 @@ func TestResolvePaths(t *testing.T) { }, }, }, - want: &BuildOptions{ - Secrets: []*Secret{ + want: &Options{ + Secrets: []*pb.Secret{ { FilePath: filepath.Join(tmpwd, "test1"), }, @@ -213,8 +213,8 @@ func TestResolvePaths(t *testing.T) { }, { name: "ssh", - options: &BuildOptions{ - SSH: []*SSH{ + options: &Options{ + SSH: []*pb.SSH{ { ID: "default", Paths: []string{"test1", "test2"}, @@ -225,8 +225,8 @@ func TestResolvePaths(t *testing.T) { }, }, }, - want: &BuildOptions{ - SSH: []*SSH{ + want: &Options{ + SSH: []*pb.SSH{ { ID: "default", Paths: []string{filepath.Join(tmpwd, "test1"), filepath.Join(tmpwd, "test2")}, @@ -244,9 +244,7 @@ func TestResolvePaths(t *testing.T) { t.Run(tt.name, func(t *testing.T) { got, err := ResolveOptionPaths(tt.options) require.NoError(t, err) - if !proto.Equal(tt.want, got) { - t.Fatalf("expected %#v, got %#v", tt.want, got) - } + require.Equal(t, tt.want, got) }) } } diff --git a/controller/control/controller.go b/controller/control/controller.go index c0eb805e..cc501e9b 100644 --- a/controller/control/controller.go +++ b/controller/control/controller.go @@ -5,29 +5,22 @@ import ( "io" "github.com/docker/buildx/build" + cbuild "github.com/docker/buildx/controller/build" controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/controller/processes" "github.com/docker/buildx/util/progress" "github.com/moby/buildkit/client" ) type BuildxController interface { - Build(ctx context.Context, options *controllerapi.BuildOptions, in io.ReadCloser, progress progress.Writer) (ref string, resp *client.SolveResponse, inputs *build.Inputs, err error) + Build(ctx context.Context, options *cbuild.Options, in io.ReadCloser, progress progress.Writer) (resp *client.SolveResponse, inputs *build.Inputs, err error) // Invoke starts an IO session into the specified process. // If pid doesn't match to any running processes, it starts a new process with the specified config. // If there is no container running or InvokeConfig.Rollback is specified, the process will start in a newly created container. // NOTE: If needed, in the future, we can split this API into three APIs (NewContainer, NewProcess and Attach). - Invoke(ctx context.Context, ref, pid string, options *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error - Kill(ctx context.Context) error + Invoke(ctx context.Context, pid string, options *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error Close() error - List(ctx context.Context) (refs []string, _ error) - Disconnect(ctx context.Context, ref string) error - ListProcesses(ctx context.Context, ref string) (infos []*controllerapi.ProcessInfo, retErr error) - DisconnectProcess(ctx context.Context, ref, pid string) error - Inspect(ctx context.Context, ref string) (*controllerapi.InspectResponse, error) -} - -type ControlOptions struct { - ServerConfig string - Root string - Detach bool + ListProcesses(ctx context.Context) (infos []*processes.ProcessInfo, retErr error) + DisconnectProcess(ctx context.Context, pid string) error + Inspect(ctx context.Context) *cbuild.Options } diff --git a/controller/controller.go b/controller/controller.go index 635a7a23..dfa0f47d 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -2,35 +2,12 @@ package controller import ( "context" - "fmt" "github.com/docker/buildx/controller/control" "github.com/docker/buildx/controller/local" - "github.com/docker/buildx/controller/remote" - "github.com/docker/buildx/util/progress" "github.com/docker/cli/cli/command" - "github.com/pkg/errors" ) -func NewController(ctx context.Context, opts control.ControlOptions, dockerCli command.Cli, pw progress.Writer) (control.BuildxController, error) { - var name string - if opts.Detach { - name = "remote" - } else { - name = "local" - } - - var c control.BuildxController - err := progress.Wrap(fmt.Sprintf("[internal] connecting to %s controller", name), pw.Write, func(l progress.SubLogger) (err error) { - if opts.Detach { - c, err = remote.NewRemoteBuildxController(ctx, dockerCli, opts, l) - } else { - c = local.NewLocalBuildxController(ctx, dockerCli, l) - } - return err - }) - if err != nil { - return nil, errors.Wrap(err, "failed to start buildx controller") - } - return c, nil +func NewController(ctx context.Context, dockerCli command.Cli) control.BuildxController { + return local.NewLocalBuildxController(ctx, dockerCli) } diff --git a/controller/errdefs/errdefs.pb.go b/controller/errdefs/errdefs.pb.go index e6daad70..353c7827 100644 --- a/controller/errdefs/errdefs.pb.go +++ b/controller/errdefs/errdefs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.1 +// protoc-gen-go v1.35.2 // protoc v3.11.4 // source: github.com/docker/buildx/controller/errdefs/errdefs.proto @@ -31,11 +31,9 @@ type Build struct { func (x *Build) Reset() { *x = Build{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_errdefs_errdefs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_github_com_docker_buildx_controller_errdefs_errdefs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Build) String() string { @@ -46,7 +44,7 @@ func (*Build) ProtoMessage() {} func (x *Build) ProtoReflect() protoreflect.Message { mi := &file_github_com_docker_buildx_controller_errdefs_errdefs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106,7 +104,7 @@ func file_github_com_docker_buildx_controller_errdefs_errdefs_proto_rawDescGZIP( } var file_github_com_docker_buildx_controller_errdefs_errdefs_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_github_com_docker_buildx_controller_errdefs_errdefs_proto_goTypes = []interface{}{ +var file_github_com_docker_buildx_controller_errdefs_errdefs_proto_goTypes = []any{ (*Build)(nil), // 0: docker.buildx.errdefs.Build } var file_github_com_docker_buildx_controller_errdefs_errdefs_proto_depIdxs = []int32{ @@ -122,20 +120,6 @@ func file_github_com_docker_buildx_controller_errdefs_errdefs_proto_init() { if File_github_com_docker_buildx_controller_errdefs_errdefs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_github_com_docker_buildx_controller_errdefs_errdefs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Build); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/controller/local/controller.go b/controller/local/controller.go index 31e0779c..44e85382 100644 --- a/controller/local/controller.go +++ b/controller/local/controller.go @@ -19,10 +19,9 @@ import ( "github.com/pkg/errors" ) -func NewLocalBuildxController(ctx context.Context, dockerCli command.Cli, logger progress.SubLogger) control.BuildxController { +func NewLocalBuildxController(ctx context.Context, dockerCli command.Cli) control.BuildxController { return &localController{ dockerCli: dockerCli, - sessionID: "local", processes: processes.NewManager(), } } @@ -31,21 +30,20 @@ type buildConfig struct { // TODO: these two structs should be merged // Discussion: https://github.com/docker/buildx/pull/1640#discussion_r1113279719 resultCtx *build.ResultHandle - buildOptions *controllerapi.BuildOptions + buildOptions *cbuild.Options } type localController struct { dockerCli command.Cli - sessionID string buildConfig buildConfig processes *processes.Manager buildOnGoing atomic.Bool } -func (b *localController) Build(ctx context.Context, options *controllerapi.BuildOptions, in io.ReadCloser, progress progress.Writer) (string, *client.SolveResponse, *build.Inputs, error) { +func (b *localController) Build(ctx context.Context, options *cbuild.Options, in io.ReadCloser, progress progress.Writer) (*client.SolveResponse, *build.Inputs, error) { if !b.buildOnGoing.CompareAndSwap(false, true) { - return "", nil, nil, errors.New("build ongoing") + return nil, nil, errors.New("build ongoing") } defer b.buildOnGoing.Store(false) @@ -62,26 +60,20 @@ func (b *localController) Build(ctx context.Context, options *controllerapi.Buil if errors.As(buildErr, &ebr) { ref = ebr.Ref } - buildErr = controllererrors.WrapBuild(buildErr, b.sessionID, ref) + buildErr = controllererrors.WrapBuild(buildErr, "", ref) } } if buildErr != nil { - return "", nil, nil, buildErr + return nil, nil, buildErr } - return b.sessionID, resp, dockerfileMappings, nil + return resp, dockerfileMappings, nil } -func (b *localController) ListProcesses(ctx context.Context, sessionID string) (infos []*controllerapi.ProcessInfo, retErr error) { - if sessionID != b.sessionID { - return nil, errors.Errorf("unknown session ID %q", sessionID) - } +func (b *localController) ListProcesses(ctx context.Context) (infos []*processes.ProcessInfo, retErr error) { return b.processes.ListProcesses(), nil } -func (b *localController) DisconnectProcess(ctx context.Context, sessionID, pid string) error { - if sessionID != b.sessionID { - return errors.Errorf("unknown session ID %q", sessionID) - } +func (b *localController) DisconnectProcess(ctx context.Context, pid string) error { return b.processes.DeleteProcess(pid) } @@ -89,11 +81,7 @@ func (b *localController) cancelRunningProcesses() { b.processes.CancelRunningProcesses() } -func (b *localController) Invoke(ctx context.Context, sessionID string, pid string, cfg *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error { - if sessionID != b.sessionID { - return errors.Errorf("unknown session ID %q", sessionID) - } - +func (b *localController) Invoke(ctx context.Context, pid string, cfg *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error { proc, ok := b.processes.Get(pid) if !ok { // Start a new process. @@ -121,11 +109,6 @@ func (b *localController) Invoke(ctx context.Context, sessionID string, pid stri } } -func (b *localController) Kill(context.Context) error { - b.Close() - return nil -} - func (b *localController) Close() error { b.cancelRunningProcesses() if b.buildConfig.resultCtx != nil { @@ -135,18 +118,6 @@ func (b *localController) Close() error { return nil } -func (b *localController) List(ctx context.Context) (res []string, _ error) { - return []string{b.sessionID}, nil -} - -func (b *localController) Disconnect(ctx context.Context, key string) error { - b.Close() - return nil -} - -func (b *localController) Inspect(ctx context.Context, sessionID string) (*controllerapi.InspectResponse, error) { - if sessionID != b.sessionID { - return nil, errors.Errorf("unknown session ID %q", sessionID) - } - return &controllerapi.InspectResponse{Options: b.buildConfig.buildOptions}, nil +func (b *localController) Inspect(ctx context.Context) *cbuild.Options { + return b.buildConfig.buildOptions } diff --git a/controller/pb/attest.go b/controller/pb/attest.go index 06a7c945..2c602884 100644 --- a/controller/pb/attest.go +++ b/controller/pb/attest.go @@ -1,5 +1,11 @@ package pb +type Attest struct { + Type string + Disabled bool + Attrs string +} + func CreateAttestations(attests []*Attest) map[string]*string { result := map[string]*string{} for _, attest := range attests { diff --git a/controller/pb/cache.go b/controller/pb/cache.go index f363a419..87adf4fe 100644 --- a/controller/pb/cache.go +++ b/controller/pb/cache.go @@ -6,6 +6,11 @@ import ( "github.com/moby/buildkit/client" ) +type CacheOptionsEntry struct { + Type string + Attrs map[string]string +} + func CreateCaches(entries []*CacheOptionsEntry) []client.CacheOptionsEntry { var outs []client.CacheOptionsEntry if len(entries) == 0 { diff --git a/controller/pb/controller.pb.go b/controller/pb/controller.pb.go deleted file mode 100644 index 95913c07..00000000 --- a/controller/pb/controller.pb.go +++ /dev/null @@ -1,3365 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.1 -// protoc v3.11.4 -// source: github.com/docker/buildx/controller/pb/controller.proto - -package pb - -import ( - control "github.com/moby/buildkit/api/services/control" - pb "github.com/moby/buildkit/sourcepolicy/pb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ListProcessesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *ListProcessesRequest) Reset() { - *x = ListProcessesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListProcessesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProcessesRequest) ProtoMessage() {} - -func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProcessesRequest.ProtoReflect.Descriptor instead. -func (*ListProcessesRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{0} -} - -func (x *ListProcessesRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type ListProcessesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Infos []*ProcessInfo `protobuf:"bytes,1,rep,name=Infos,proto3" json:"Infos,omitempty"` -} - -func (x *ListProcessesResponse) Reset() { - *x = ListProcessesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListProcessesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListProcessesResponse) ProtoMessage() {} - -func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListProcessesResponse.ProtoReflect.Descriptor instead. -func (*ListProcessesResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{1} -} - -func (x *ListProcessesResponse) GetInfos() []*ProcessInfo { - if x != nil { - return x.Infos - } - return nil -} - -type ProcessInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProcessID string `protobuf:"bytes,1,opt,name=ProcessID,proto3" json:"ProcessID,omitempty"` - InvokeConfig *InvokeConfig `protobuf:"bytes,2,opt,name=InvokeConfig,proto3" json:"InvokeConfig,omitempty"` -} - -func (x *ProcessInfo) Reset() { - *x = ProcessInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProcessInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProcessInfo) ProtoMessage() {} - -func (x *ProcessInfo) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead. -func (*ProcessInfo) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{2} -} - -func (x *ProcessInfo) GetProcessID() string { - if x != nil { - return x.ProcessID - } - return "" -} - -func (x *ProcessInfo) GetInvokeConfig() *InvokeConfig { - if x != nil { - return x.InvokeConfig - } - return nil -} - -type DisconnectProcessRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` - ProcessID string `protobuf:"bytes,2,opt,name=ProcessID,proto3" json:"ProcessID,omitempty"` -} - -func (x *DisconnectProcessRequest) Reset() { - *x = DisconnectProcessRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisconnectProcessRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisconnectProcessRequest) ProtoMessage() {} - -func (x *DisconnectProcessRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisconnectProcessRequest.ProtoReflect.Descriptor instead. -func (*DisconnectProcessRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{3} -} - -func (x *DisconnectProcessRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *DisconnectProcessRequest) GetProcessID() string { - if x != nil { - return x.ProcessID - } - return "" -} - -type DisconnectProcessResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DisconnectProcessResponse) Reset() { - *x = DisconnectProcessResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisconnectProcessResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisconnectProcessResponse) ProtoMessage() {} - -func (x *DisconnectProcessResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisconnectProcessResponse.ProtoReflect.Descriptor instead. -func (*DisconnectProcessResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{4} -} - -type BuildRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` - Options *BuildOptions `protobuf:"bytes,2,opt,name=Options,proto3" json:"Options,omitempty"` -} - -func (x *BuildRequest) Reset() { - *x = BuildRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildRequest) ProtoMessage() {} - -func (x *BuildRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildRequest.ProtoReflect.Descriptor instead. -func (*BuildRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{5} -} - -func (x *BuildRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *BuildRequest) GetOptions() *BuildOptions { - if x != nil { - return x.Options - } - return nil -} - -type BuildOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ContextPath string `protobuf:"bytes,1,opt,name=ContextPath,proto3" json:"ContextPath,omitempty"` - DockerfileName string `protobuf:"bytes,2,opt,name=DockerfileName,proto3" json:"DockerfileName,omitempty"` - CallFunc *CallFunc `protobuf:"bytes,3,opt,name=CallFunc,proto3" json:"CallFunc,omitempty"` - NamedContexts map[string]string `protobuf:"bytes,4,rep,name=NamedContexts,proto3" json:"NamedContexts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Allow []string `protobuf:"bytes,5,rep,name=Allow,proto3" json:"Allow,omitempty"` - Attests []*Attest `protobuf:"bytes,6,rep,name=Attests,proto3" json:"Attests,omitempty"` - BuildArgs map[string]string `protobuf:"bytes,7,rep,name=BuildArgs,proto3" json:"BuildArgs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - CacheFrom []*CacheOptionsEntry `protobuf:"bytes,8,rep,name=CacheFrom,proto3" json:"CacheFrom,omitempty"` - CacheTo []*CacheOptionsEntry `protobuf:"bytes,9,rep,name=CacheTo,proto3" json:"CacheTo,omitempty"` - CgroupParent string `protobuf:"bytes,10,opt,name=CgroupParent,proto3" json:"CgroupParent,omitempty"` - Exports []*ExportEntry `protobuf:"bytes,11,rep,name=Exports,proto3" json:"Exports,omitempty"` - ExtraHosts []string `protobuf:"bytes,12,rep,name=ExtraHosts,proto3" json:"ExtraHosts,omitempty"` - Labels map[string]string `protobuf:"bytes,13,rep,name=Labels,proto3" json:"Labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - NetworkMode string `protobuf:"bytes,14,opt,name=NetworkMode,proto3" json:"NetworkMode,omitempty"` - NoCacheFilter []string `protobuf:"bytes,15,rep,name=NoCacheFilter,proto3" json:"NoCacheFilter,omitempty"` - Platforms []string `protobuf:"bytes,16,rep,name=Platforms,proto3" json:"Platforms,omitempty"` - Secrets []*Secret `protobuf:"bytes,17,rep,name=Secrets,proto3" json:"Secrets,omitempty"` - ShmSize int64 `protobuf:"varint,18,opt,name=ShmSize,proto3" json:"ShmSize,omitempty"` - SSH []*SSH `protobuf:"bytes,19,rep,name=SSH,proto3" json:"SSH,omitempty"` - Tags []string `protobuf:"bytes,20,rep,name=Tags,proto3" json:"Tags,omitempty"` - Target string `protobuf:"bytes,21,opt,name=Target,proto3" json:"Target,omitempty"` - Ulimits *UlimitOpt `protobuf:"bytes,22,opt,name=Ulimits,proto3" json:"Ulimits,omitempty"` - Builder string `protobuf:"bytes,23,opt,name=Builder,proto3" json:"Builder,omitempty"` - NoCache bool `protobuf:"varint,24,opt,name=NoCache,proto3" json:"NoCache,omitempty"` - Pull bool `protobuf:"varint,25,opt,name=Pull,proto3" json:"Pull,omitempty"` - ExportPush bool `protobuf:"varint,26,opt,name=ExportPush,proto3" json:"ExportPush,omitempty"` - ExportLoad bool `protobuf:"varint,27,opt,name=ExportLoad,proto3" json:"ExportLoad,omitempty"` - SourcePolicy *pb.Policy `protobuf:"bytes,28,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"` - Ref string `protobuf:"bytes,29,opt,name=Ref,proto3" json:"Ref,omitempty"` - GroupRef string `protobuf:"bytes,30,opt,name=GroupRef,proto3" json:"GroupRef,omitempty"` - Annotations []string `protobuf:"bytes,31,rep,name=Annotations,proto3" json:"Annotations,omitempty"` - ProvenanceResponseMode string `protobuf:"bytes,32,opt,name=ProvenanceResponseMode,proto3" json:"ProvenanceResponseMode,omitempty"` -} - -func (x *BuildOptions) Reset() { - *x = BuildOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildOptions) ProtoMessage() {} - -func (x *BuildOptions) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildOptions.ProtoReflect.Descriptor instead. -func (*BuildOptions) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{6} -} - -func (x *BuildOptions) GetContextPath() string { - if x != nil { - return x.ContextPath - } - return "" -} - -func (x *BuildOptions) GetDockerfileName() string { - if x != nil { - return x.DockerfileName - } - return "" -} - -func (x *BuildOptions) GetCallFunc() *CallFunc { - if x != nil { - return x.CallFunc - } - return nil -} - -func (x *BuildOptions) GetNamedContexts() map[string]string { - if x != nil { - return x.NamedContexts - } - return nil -} - -func (x *BuildOptions) GetAllow() []string { - if x != nil { - return x.Allow - } - return nil -} - -func (x *BuildOptions) GetAttests() []*Attest { - if x != nil { - return x.Attests - } - return nil -} - -func (x *BuildOptions) GetBuildArgs() map[string]string { - if x != nil { - return x.BuildArgs - } - return nil -} - -func (x *BuildOptions) GetCacheFrom() []*CacheOptionsEntry { - if x != nil { - return x.CacheFrom - } - return nil -} - -func (x *BuildOptions) GetCacheTo() []*CacheOptionsEntry { - if x != nil { - return x.CacheTo - } - return nil -} - -func (x *BuildOptions) GetCgroupParent() string { - if x != nil { - return x.CgroupParent - } - return "" -} - -func (x *BuildOptions) GetExports() []*ExportEntry { - if x != nil { - return x.Exports - } - return nil -} - -func (x *BuildOptions) GetExtraHosts() []string { - if x != nil { - return x.ExtraHosts - } - return nil -} - -func (x *BuildOptions) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -func (x *BuildOptions) GetNetworkMode() string { - if x != nil { - return x.NetworkMode - } - return "" -} - -func (x *BuildOptions) GetNoCacheFilter() []string { - if x != nil { - return x.NoCacheFilter - } - return nil -} - -func (x *BuildOptions) GetPlatforms() []string { - if x != nil { - return x.Platforms - } - return nil -} - -func (x *BuildOptions) GetSecrets() []*Secret { - if x != nil { - return x.Secrets - } - return nil -} - -func (x *BuildOptions) GetShmSize() int64 { - if x != nil { - return x.ShmSize - } - return 0 -} - -func (x *BuildOptions) GetSSH() []*SSH { - if x != nil { - return x.SSH - } - return nil -} - -func (x *BuildOptions) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *BuildOptions) GetTarget() string { - if x != nil { - return x.Target - } - return "" -} - -func (x *BuildOptions) GetUlimits() *UlimitOpt { - if x != nil { - return x.Ulimits - } - return nil -} - -func (x *BuildOptions) GetBuilder() string { - if x != nil { - return x.Builder - } - return "" -} - -func (x *BuildOptions) GetNoCache() bool { - if x != nil { - return x.NoCache - } - return false -} - -func (x *BuildOptions) GetPull() bool { - if x != nil { - return x.Pull - } - return false -} - -func (x *BuildOptions) GetExportPush() bool { - if x != nil { - return x.ExportPush - } - return false -} - -func (x *BuildOptions) GetExportLoad() bool { - if x != nil { - return x.ExportLoad - } - return false -} - -func (x *BuildOptions) GetSourcePolicy() *pb.Policy { - if x != nil { - return x.SourcePolicy - } - return nil -} - -func (x *BuildOptions) GetRef() string { - if x != nil { - return x.Ref - } - return "" -} - -func (x *BuildOptions) GetGroupRef() string { - if x != nil { - return x.GroupRef - } - return "" -} - -func (x *BuildOptions) GetAnnotations() []string { - if x != nil { - return x.Annotations - } - return nil -} - -func (x *BuildOptions) GetProvenanceResponseMode() string { - if x != nil { - return x.ProvenanceResponseMode - } - return "" -} - -type ExportEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` - Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Destination string `protobuf:"bytes,3,opt,name=Destination,proto3" json:"Destination,omitempty"` -} - -func (x *ExportEntry) Reset() { - *x = ExportEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExportEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExportEntry) ProtoMessage() {} - -func (x *ExportEntry) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExportEntry.ProtoReflect.Descriptor instead. -func (*ExportEntry) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{7} -} - -func (x *ExportEntry) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ExportEntry) GetAttrs() map[string]string { - if x != nil { - return x.Attrs - } - return nil -} - -func (x *ExportEntry) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -type CacheOptionsEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` - Attrs map[string]string `protobuf:"bytes,2,rep,name=Attrs,proto3" json:"Attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *CacheOptionsEntry) Reset() { - *x = CacheOptionsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CacheOptionsEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CacheOptionsEntry) ProtoMessage() {} - -func (x *CacheOptionsEntry) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CacheOptionsEntry.ProtoReflect.Descriptor instead. -func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{8} -} - -func (x *CacheOptionsEntry) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *CacheOptionsEntry) GetAttrs() map[string]string { - if x != nil { - return x.Attrs - } - return nil -} - -type Attest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` - Disabled bool `protobuf:"varint,2,opt,name=Disabled,proto3" json:"Disabled,omitempty"` - Attrs string `protobuf:"bytes,3,opt,name=Attrs,proto3" json:"Attrs,omitempty"` -} - -func (x *Attest) Reset() { - *x = Attest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Attest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Attest) ProtoMessage() {} - -func (x *Attest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Attest.ProtoReflect.Descriptor instead. -func (*Attest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{9} -} - -func (x *Attest) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Attest) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -func (x *Attest) GetAttrs() string { - if x != nil { - return x.Attrs - } - return "" -} - -type SSH struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - Paths []string `protobuf:"bytes,2,rep,name=Paths,proto3" json:"Paths,omitempty"` -} - -func (x *SSH) Reset() { - *x = SSH{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SSH) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SSH) ProtoMessage() {} - -func (x *SSH) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SSH.ProtoReflect.Descriptor instead. -func (*SSH) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{10} -} - -func (x *SSH) GetID() string { - if x != nil { - return x.ID - } - return "" -} - -func (x *SSH) GetPaths() []string { - if x != nil { - return x.Paths - } - return nil -} - -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` - FilePath string `protobuf:"bytes,2,opt,name=FilePath,proto3" json:"FilePath,omitempty"` - Env string `protobuf:"bytes,3,opt,name=Env,proto3" json:"Env,omitempty"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{11} -} - -func (x *Secret) GetID() string { - if x != nil { - return x.ID - } - return "" -} - -func (x *Secret) GetFilePath() string { - if x != nil { - return x.FilePath - } - return "" -} - -func (x *Secret) GetEnv() string { - if x != nil { - return x.Env - } - return "" -} - -type CallFunc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Format string `protobuf:"bytes,2,opt,name=Format,proto3" json:"Format,omitempty"` - IgnoreStatus bool `protobuf:"varint,3,opt,name=IgnoreStatus,proto3" json:"IgnoreStatus,omitempty"` -} - -func (x *CallFunc) Reset() { - *x = CallFunc{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CallFunc) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallFunc) ProtoMessage() {} - -func (x *CallFunc) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CallFunc.ProtoReflect.Descriptor instead. -func (*CallFunc) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{12} -} - -func (x *CallFunc) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CallFunc) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *CallFunc) GetIgnoreStatus() bool { - if x != nil { - return x.IgnoreStatus - } - return false -} - -type InspectRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *InspectRequest) Reset() { - *x = InspectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InspectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InspectRequest) ProtoMessage() {} - -func (x *InspectRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InspectRequest.ProtoReflect.Descriptor instead. -func (*InspectRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{13} -} - -func (x *InspectRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type InspectResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Options *BuildOptions `protobuf:"bytes,1,opt,name=Options,proto3" json:"Options,omitempty"` -} - -func (x *InspectResponse) Reset() { - *x = InspectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InspectResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InspectResponse) ProtoMessage() {} - -func (x *InspectResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InspectResponse.ProtoReflect.Descriptor instead. -func (*InspectResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{14} -} - -func (x *InspectResponse) GetOptions() *BuildOptions { - if x != nil { - return x.Options - } - return nil -} - -type UlimitOpt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values map[string]*Ulimit `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *UlimitOpt) Reset() { - *x = UlimitOpt{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UlimitOpt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UlimitOpt) ProtoMessage() {} - -func (x *UlimitOpt) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UlimitOpt.ProtoReflect.Descriptor instead. -func (*UlimitOpt) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{15} -} - -func (x *UlimitOpt) GetValues() map[string]*Ulimit { - if x != nil { - return x.Values - } - return nil -} - -type Ulimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Hard int64 `protobuf:"varint,2,opt,name=Hard,proto3" json:"Hard,omitempty"` - Soft int64 `protobuf:"varint,3,opt,name=Soft,proto3" json:"Soft,omitempty"` -} - -func (x *Ulimit) Reset() { - *x = Ulimit{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Ulimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Ulimit) ProtoMessage() {} - -func (x *Ulimit) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Ulimit.ProtoReflect.Descriptor instead. -func (*Ulimit) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{16} -} - -func (x *Ulimit) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Ulimit) GetHard() int64 { - if x != nil { - return x.Hard - } - return 0 -} - -func (x *Ulimit) GetSoft() int64 { - if x != nil { - return x.Soft - } - return 0 -} - -type BuildResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExporterResponse map[string]string `protobuf:"bytes,1,rep,name=ExporterResponse,proto3" json:"ExporterResponse,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *BuildResponse) Reset() { - *x = BuildResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildResponse) ProtoMessage() {} - -func (x *BuildResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildResponse.ProtoReflect.Descriptor instead. -func (*BuildResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{17} -} - -func (x *BuildResponse) GetExporterResponse() map[string]string { - if x != nil { - return x.ExporterResponse - } - return nil -} - -type DisconnectRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *DisconnectRequest) Reset() { - *x = DisconnectRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisconnectRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisconnectRequest) ProtoMessage() {} - -func (x *DisconnectRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisconnectRequest.ProtoReflect.Descriptor instead. -func (*DisconnectRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{18} -} - -func (x *DisconnectRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type DisconnectResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DisconnectResponse) Reset() { - *x = DisconnectResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DisconnectResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DisconnectResponse) ProtoMessage() {} - -func (x *DisconnectResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DisconnectResponse.ProtoReflect.Descriptor instead. -func (*DisconnectResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{19} -} - -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{20} -} - -func (x *ListRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type ListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *ListResponse) Reset() { - *x = ListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResponse) ProtoMessage() {} - -func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. -func (*ListResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{21} -} - -func (x *ListResponse) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -type InputMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Input: - // - // *InputMessage_Init - // *InputMessage_Data - Input isInputMessage_Input `protobuf_oneof:"Input"` -} - -func (x *InputMessage) Reset() { - *x = InputMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputMessage) ProtoMessage() {} - -func (x *InputMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputMessage.ProtoReflect.Descriptor instead. -func (*InputMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{22} -} - -func (m *InputMessage) GetInput() isInputMessage_Input { - if m != nil { - return m.Input - } - return nil -} - -func (x *InputMessage) GetInit() *InputInitMessage { - if x, ok := x.GetInput().(*InputMessage_Init); ok { - return x.Init - } - return nil -} - -func (x *InputMessage) GetData() *DataMessage { - if x, ok := x.GetInput().(*InputMessage_Data); ok { - return x.Data - } - return nil -} - -type isInputMessage_Input interface { - isInputMessage_Input() -} - -type InputMessage_Init struct { - Init *InputInitMessage `protobuf:"bytes,1,opt,name=Init,proto3,oneof"` -} - -type InputMessage_Data struct { - Data *DataMessage `protobuf:"bytes,2,opt,name=Data,proto3,oneof"` -} - -func (*InputMessage_Init) isInputMessage_Input() {} - -func (*InputMessage_Data) isInputMessage_Input() {} - -type InputInitMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *InputInitMessage) Reset() { - *x = InputInitMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputInitMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputInitMessage) ProtoMessage() {} - -func (x *InputInitMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputInitMessage.ProtoReflect.Descriptor instead. -func (*InputInitMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{23} -} - -func (x *InputInitMessage) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type DataMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EOF bool `protobuf:"varint,1,opt,name=EOF,proto3" json:"EOF,omitempty"` // true if eof was reached - Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` // should be chunked smaller than 4MB: -} - -func (x *DataMessage) Reset() { - *x = DataMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DataMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataMessage) ProtoMessage() {} - -func (x *DataMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DataMessage.ProtoReflect.Descriptor instead. -func (*DataMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{24} -} - -func (x *DataMessage) GetEOF() bool { - if x != nil { - return x.EOF - } - return false -} - -func (x *DataMessage) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type InputResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *InputResponse) Reset() { - *x = InputResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputResponse) ProtoMessage() {} - -func (x *InputResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputResponse.ProtoReflect.Descriptor instead. -func (*InputResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{25} -} - -type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Input: - // - // *Message_Init - // *Message_File - // *Message_Resize - // *Message_Signal - Input isMessage_Input `protobuf_oneof:"Input"` -} - -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Message) ProtoMessage() {} - -func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Message.ProtoReflect.Descriptor instead. -func (*Message) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{26} -} - -func (m *Message) GetInput() isMessage_Input { - if m != nil { - return m.Input - } - return nil -} - -func (x *Message) GetInit() *InitMessage { - if x, ok := x.GetInput().(*Message_Init); ok { - return x.Init - } - return nil -} - -func (x *Message) GetFile() *FdMessage { - if x, ok := x.GetInput().(*Message_File); ok { - return x.File - } - return nil -} - -func (x *Message) GetResize() *ResizeMessage { - if x, ok := x.GetInput().(*Message_Resize); ok { - return x.Resize - } - return nil -} - -func (x *Message) GetSignal() *SignalMessage { - if x, ok := x.GetInput().(*Message_Signal); ok { - return x.Signal - } - return nil -} - -type isMessage_Input interface { - isMessage_Input() -} - -type Message_Init struct { - Init *InitMessage `protobuf:"bytes,1,opt,name=Init,proto3,oneof"` -} - -type Message_File struct { - // FdMessage used from client to server for input (stdin) and - // from server to client for output (stdout, stderr) - File *FdMessage `protobuf:"bytes,2,opt,name=File,proto3,oneof"` -} - -type Message_Resize struct { - // ResizeMessage used from client to server for terminal resize events - Resize *ResizeMessage `protobuf:"bytes,3,opt,name=Resize,proto3,oneof"` -} - -type Message_Signal struct { - // SignalMessage is used from client to server to send signal events - Signal *SignalMessage `protobuf:"bytes,4,opt,name=Signal,proto3,oneof"` -} - -func (*Message_Init) isMessage_Input() {} - -func (*Message_File) isMessage_Input() {} - -func (*Message_Resize) isMessage_Input() {} - -func (*Message_Signal) isMessage_Input() {} - -type InitMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` - // If ProcessID already exists in the server, it tries to connect to it - // instead of invoking the new one. In this case, InvokeConfig will be ignored. - ProcessID string `protobuf:"bytes,2,opt,name=ProcessID,proto3" json:"ProcessID,omitempty"` - InvokeConfig *InvokeConfig `protobuf:"bytes,3,opt,name=InvokeConfig,proto3" json:"InvokeConfig,omitempty"` -} - -func (x *InitMessage) Reset() { - *x = InitMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InitMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InitMessage) ProtoMessage() {} - -func (x *InitMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InitMessage.ProtoReflect.Descriptor instead. -func (*InitMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{27} -} - -func (x *InitMessage) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -func (x *InitMessage) GetProcessID() string { - if x != nil { - return x.ProcessID - } - return "" -} - -func (x *InitMessage) GetInvokeConfig() *InvokeConfig { - if x != nil { - return x.InvokeConfig - } - return nil -} - -type InvokeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entrypoint []string `protobuf:"bytes,1,rep,name=Entrypoint,proto3" json:"Entrypoint,omitempty"` - Cmd []string `protobuf:"bytes,2,rep,name=Cmd,proto3" json:"Cmd,omitempty"` - NoCmd bool `protobuf:"varint,11,opt,name=NoCmd,proto3" json:"NoCmd,omitempty"` // Do not set cmd but use the image's default - Env []string `protobuf:"bytes,3,rep,name=Env,proto3" json:"Env,omitempty"` - User string `protobuf:"bytes,4,opt,name=User,proto3" json:"User,omitempty"` - NoUser bool `protobuf:"varint,5,opt,name=NoUser,proto3" json:"NoUser,omitempty"` // Do not set user but use the image's default - Cwd string `protobuf:"bytes,6,opt,name=Cwd,proto3" json:"Cwd,omitempty"` - NoCwd bool `protobuf:"varint,7,opt,name=NoCwd,proto3" json:"NoCwd,omitempty"` // Do not set cwd but use the image's default - Tty bool `protobuf:"varint,8,opt,name=Tty,proto3" json:"Tty,omitempty"` - Rollback bool `protobuf:"varint,9,opt,name=Rollback,proto3" json:"Rollback,omitempty"` // Kill all process in the container and recreate it. - Initial bool `protobuf:"varint,10,opt,name=Initial,proto3" json:"Initial,omitempty"` // Run container from the initial state of that stage (supported only on the failed step) -} - -func (x *InvokeConfig) Reset() { - *x = InvokeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InvokeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokeConfig) ProtoMessage() {} - -func (x *InvokeConfig) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvokeConfig.ProtoReflect.Descriptor instead. -func (*InvokeConfig) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{28} -} - -func (x *InvokeConfig) GetEntrypoint() []string { - if x != nil { - return x.Entrypoint - } - return nil -} - -func (x *InvokeConfig) GetCmd() []string { - if x != nil { - return x.Cmd - } - return nil -} - -func (x *InvokeConfig) GetNoCmd() bool { - if x != nil { - return x.NoCmd - } - return false -} - -func (x *InvokeConfig) GetEnv() []string { - if x != nil { - return x.Env - } - return nil -} - -func (x *InvokeConfig) GetUser() string { - if x != nil { - return x.User - } - return "" -} - -func (x *InvokeConfig) GetNoUser() bool { - if x != nil { - return x.NoUser - } - return false -} - -func (x *InvokeConfig) GetCwd() string { - if x != nil { - return x.Cwd - } - return "" -} - -func (x *InvokeConfig) GetNoCwd() bool { - if x != nil { - return x.NoCwd - } - return false -} - -func (x *InvokeConfig) GetTty() bool { - if x != nil { - return x.Tty - } - return false -} - -func (x *InvokeConfig) GetRollback() bool { - if x != nil { - return x.Rollback - } - return false -} - -func (x *InvokeConfig) GetInitial() bool { - if x != nil { - return x.Initial - } - return false -} - -type FdMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Fd uint32 `protobuf:"varint,1,opt,name=Fd,proto3" json:"Fd,omitempty"` // what fd the data was from - EOF bool `protobuf:"varint,2,opt,name=EOF,proto3" json:"EOF,omitempty"` // true if eof was reached - Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` // should be chunked smaller than 4MB: -} - -func (x *FdMessage) Reset() { - *x = FdMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FdMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FdMessage) ProtoMessage() {} - -func (x *FdMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FdMessage.ProtoReflect.Descriptor instead. -func (*FdMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{29} -} - -func (x *FdMessage) GetFd() uint32 { - if x != nil { - return x.Fd - } - return 0 -} - -func (x *FdMessage) GetEOF() bool { - if x != nil { - return x.EOF - } - return false -} - -func (x *FdMessage) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type ResizeMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Rows uint32 `protobuf:"varint,1,opt,name=Rows,proto3" json:"Rows,omitempty"` - Cols uint32 `protobuf:"varint,2,opt,name=Cols,proto3" json:"Cols,omitempty"` -} - -func (x *ResizeMessage) Reset() { - *x = ResizeMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResizeMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResizeMessage) ProtoMessage() {} - -func (x *ResizeMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResizeMessage.ProtoReflect.Descriptor instead. -func (*ResizeMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{30} -} - -func (x *ResizeMessage) GetRows() uint32 { - if x != nil { - return x.Rows - } - return 0 -} - -func (x *ResizeMessage) GetCols() uint32 { - if x != nil { - return x.Cols - } - return 0 -} - -type SignalMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // we only send name (ie HUP, INT) because the int values - // are platform dependent. - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` -} - -func (x *SignalMessage) Reset() { - *x = SignalMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignalMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignalMessage) ProtoMessage() {} - -func (x *SignalMessage) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignalMessage.ProtoReflect.Descriptor instead. -func (*SignalMessage) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{31} -} - -func (x *SignalMessage) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type StatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SessionID string `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"` -} - -func (x *StatusRequest) Reset() { - *x = StatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusRequest) ProtoMessage() {} - -func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. -func (*StatusRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{32} -} - -func (x *StatusRequest) GetSessionID() string { - if x != nil { - return x.SessionID - } - return "" -} - -type StatusResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Vertexes []*control.Vertex `protobuf:"bytes,1,rep,name=vertexes,proto3" json:"vertexes,omitempty"` - Statuses []*control.VertexStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` - Logs []*control.VertexLog `protobuf:"bytes,3,rep,name=logs,proto3" json:"logs,omitempty"` - Warnings []*control.VertexWarning `protobuf:"bytes,4,rep,name=warnings,proto3" json:"warnings,omitempty"` -} - -func (x *StatusResponse) Reset() { - *x = StatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusResponse) ProtoMessage() {} - -func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. -func (*StatusResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{33} -} - -func (x *StatusResponse) GetVertexes() []*control.Vertex { - if x != nil { - return x.Vertexes - } - return nil -} - -func (x *StatusResponse) GetStatuses() []*control.VertexStatus { - if x != nil { - return x.Statuses - } - return nil -} - -func (x *StatusResponse) GetLogs() []*control.VertexLog { - if x != nil { - return x.Logs - } - return nil -} - -func (x *StatusResponse) GetWarnings() []*control.VertexWarning { - if x != nil { - return x.Warnings - } - return nil -} - -type InfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *InfoRequest) Reset() { - *x = InfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InfoRequest) ProtoMessage() {} - -func (x *InfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead. -func (*InfoRequest) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{34} -} - -type InfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BuildxVersion *BuildxVersion `protobuf:"bytes,1,opt,name=buildxVersion,proto3" json:"buildxVersion,omitempty"` -} - -func (x *InfoResponse) Reset() { - *x = InfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InfoResponse) ProtoMessage() {} - -func (x *InfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead. -func (*InfoResponse) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{35} -} - -func (x *InfoResponse) GetBuildxVersion() *BuildxVersion { - if x != nil { - return x.BuildxVersion - } - return nil -} - -type BuildxVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` -} - -func (x *BuildxVersion) Reset() { - *x = BuildxVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BuildxVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BuildxVersion) ProtoMessage() {} - -func (x *BuildxVersion) ProtoReflect() protoreflect.Message { - mi := &file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BuildxVersion.ProtoReflect.Descriptor instead. -func (*BuildxVersion) Descriptor() ([]byte, []int) { - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP(), []int{36} -} - -func (x *BuildxVersion) GetPackage() string { - if x != nil { - return x.Package - } - return "" -} - -func (x *BuildxVersion) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *BuildxVersion) GetRevision() string { - if x != nil { - return x.Revision - } - return "" -} - -var File_github_com_docker_buildx_controller_pb_controller_proto protoreflect.FileDescriptor - -var file_github_com_docker_buildx_controller_pb_controller_proto_rawDesc = []byte{ - 0x0a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, - 0x6b, 0x65, 0x72, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, - 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x6f, 0x62, 0x79, 0x2f, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2f, 0x70, 0x62, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x50, 0x0a, 0x15, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x73, 0x0a, 0x0b, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x12, 0x46, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x56, 0x0a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x22, 0x1b, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x12, 0x3c, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xc5, 0x0c, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x44, 0x6f, - 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x08, - 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x52, 0x08, - 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x5b, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x36, 0x0a, 0x07, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x52, 0x07, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x72, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x41, 0x72, 0x67, 0x73, 0x12, 0x45, 0x0a, 0x09, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x72, 0x6f, - 0x6d, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x09, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x41, 0x0a, 0x07, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x54, 0x6f, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x6f, 0x12, 0x22, - 0x0a, 0x0c, 0x43, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x0c, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, - 0x46, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x6f, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x4e, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18, 0x10, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x36, 0x0a, - 0x07, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x68, 0x6d, 0x53, 0x69, 0x7a, 0x65, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x53, 0x68, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x2b, 0x0a, 0x03, 0x53, 0x53, 0x48, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x53, 0x48, 0x52, 0x03, 0x53, 0x53, 0x48, 0x12, 0x12, 0x0a, 0x04, - 0x54, 0x61, 0x67, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x55, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x70, 0x74, 0x52, 0x07, 0x55, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x17, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, - 0x07, 0x4e, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x4e, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x75, 0x6c, 0x6c, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x50, 0x75, 0x6c, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x12, 0x49, 0x0a, 0x0c, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6f, 0x62, 0x79, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x18, 0x1d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x66, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x6e, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x1a, 0x40, - 0x0a, 0x12, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x3c, 0x0a, 0x0e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc1, 0x01, 0x0a, 0x0b, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, - 0x05, 0x41, 0x74, 0x74, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, - 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x41, 0x74, 0x74, 0x72, - 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xab, 0x01, - 0x0a, 0x11, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, - 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x41, 0x74, 0x74, 0x72, - 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x06, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x44, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x74, 0x74, 0x72, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x74, 0x74, 0x72, 0x73, 0x22, 0x2b, 0x0a, 0x03, 0x53, - 0x53, 0x48, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x46, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, - 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x45, 0x6e, 0x76, - 0x22, 0x5a, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x04, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2e, 0x0a, 0x0e, - 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x4f, 0x0a, 0x0f, - 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3c, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x01, - 0x0a, 0x09, 0x55, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x70, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x70, 0x74, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x1a, 0x57, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x44, 0x0a, 0x06, 0x55, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x61, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x48, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, - 0x6f, 0x66, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x53, 0x6f, 0x66, 0x74, 0x22, - 0xbb, 0x01, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x65, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x43, 0x0a, 0x15, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, - 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x22, 0x14, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x22, 0x22, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x42, - 0x07, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x30, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x49, 0x6e, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x61, - 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x45, 0x4f, 0x46, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, 0x4f, 0x46, 0x12, 0x12, 0x0a, 0x04, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, - 0x0f, 0x0a, 0x0d, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x80, 0x02, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x04, - 0x49, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, - 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x06, - 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x48, 0x00, 0x52, 0x06, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x48, 0x00, 0x52, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x44, 0x12, - 0x46, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, - 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x6b, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, - 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x43, 0x6d, 0x64, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x43, 0x6d, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, - 0x43, 0x6d, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x4e, 0x6f, 0x43, 0x6d, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x45, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x45, - 0x6e, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x4e, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, - 0x0a, 0x03, 0x43, 0x77, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x43, 0x77, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x43, 0x77, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x4e, 0x6f, 0x43, 0x77, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x74, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x03, 0x54, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x52, 0x6f, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x22, 0x41, - 0x0a, 0x09, 0x46, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x46, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x46, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x45, - 0x4f, 0x46, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x45, 0x4f, 0x46, 0x12, 0x12, 0x0a, - 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x44, 0x61, 0x74, - 0x61, 0x22, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x43, 0x6f, 0x6c, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, - 0x2d, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xf0, - 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x34, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x62, 0x79, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x6b, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x08, 0x76, - 0x65, 0x72, 0x74, 0x65, 0x78, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x62, 0x79, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, - 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6f, 0x62, 0x79, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x6b, 0x69, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x4c, 0x6f, 0x67, 0x52, 0x04, - 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x62, 0x79, 0x2e, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x6b, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, - 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x59, 0x0a, 0x0c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x49, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x0d, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x8c, 0x07, 0x0a, - 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x05, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x12, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, - 0x07, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x52, 0x0a, 0x05, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x23, 0x2e, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, - 0x12, 0x4a, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1d, 0x2e, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1d, 0x2e, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4d, 0x0a, 0x04, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x04, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x2e, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, - 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x78, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_github_com_docker_buildx_controller_pb_controller_proto_rawDescOnce sync.Once - file_github_com_docker_buildx_controller_pb_controller_proto_rawDescData = file_github_com_docker_buildx_controller_pb_controller_proto_rawDesc -) - -func file_github_com_docker_buildx_controller_pb_controller_proto_rawDescGZIP() []byte { - file_github_com_docker_buildx_controller_pb_controller_proto_rawDescOnce.Do(func() { - file_github_com_docker_buildx_controller_pb_controller_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_docker_buildx_controller_pb_controller_proto_rawDescData) - }) - return file_github_com_docker_buildx_controller_pb_controller_proto_rawDescData -} - -var file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 44) -var file_github_com_docker_buildx_controller_pb_controller_proto_goTypes = []interface{}{ - (*ListProcessesRequest)(nil), // 0: buildx.controller.v1.ListProcessesRequest - (*ListProcessesResponse)(nil), // 1: buildx.controller.v1.ListProcessesResponse - (*ProcessInfo)(nil), // 2: buildx.controller.v1.ProcessInfo - (*DisconnectProcessRequest)(nil), // 3: buildx.controller.v1.DisconnectProcessRequest - (*DisconnectProcessResponse)(nil), // 4: buildx.controller.v1.DisconnectProcessResponse - (*BuildRequest)(nil), // 5: buildx.controller.v1.BuildRequest - (*BuildOptions)(nil), // 6: buildx.controller.v1.BuildOptions - (*ExportEntry)(nil), // 7: buildx.controller.v1.ExportEntry - (*CacheOptionsEntry)(nil), // 8: buildx.controller.v1.CacheOptionsEntry - (*Attest)(nil), // 9: buildx.controller.v1.Attest - (*SSH)(nil), // 10: buildx.controller.v1.SSH - (*Secret)(nil), // 11: buildx.controller.v1.Secret - (*CallFunc)(nil), // 12: buildx.controller.v1.CallFunc - (*InspectRequest)(nil), // 13: buildx.controller.v1.InspectRequest - (*InspectResponse)(nil), // 14: buildx.controller.v1.InspectResponse - (*UlimitOpt)(nil), // 15: buildx.controller.v1.UlimitOpt - (*Ulimit)(nil), // 16: buildx.controller.v1.Ulimit - (*BuildResponse)(nil), // 17: buildx.controller.v1.BuildResponse - (*DisconnectRequest)(nil), // 18: buildx.controller.v1.DisconnectRequest - (*DisconnectResponse)(nil), // 19: buildx.controller.v1.DisconnectResponse - (*ListRequest)(nil), // 20: buildx.controller.v1.ListRequest - (*ListResponse)(nil), // 21: buildx.controller.v1.ListResponse - (*InputMessage)(nil), // 22: buildx.controller.v1.InputMessage - (*InputInitMessage)(nil), // 23: buildx.controller.v1.InputInitMessage - (*DataMessage)(nil), // 24: buildx.controller.v1.DataMessage - (*InputResponse)(nil), // 25: buildx.controller.v1.InputResponse - (*Message)(nil), // 26: buildx.controller.v1.Message - (*InitMessage)(nil), // 27: buildx.controller.v1.InitMessage - (*InvokeConfig)(nil), // 28: buildx.controller.v1.InvokeConfig - (*FdMessage)(nil), // 29: buildx.controller.v1.FdMessage - (*ResizeMessage)(nil), // 30: buildx.controller.v1.ResizeMessage - (*SignalMessage)(nil), // 31: buildx.controller.v1.SignalMessage - (*StatusRequest)(nil), // 32: buildx.controller.v1.StatusRequest - (*StatusResponse)(nil), // 33: buildx.controller.v1.StatusResponse - (*InfoRequest)(nil), // 34: buildx.controller.v1.InfoRequest - (*InfoResponse)(nil), // 35: buildx.controller.v1.InfoResponse - (*BuildxVersion)(nil), // 36: buildx.controller.v1.BuildxVersion - nil, // 37: buildx.controller.v1.BuildOptions.NamedContextsEntry - nil, // 38: buildx.controller.v1.BuildOptions.BuildArgsEntry - nil, // 39: buildx.controller.v1.BuildOptions.LabelsEntry - nil, // 40: buildx.controller.v1.ExportEntry.AttrsEntry - nil, // 41: buildx.controller.v1.CacheOptionsEntry.AttrsEntry - nil, // 42: buildx.controller.v1.UlimitOpt.ValuesEntry - nil, // 43: buildx.controller.v1.BuildResponse.ExporterResponseEntry - (*pb.Policy)(nil), // 44: moby.buildkit.v1.sourcepolicy.Policy - (*control.Vertex)(nil), // 45: moby.buildkit.v1.Vertex - (*control.VertexStatus)(nil), // 46: moby.buildkit.v1.VertexStatus - (*control.VertexLog)(nil), // 47: moby.buildkit.v1.VertexLog - (*control.VertexWarning)(nil), // 48: moby.buildkit.v1.VertexWarning -} -var file_github_com_docker_buildx_controller_pb_controller_proto_depIdxs = []int32{ - 2, // 0: buildx.controller.v1.ListProcessesResponse.Infos:type_name -> buildx.controller.v1.ProcessInfo - 28, // 1: buildx.controller.v1.ProcessInfo.InvokeConfig:type_name -> buildx.controller.v1.InvokeConfig - 6, // 2: buildx.controller.v1.BuildRequest.Options:type_name -> buildx.controller.v1.BuildOptions - 12, // 3: buildx.controller.v1.BuildOptions.CallFunc:type_name -> buildx.controller.v1.CallFunc - 37, // 4: buildx.controller.v1.BuildOptions.NamedContexts:type_name -> buildx.controller.v1.BuildOptions.NamedContextsEntry - 9, // 5: buildx.controller.v1.BuildOptions.Attests:type_name -> buildx.controller.v1.Attest - 38, // 6: buildx.controller.v1.BuildOptions.BuildArgs:type_name -> buildx.controller.v1.BuildOptions.BuildArgsEntry - 8, // 7: buildx.controller.v1.BuildOptions.CacheFrom:type_name -> buildx.controller.v1.CacheOptionsEntry - 8, // 8: buildx.controller.v1.BuildOptions.CacheTo:type_name -> buildx.controller.v1.CacheOptionsEntry - 7, // 9: buildx.controller.v1.BuildOptions.Exports:type_name -> buildx.controller.v1.ExportEntry - 39, // 10: buildx.controller.v1.BuildOptions.Labels:type_name -> buildx.controller.v1.BuildOptions.LabelsEntry - 11, // 11: buildx.controller.v1.BuildOptions.Secrets:type_name -> buildx.controller.v1.Secret - 10, // 12: buildx.controller.v1.BuildOptions.SSH:type_name -> buildx.controller.v1.SSH - 15, // 13: buildx.controller.v1.BuildOptions.Ulimits:type_name -> buildx.controller.v1.UlimitOpt - 44, // 14: buildx.controller.v1.BuildOptions.SourcePolicy:type_name -> moby.buildkit.v1.sourcepolicy.Policy - 40, // 15: buildx.controller.v1.ExportEntry.Attrs:type_name -> buildx.controller.v1.ExportEntry.AttrsEntry - 41, // 16: buildx.controller.v1.CacheOptionsEntry.Attrs:type_name -> buildx.controller.v1.CacheOptionsEntry.AttrsEntry - 6, // 17: buildx.controller.v1.InspectResponse.Options:type_name -> buildx.controller.v1.BuildOptions - 42, // 18: buildx.controller.v1.UlimitOpt.values:type_name -> buildx.controller.v1.UlimitOpt.ValuesEntry - 43, // 19: buildx.controller.v1.BuildResponse.ExporterResponse:type_name -> buildx.controller.v1.BuildResponse.ExporterResponseEntry - 23, // 20: buildx.controller.v1.InputMessage.Init:type_name -> buildx.controller.v1.InputInitMessage - 24, // 21: buildx.controller.v1.InputMessage.Data:type_name -> buildx.controller.v1.DataMessage - 27, // 22: buildx.controller.v1.Message.Init:type_name -> buildx.controller.v1.InitMessage - 29, // 23: buildx.controller.v1.Message.File:type_name -> buildx.controller.v1.FdMessage - 30, // 24: buildx.controller.v1.Message.Resize:type_name -> buildx.controller.v1.ResizeMessage - 31, // 25: buildx.controller.v1.Message.Signal:type_name -> buildx.controller.v1.SignalMessage - 28, // 26: buildx.controller.v1.InitMessage.InvokeConfig:type_name -> buildx.controller.v1.InvokeConfig - 45, // 27: buildx.controller.v1.StatusResponse.vertexes:type_name -> moby.buildkit.v1.Vertex - 46, // 28: buildx.controller.v1.StatusResponse.statuses:type_name -> moby.buildkit.v1.VertexStatus - 47, // 29: buildx.controller.v1.StatusResponse.logs:type_name -> moby.buildkit.v1.VertexLog - 48, // 30: buildx.controller.v1.StatusResponse.warnings:type_name -> moby.buildkit.v1.VertexWarning - 36, // 31: buildx.controller.v1.InfoResponse.buildxVersion:type_name -> buildx.controller.v1.BuildxVersion - 16, // 32: buildx.controller.v1.UlimitOpt.ValuesEntry.value:type_name -> buildx.controller.v1.Ulimit - 5, // 33: buildx.controller.v1.Controller.Build:input_type -> buildx.controller.v1.BuildRequest - 13, // 34: buildx.controller.v1.Controller.Inspect:input_type -> buildx.controller.v1.InspectRequest - 32, // 35: buildx.controller.v1.Controller.Status:input_type -> buildx.controller.v1.StatusRequest - 22, // 36: buildx.controller.v1.Controller.Input:input_type -> buildx.controller.v1.InputMessage - 26, // 37: buildx.controller.v1.Controller.Invoke:input_type -> buildx.controller.v1.Message - 20, // 38: buildx.controller.v1.Controller.List:input_type -> buildx.controller.v1.ListRequest - 18, // 39: buildx.controller.v1.Controller.Disconnect:input_type -> buildx.controller.v1.DisconnectRequest - 34, // 40: buildx.controller.v1.Controller.Info:input_type -> buildx.controller.v1.InfoRequest - 0, // 41: buildx.controller.v1.Controller.ListProcesses:input_type -> buildx.controller.v1.ListProcessesRequest - 3, // 42: buildx.controller.v1.Controller.DisconnectProcess:input_type -> buildx.controller.v1.DisconnectProcessRequest - 17, // 43: buildx.controller.v1.Controller.Build:output_type -> buildx.controller.v1.BuildResponse - 14, // 44: buildx.controller.v1.Controller.Inspect:output_type -> buildx.controller.v1.InspectResponse - 33, // 45: buildx.controller.v1.Controller.Status:output_type -> buildx.controller.v1.StatusResponse - 25, // 46: buildx.controller.v1.Controller.Input:output_type -> buildx.controller.v1.InputResponse - 26, // 47: buildx.controller.v1.Controller.Invoke:output_type -> buildx.controller.v1.Message - 21, // 48: buildx.controller.v1.Controller.List:output_type -> buildx.controller.v1.ListResponse - 19, // 49: buildx.controller.v1.Controller.Disconnect:output_type -> buildx.controller.v1.DisconnectResponse - 35, // 50: buildx.controller.v1.Controller.Info:output_type -> buildx.controller.v1.InfoResponse - 1, // 51: buildx.controller.v1.Controller.ListProcesses:output_type -> buildx.controller.v1.ListProcessesResponse - 4, // 52: buildx.controller.v1.Controller.DisconnectProcess:output_type -> buildx.controller.v1.DisconnectProcessResponse - 43, // [43:53] is the sub-list for method output_type - 33, // [33:43] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name -} - -func init() { file_github_com_docker_buildx_controller_pb_controller_proto_init() } -func file_github_com_docker_buildx_controller_pb_controller_proto_init() { - if File_github_com_docker_buildx_controller_pb_controller_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProcessesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProcessesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisconnectProcessRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisconnectProcessResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheOptionsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Attest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SSH); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallFunc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InspectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InspectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UlimitOpt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Ulimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisconnectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisconnectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputInitMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InvokeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FdMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResizeMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignalMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildxVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[22].OneofWrappers = []interface{}{ - (*InputMessage_Init)(nil), - (*InputMessage_Data)(nil), - } - file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes[26].OneofWrappers = []interface{}{ - (*Message_Init)(nil), - (*Message_File)(nil), - (*Message_Resize)(nil), - (*Message_Signal)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_docker_buildx_controller_pb_controller_proto_rawDesc, - NumEnums: 0, - NumMessages: 44, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_github_com_docker_buildx_controller_pb_controller_proto_goTypes, - DependencyIndexes: file_github_com_docker_buildx_controller_pb_controller_proto_depIdxs, - MessageInfos: file_github_com_docker_buildx_controller_pb_controller_proto_msgTypes, - }.Build() - File_github_com_docker_buildx_controller_pb_controller_proto = out.File - file_github_com_docker_buildx_controller_pb_controller_proto_rawDesc = nil - file_github_com_docker_buildx_controller_pb_controller_proto_goTypes = nil - file_github_com_docker_buildx_controller_pb_controller_proto_depIdxs = nil -} diff --git a/controller/pb/controller.proto b/controller/pb/controller.proto deleted file mode 100644 index 71281c1b..00000000 --- a/controller/pb/controller.proto +++ /dev/null @@ -1,250 +0,0 @@ -syntax = "proto3"; - -package buildx.controller.v1; - -import "github.com/moby/buildkit/api/services/control/control.proto"; -import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto"; - -option go_package = "github.com/docker/buildx/controller/pb"; - -service Controller { - rpc Build(BuildRequest) returns (BuildResponse); - rpc Inspect(InspectRequest) returns (InspectResponse); - rpc Status(StatusRequest) returns (stream StatusResponse); - rpc Input(stream InputMessage) returns (InputResponse); - rpc Invoke(stream Message) returns (stream Message); - rpc List(ListRequest) returns (ListResponse); - rpc Disconnect(DisconnectRequest) returns (DisconnectResponse); - rpc Info(InfoRequest) returns (InfoResponse); - rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse); - rpc DisconnectProcess(DisconnectProcessRequest) returns (DisconnectProcessResponse); -} - -message ListProcessesRequest { - string SessionID = 1; -} - -message ListProcessesResponse { - repeated ProcessInfo Infos = 1; -} - -message ProcessInfo { - string ProcessID = 1; - InvokeConfig InvokeConfig = 2; -} - -message DisconnectProcessRequest { - string SessionID = 1; - string ProcessID = 2; -} - -message DisconnectProcessResponse { -} - -message BuildRequest { - string SessionID = 1; - BuildOptions Options = 2; -} - -message BuildOptions { - string ContextPath = 1; - string DockerfileName = 2; - CallFunc CallFunc = 3; - map NamedContexts = 4; - - repeated string Allow = 5; - repeated Attest Attests = 6; - map BuildArgs = 7; - repeated CacheOptionsEntry CacheFrom = 8; - repeated CacheOptionsEntry CacheTo = 9; - string CgroupParent = 10; - repeated ExportEntry Exports = 11; - repeated string ExtraHosts = 12; - map Labels = 13; - string NetworkMode = 14; - repeated string NoCacheFilter = 15; - repeated string Platforms = 16; - repeated Secret Secrets = 17; - int64 ShmSize = 18; - repeated SSH SSH = 19; - repeated string Tags = 20; - string Target = 21; - UlimitOpt Ulimits = 22; - - string Builder = 23; - bool NoCache = 24; - bool Pull = 25; - bool ExportPush = 26; - bool ExportLoad = 27; - moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 28; - string Ref = 29; - string GroupRef = 30; - repeated string Annotations = 31; - string ProvenanceResponseMode = 32; -} - -message ExportEntry { - string Type = 1; - map Attrs = 2; - string Destination = 3; -} - -message CacheOptionsEntry { - string Type = 1; - map Attrs = 2; -} - -message Attest { - string Type = 1; - bool Disabled = 2; - string Attrs = 3; -} - -message SSH { - string ID = 1; - repeated string Paths = 2; -} - -message Secret { - string ID = 1; - string FilePath = 2; - string Env = 3; -} - -message CallFunc { - string Name = 1; - string Format = 2; - bool IgnoreStatus = 3; -} - -message InspectRequest { - string SessionID = 1; -} - -message InspectResponse { - BuildOptions Options = 1; -} - -message UlimitOpt { - map values = 1; -} - -message Ulimit { - string Name = 1; - int64 Hard = 2; - int64 Soft = 3; -} - -message BuildResponse { - map ExporterResponse = 1; -} - -message DisconnectRequest { - string SessionID = 1; -} - -message DisconnectResponse {} - -message ListRequest { - string SessionID = 1; -} - -message ListResponse { - repeated string keys = 1; -} - -message InputMessage { - oneof Input { - InputInitMessage Init = 1; - DataMessage Data = 2; - } -} - -message InputInitMessage { - string SessionID = 1; -} - -message DataMessage { - bool EOF = 1; // true if eof was reached - bytes Data = 2; // should be chunked smaller than 4MB: - // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize -} - -message InputResponse {} - -message Message { - oneof Input { - InitMessage Init = 1; - // FdMessage used from client to server for input (stdin) and - // from server to client for output (stdout, stderr) - FdMessage File = 2; - // ResizeMessage used from client to server for terminal resize events - ResizeMessage Resize = 3; - // SignalMessage is used from client to server to send signal events - SignalMessage Signal = 4; - } -} - -message InitMessage { - string SessionID = 1; - - // If ProcessID already exists in the server, it tries to connect to it - // instead of invoking the new one. In this case, InvokeConfig will be ignored. - string ProcessID = 2; - InvokeConfig InvokeConfig = 3; -} - -message InvokeConfig { - repeated string Entrypoint = 1; - repeated string Cmd = 2; - bool NoCmd = 11; // Do not set cmd but use the image's default - repeated string Env = 3; - string User = 4; - bool NoUser = 5; // Do not set user but use the image's default - string Cwd = 6; - bool NoCwd = 7; // Do not set cwd but use the image's default - bool Tty = 8; - bool Rollback = 9; // Kill all process in the container and recreate it. - bool Initial = 10; // Run container from the initial state of that stage (supported only on the failed step) -} - -message FdMessage { - uint32 Fd = 1; // what fd the data was from - bool EOF = 2; // true if eof was reached - bytes Data = 3; // should be chunked smaller than 4MB: - // https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize -} - -message ResizeMessage { - uint32 Rows = 1; - uint32 Cols = 2; -} - -message SignalMessage { - // we only send name (ie HUP, INT) because the int values - // are platform dependent. - string Name = 1; -} - -message StatusRequest { - string SessionID = 1; -} - -message StatusResponse { - repeated moby.buildkit.v1.Vertex vertexes = 1; - repeated moby.buildkit.v1.VertexStatus statuses = 2; - repeated moby.buildkit.v1.VertexLog logs = 3; - repeated moby.buildkit.v1.VertexWarning warnings = 4; -} - -message InfoRequest {} - -message InfoResponse { - BuildxVersion buildxVersion = 1; -} - -message BuildxVersion { - string package = 1; - string version = 2; - string revision = 3; -} diff --git a/controller/pb/controller_grpc.pb.go b/controller/pb/controller_grpc.pb.go deleted file mode 100644 index 4f2051b6..00000000 --- a/controller/pb/controller_grpc.pb.go +++ /dev/null @@ -1,452 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v3.11.4 -// source: github.com/docker/buildx/controller/pb/controller.proto - -package pb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Controller_Build_FullMethodName = "/buildx.controller.v1.Controller/Build" - Controller_Inspect_FullMethodName = "/buildx.controller.v1.Controller/Inspect" - Controller_Status_FullMethodName = "/buildx.controller.v1.Controller/Status" - Controller_Input_FullMethodName = "/buildx.controller.v1.Controller/Input" - Controller_Invoke_FullMethodName = "/buildx.controller.v1.Controller/Invoke" - Controller_List_FullMethodName = "/buildx.controller.v1.Controller/List" - Controller_Disconnect_FullMethodName = "/buildx.controller.v1.Controller/Disconnect" - Controller_Info_FullMethodName = "/buildx.controller.v1.Controller/Info" - Controller_ListProcesses_FullMethodName = "/buildx.controller.v1.Controller/ListProcesses" - Controller_DisconnectProcess_FullMethodName = "/buildx.controller.v1.Controller/DisconnectProcess" -) - -// ControllerClient is the client API for Controller service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ControllerClient interface { - Build(ctx context.Context, in *BuildRequest, opts ...grpc.CallOption) (*BuildResponse, error) - Inspect(ctx context.Context, in *InspectRequest, opts ...grpc.CallOption) (*InspectResponse, error) - Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StatusResponse], error) - Input(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[InputMessage, InputResponse], error) - Invoke(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Message, Message], error) - List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) - Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) - Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) - ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error) - DisconnectProcess(ctx context.Context, in *DisconnectProcessRequest, opts ...grpc.CallOption) (*DisconnectProcessResponse, error) -} - -type controllerClient struct { - cc grpc.ClientConnInterface -} - -func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient { - return &controllerClient{cc} -} - -func (c *controllerClient) Build(ctx context.Context, in *BuildRequest, opts ...grpc.CallOption) (*BuildResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(BuildResponse) - err := c.cc.Invoke(ctx, Controller_Build_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) Inspect(ctx context.Context, in *InspectRequest, opts ...grpc.CallOption) (*InspectResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InspectResponse) - err := c.cc.Invoke(ctx, Controller_Inspect_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StatusResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Controller_ServiceDesc.Streams[0], Controller_Status_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[StatusRequest, StatusResponse]{ClientStream: stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_StatusClient = grpc.ServerStreamingClient[StatusResponse] - -func (c *controllerClient) Input(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[InputMessage, InputResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Controller_ServiceDesc.Streams[1], Controller_Input_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[InputMessage, InputResponse]{ClientStream: stream} - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_InputClient = grpc.ClientStreamingClient[InputMessage, InputResponse] - -func (c *controllerClient) Invoke(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Message, Message], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Controller_ServiceDesc.Streams[2], Controller_Invoke_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[Message, Message]{ClientStream: stream} - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_InvokeClient = grpc.BidiStreamingClient[Message, Message] - -func (c *controllerClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListResponse) - err := c.cc.Invoke(ctx, Controller_List_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DisconnectResponse) - err := c.cc.Invoke(ctx, Controller_Disconnect_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(InfoResponse) - err := c.cc.Invoke(ctx, Controller_Info_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListProcessesResponse) - err := c.cc.Invoke(ctx, Controller_ListProcesses_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *controllerClient) DisconnectProcess(ctx context.Context, in *DisconnectProcessRequest, opts ...grpc.CallOption) (*DisconnectProcessResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DisconnectProcessResponse) - err := c.cc.Invoke(ctx, Controller_DisconnectProcess_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ControllerServer is the server API for Controller service. -// All implementations should embed UnimplementedControllerServer -// for forward compatibility. -type ControllerServer interface { - Build(context.Context, *BuildRequest) (*BuildResponse, error) - Inspect(context.Context, *InspectRequest) (*InspectResponse, error) - Status(*StatusRequest, grpc.ServerStreamingServer[StatusResponse]) error - Input(grpc.ClientStreamingServer[InputMessage, InputResponse]) error - Invoke(grpc.BidiStreamingServer[Message, Message]) error - List(context.Context, *ListRequest) (*ListResponse, error) - Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) - Info(context.Context, *InfoRequest) (*InfoResponse, error) - ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error) - DisconnectProcess(context.Context, *DisconnectProcessRequest) (*DisconnectProcessResponse, error) -} - -// UnimplementedControllerServer should be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedControllerServer struct{} - -func (UnimplementedControllerServer) Build(context.Context, *BuildRequest) (*BuildResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Build not implemented") -} -func (UnimplementedControllerServer) Inspect(context.Context, *InspectRequest) (*InspectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Inspect not implemented") -} -func (UnimplementedControllerServer) Status(*StatusRequest, grpc.ServerStreamingServer[StatusResponse]) error { - return status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (UnimplementedControllerServer) Input(grpc.ClientStreamingServer[InputMessage, InputResponse]) error { - return status.Errorf(codes.Unimplemented, "method Input not implemented") -} -func (UnimplementedControllerServer) Invoke(grpc.BidiStreamingServer[Message, Message]) error { - return status.Errorf(codes.Unimplemented, "method Invoke not implemented") -} -func (UnimplementedControllerServer) List(context.Context, *ListRequest) (*ListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (UnimplementedControllerServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Disconnect not implemented") -} -func (UnimplementedControllerServer) Info(context.Context, *InfoRequest) (*InfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") -} -func (UnimplementedControllerServer) ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListProcesses not implemented") -} -func (UnimplementedControllerServer) DisconnectProcess(context.Context, *DisconnectProcessRequest) (*DisconnectProcessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisconnectProcess not implemented") -} -func (UnimplementedControllerServer) testEmbeddedByValue() {} - -// UnsafeControllerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ControllerServer will -// result in compilation errors. -type UnsafeControllerServer interface { - mustEmbedUnimplementedControllerServer() -} - -func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer) { - // If the following call pancis, it indicates UnimplementedControllerServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Controller_ServiceDesc, srv) -} - -func _Controller_Build_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BuildRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).Build(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_Build_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).Build(ctx, req.(*BuildRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_Inspect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InspectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).Inspect(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_Inspect_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).Inspect(ctx, req.(*InspectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_Status_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StatusRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ControllerServer).Status(m, &grpc.GenericServerStream[StatusRequest, StatusResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_StatusServer = grpc.ServerStreamingServer[StatusResponse] - -func _Controller_Input_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ControllerServer).Input(&grpc.GenericServerStream[InputMessage, InputResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_InputServer = grpc.ClientStreamingServer[InputMessage, InputResponse] - -func _Controller_Invoke_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ControllerServer).Invoke(&grpc.GenericServerStream[Message, Message]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Controller_InvokeServer = grpc.BidiStreamingServer[Message, Message] - -func _Controller_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_List_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).List(ctx, req.(*ListRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_Disconnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisconnectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).Disconnect(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_Disconnect_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).Disconnect(ctx, req.(*DisconnectRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).Info(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_Info_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).Info(ctx, req.(*InfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_ListProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListProcessesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).ListProcesses(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_ListProcesses_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).ListProcesses(ctx, req.(*ListProcessesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Controller_DisconnectProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisconnectProcessRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ControllerServer).DisconnectProcess(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Controller_DisconnectProcess_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ControllerServer).DisconnectProcess(ctx, req.(*DisconnectProcessRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Controller_ServiceDesc is the grpc.ServiceDesc for Controller service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Controller_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "buildx.controller.v1.Controller", - HandlerType: (*ControllerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Build", - Handler: _Controller_Build_Handler, - }, - { - MethodName: "Inspect", - Handler: _Controller_Inspect_Handler, - }, - { - MethodName: "List", - Handler: _Controller_List_Handler, - }, - { - MethodName: "Disconnect", - Handler: _Controller_Disconnect_Handler, - }, - { - MethodName: "Info", - Handler: _Controller_Info_Handler, - }, - { - MethodName: "ListProcesses", - Handler: _Controller_ListProcesses_Handler, - }, - { - MethodName: "DisconnectProcess", - Handler: _Controller_DisconnectProcess_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Status", - Handler: _Controller_Status_Handler, - ServerStreams: true, - }, - { - StreamName: "Input", - Handler: _Controller_Input_Handler, - ClientStreams: true, - }, - { - StreamName: "Invoke", - Handler: _Controller_Invoke_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "github.com/docker/buildx/controller/pb/controller.proto", -} diff --git a/controller/pb/controller_vtproto.pb.go b/controller/pb/controller_vtproto.pb.go deleted file mode 100644 index 5785602e..00000000 --- a/controller/pb/controller_vtproto.pb.go +++ /dev/null @@ -1,11430 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 -// source: github.com/docker/buildx/controller/pb/controller.proto - -package pb - -import ( - fmt "fmt" - control "github.com/moby/buildkit/api/services/control" - pb "github.com/moby/buildkit/sourcepolicy/pb" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *ListProcessesRequest) CloneVT() *ListProcessesRequest { - if m == nil { - return (*ListProcessesRequest)(nil) - } - r := new(ListProcessesRequest) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ListProcessesRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ListProcessesResponse) CloneVT() *ListProcessesResponse { - if m == nil { - return (*ListProcessesResponse)(nil) - } - r := new(ListProcessesResponse) - if rhs := m.Infos; rhs != nil { - tmpContainer := make([]*ProcessInfo, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Infos = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ListProcessesResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ProcessInfo) CloneVT() *ProcessInfo { - if m == nil { - return (*ProcessInfo)(nil) - } - r := new(ProcessInfo) - r.ProcessID = m.ProcessID - r.InvokeConfig = m.InvokeConfig.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ProcessInfo) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DisconnectProcessRequest) CloneVT() *DisconnectProcessRequest { - if m == nil { - return (*DisconnectProcessRequest)(nil) - } - r := new(DisconnectProcessRequest) - r.SessionID = m.SessionID - r.ProcessID = m.ProcessID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DisconnectProcessRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DisconnectProcessResponse) CloneVT() *DisconnectProcessResponse { - if m == nil { - return (*DisconnectProcessResponse)(nil) - } - r := new(DisconnectProcessResponse) - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DisconnectProcessResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *BuildRequest) CloneVT() *BuildRequest { - if m == nil { - return (*BuildRequest)(nil) - } - r := new(BuildRequest) - r.SessionID = m.SessionID - r.Options = m.Options.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *BuildRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *BuildOptions) CloneVT() *BuildOptions { - if m == nil { - return (*BuildOptions)(nil) - } - r := new(BuildOptions) - r.ContextPath = m.ContextPath - r.DockerfileName = m.DockerfileName - r.CallFunc = m.CallFunc.CloneVT() - r.CgroupParent = m.CgroupParent - r.NetworkMode = m.NetworkMode - r.ShmSize = m.ShmSize - r.Target = m.Target - r.Ulimits = m.Ulimits.CloneVT() - r.Builder = m.Builder - r.NoCache = m.NoCache - r.Pull = m.Pull - r.ExportPush = m.ExportPush - r.ExportLoad = m.ExportLoad - r.Ref = m.Ref - r.GroupRef = m.GroupRef - r.ProvenanceResponseMode = m.ProvenanceResponseMode - if rhs := m.NamedContexts; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.NamedContexts = tmpContainer - } - if rhs := m.Allow; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Allow = tmpContainer - } - if rhs := m.Attests; rhs != nil { - tmpContainer := make([]*Attest, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Attests = tmpContainer - } - if rhs := m.BuildArgs; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.BuildArgs = tmpContainer - } - if rhs := m.CacheFrom; rhs != nil { - tmpContainer := make([]*CacheOptionsEntry, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.CacheFrom = tmpContainer - } - if rhs := m.CacheTo; rhs != nil { - tmpContainer := make([]*CacheOptionsEntry, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.CacheTo = tmpContainer - } - if rhs := m.Exports; rhs != nil { - tmpContainer := make([]*ExportEntry, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Exports = tmpContainer - } - if rhs := m.ExtraHosts; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.ExtraHosts = tmpContainer - } - if rhs := m.Labels; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.Labels = tmpContainer - } - if rhs := m.NoCacheFilter; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.NoCacheFilter = tmpContainer - } - if rhs := m.Platforms; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Platforms = tmpContainer - } - if rhs := m.Secrets; rhs != nil { - tmpContainer := make([]*Secret, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Secrets = tmpContainer - } - if rhs := m.SSH; rhs != nil { - tmpContainer := make([]*SSH, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.SSH = tmpContainer - } - if rhs := m.Tags; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Tags = tmpContainer - } - if rhs := m.SourcePolicy; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *pb.Policy }); ok { - r.SourcePolicy = vtpb.CloneVT() - } else { - r.SourcePolicy = proto.Clone(rhs).(*pb.Policy) - } - } - if rhs := m.Annotations; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Annotations = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *BuildOptions) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ExportEntry) CloneVT() *ExportEntry { - if m == nil { - return (*ExportEntry)(nil) - } - r := new(ExportEntry) - r.Type = m.Type - r.Destination = m.Destination - if rhs := m.Attrs; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.Attrs = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ExportEntry) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *CacheOptionsEntry) CloneVT() *CacheOptionsEntry { - if m == nil { - return (*CacheOptionsEntry)(nil) - } - r := new(CacheOptionsEntry) - r.Type = m.Type - if rhs := m.Attrs; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.Attrs = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CacheOptionsEntry) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Attest) CloneVT() *Attest { - if m == nil { - return (*Attest)(nil) - } - r := new(Attest) - r.Type = m.Type - r.Disabled = m.Disabled - r.Attrs = m.Attrs - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Attest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *SSH) CloneVT() *SSH { - if m == nil { - return (*SSH)(nil) - } - r := new(SSH) - r.ID = m.ID - if rhs := m.Paths; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Paths = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *SSH) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Secret) CloneVT() *Secret { - if m == nil { - return (*Secret)(nil) - } - r := new(Secret) - r.ID = m.ID - r.FilePath = m.FilePath - r.Env = m.Env - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Secret) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *CallFunc) CloneVT() *CallFunc { - if m == nil { - return (*CallFunc)(nil) - } - r := new(CallFunc) - r.Name = m.Name - r.Format = m.Format - r.IgnoreStatus = m.IgnoreStatus - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *CallFunc) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InspectRequest) CloneVT() *InspectRequest { - if m == nil { - return (*InspectRequest)(nil) - } - r := new(InspectRequest) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InspectRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InspectResponse) CloneVT() *InspectResponse { - if m == nil { - return (*InspectResponse)(nil) - } - r := new(InspectResponse) - r.Options = m.Options.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InspectResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *UlimitOpt) CloneVT() *UlimitOpt { - if m == nil { - return (*UlimitOpt)(nil) - } - r := new(UlimitOpt) - if rhs := m.Values; rhs != nil { - tmpContainer := make(map[string]*Ulimit, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v.CloneVT() - } - r.Values = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *UlimitOpt) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Ulimit) CloneVT() *Ulimit { - if m == nil { - return (*Ulimit)(nil) - } - r := new(Ulimit) - r.Name = m.Name - r.Hard = m.Hard - r.Soft = m.Soft - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Ulimit) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *BuildResponse) CloneVT() *BuildResponse { - if m == nil { - return (*BuildResponse)(nil) - } - r := new(BuildResponse) - if rhs := m.ExporterResponse; rhs != nil { - tmpContainer := make(map[string]string, len(rhs)) - for k, v := range rhs { - tmpContainer[k] = v - } - r.ExporterResponse = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *BuildResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DisconnectRequest) CloneVT() *DisconnectRequest { - if m == nil { - return (*DisconnectRequest)(nil) - } - r := new(DisconnectRequest) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DisconnectRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DisconnectResponse) CloneVT() *DisconnectResponse { - if m == nil { - return (*DisconnectResponse)(nil) - } - r := new(DisconnectResponse) - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DisconnectResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ListRequest) CloneVT() *ListRequest { - if m == nil { - return (*ListRequest)(nil) - } - r := new(ListRequest) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ListRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ListResponse) CloneVT() *ListResponse { - if m == nil { - return (*ListResponse)(nil) - } - r := new(ListResponse) - if rhs := m.Keys; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Keys = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ListResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InputMessage) CloneVT() *InputMessage { - if m == nil { - return (*InputMessage)(nil) - } - r := new(InputMessage) - if m.Input != nil { - r.Input = m.Input.(interface{ CloneVT() isInputMessage_Input }).CloneVT() - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InputMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InputMessage_Init) CloneVT() isInputMessage_Input { - if m == nil { - return (*InputMessage_Init)(nil) - } - r := new(InputMessage_Init) - r.Init = m.Init.CloneVT() - return r -} - -func (m *InputMessage_Data) CloneVT() isInputMessage_Input { - if m == nil { - return (*InputMessage_Data)(nil) - } - r := new(InputMessage_Data) - r.Data = m.Data.CloneVT() - return r -} - -func (m *InputInitMessage) CloneVT() *InputInitMessage { - if m == nil { - return (*InputInitMessage)(nil) - } - r := new(InputInitMessage) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InputInitMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *DataMessage) CloneVT() *DataMessage { - if m == nil { - return (*DataMessage)(nil) - } - r := new(DataMessage) - r.EOF = m.EOF - if rhs := m.Data; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Data = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *DataMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InputResponse) CloneVT() *InputResponse { - if m == nil { - return (*InputResponse)(nil) - } - r := new(InputResponse) - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InputResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Message) CloneVT() *Message { - if m == nil { - return (*Message)(nil) - } - r := new(Message) - if m.Input != nil { - r.Input = m.Input.(interface{ CloneVT() isMessage_Input }).CloneVT() - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Message) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Message_Init) CloneVT() isMessage_Input { - if m == nil { - return (*Message_Init)(nil) - } - r := new(Message_Init) - r.Init = m.Init.CloneVT() - return r -} - -func (m *Message_File) CloneVT() isMessage_Input { - if m == nil { - return (*Message_File)(nil) - } - r := new(Message_File) - r.File = m.File.CloneVT() - return r -} - -func (m *Message_Resize) CloneVT() isMessage_Input { - if m == nil { - return (*Message_Resize)(nil) - } - r := new(Message_Resize) - r.Resize = m.Resize.CloneVT() - return r -} - -func (m *Message_Signal) CloneVT() isMessage_Input { - if m == nil { - return (*Message_Signal)(nil) - } - r := new(Message_Signal) - r.Signal = m.Signal.CloneVT() - return r -} - -func (m *InitMessage) CloneVT() *InitMessage { - if m == nil { - return (*InitMessage)(nil) - } - r := new(InitMessage) - r.SessionID = m.SessionID - r.ProcessID = m.ProcessID - r.InvokeConfig = m.InvokeConfig.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InitMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InvokeConfig) CloneVT() *InvokeConfig { - if m == nil { - return (*InvokeConfig)(nil) - } - r := new(InvokeConfig) - r.NoCmd = m.NoCmd - r.User = m.User - r.NoUser = m.NoUser - r.Cwd = m.Cwd - r.NoCwd = m.NoCwd - r.Tty = m.Tty - r.Rollback = m.Rollback - r.Initial = m.Initial - if rhs := m.Entrypoint; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Entrypoint = tmpContainer - } - if rhs := m.Cmd; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Cmd = tmpContainer - } - if rhs := m.Env; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Env = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InvokeConfig) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *FdMessage) CloneVT() *FdMessage { - if m == nil { - return (*FdMessage)(nil) - } - r := new(FdMessage) - r.Fd = m.Fd - r.EOF = m.EOF - if rhs := m.Data; rhs != nil { - tmpBytes := make([]byte, len(rhs)) - copy(tmpBytes, rhs) - r.Data = tmpBytes - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *FdMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *ResizeMessage) CloneVT() *ResizeMessage { - if m == nil { - return (*ResizeMessage)(nil) - } - r := new(ResizeMessage) - r.Rows = m.Rows - r.Cols = m.Cols - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *ResizeMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *SignalMessage) CloneVT() *SignalMessage { - if m == nil { - return (*SignalMessage)(nil) - } - r := new(SignalMessage) - r.Name = m.Name - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *SignalMessage) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *StatusRequest) CloneVT() *StatusRequest { - if m == nil { - return (*StatusRequest)(nil) - } - r := new(StatusRequest) - r.SessionID = m.SessionID - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *StatusRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *StatusResponse) CloneVT() *StatusResponse { - if m == nil { - return (*StatusResponse)(nil) - } - r := new(StatusResponse) - if rhs := m.Vertexes; rhs != nil { - tmpContainer := make([]*control.Vertex, len(rhs)) - for k, v := range rhs { - if vtpb, ok := interface{}(v).(interface{ CloneVT() *control.Vertex }); ok { - tmpContainer[k] = vtpb.CloneVT() - } else { - tmpContainer[k] = proto.Clone(v).(*control.Vertex) - } - } - r.Vertexes = tmpContainer - } - if rhs := m.Statuses; rhs != nil { - tmpContainer := make([]*control.VertexStatus, len(rhs)) - for k, v := range rhs { - if vtpb, ok := interface{}(v).(interface{ CloneVT() *control.VertexStatus }); ok { - tmpContainer[k] = vtpb.CloneVT() - } else { - tmpContainer[k] = proto.Clone(v).(*control.VertexStatus) - } - } - r.Statuses = tmpContainer - } - if rhs := m.Logs; rhs != nil { - tmpContainer := make([]*control.VertexLog, len(rhs)) - for k, v := range rhs { - if vtpb, ok := interface{}(v).(interface{ CloneVT() *control.VertexLog }); ok { - tmpContainer[k] = vtpb.CloneVT() - } else { - tmpContainer[k] = proto.Clone(v).(*control.VertexLog) - } - } - r.Logs = tmpContainer - } - if rhs := m.Warnings; rhs != nil { - tmpContainer := make([]*control.VertexWarning, len(rhs)) - for k, v := range rhs { - if vtpb, ok := interface{}(v).(interface{ CloneVT() *control.VertexWarning }); ok { - tmpContainer[k] = vtpb.CloneVT() - } else { - tmpContainer[k] = proto.Clone(v).(*control.VertexWarning) - } - } - r.Warnings = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *StatusResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InfoRequest) CloneVT() *InfoRequest { - if m == nil { - return (*InfoRequest)(nil) - } - r := new(InfoRequest) - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InfoRequest) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *InfoResponse) CloneVT() *InfoResponse { - if m == nil { - return (*InfoResponse)(nil) - } - r := new(InfoResponse) - r.BuildxVersion = m.BuildxVersion.CloneVT() - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *InfoResponse) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *BuildxVersion) CloneVT() *BuildxVersion { - if m == nil { - return (*BuildxVersion)(nil) - } - r := new(BuildxVersion) - r.Package = m.Package - r.Version = m.Version - r.Revision = m.Revision - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *BuildxVersion) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (this *ListProcessesRequest) EqualVT(that *ListProcessesRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ListProcessesRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ListProcessesRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ListProcessesResponse) EqualVT(that *ListProcessesResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Infos) != len(that.Infos) { - return false - } - for i, vx := range this.Infos { - vy := that.Infos[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &ProcessInfo{} - } - if q == nil { - q = &ProcessInfo{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ListProcessesResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ListProcessesResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ProcessInfo) EqualVT(that *ProcessInfo) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.ProcessID != that.ProcessID { - return false - } - if !this.InvokeConfig.EqualVT(that.InvokeConfig) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ProcessInfo) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ProcessInfo) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DisconnectProcessRequest) EqualVT(that *DisconnectProcessRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - if this.ProcessID != that.ProcessID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DisconnectProcessRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DisconnectProcessRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DisconnectProcessResponse) EqualVT(that *DisconnectProcessResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DisconnectProcessResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DisconnectProcessResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *BuildRequest) EqualVT(that *BuildRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - if !this.Options.EqualVT(that.Options) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *BuildRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*BuildRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *BuildOptions) EqualVT(that *BuildOptions) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.ContextPath != that.ContextPath { - return false - } - if this.DockerfileName != that.DockerfileName { - return false - } - if !this.CallFunc.EqualVT(that.CallFunc) { - return false - } - if len(this.NamedContexts) != len(that.NamedContexts) { - return false - } - for i, vx := range this.NamedContexts { - vy, ok := that.NamedContexts[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if len(this.Allow) != len(that.Allow) { - return false - } - for i, vx := range this.Allow { - vy := that.Allow[i] - if vx != vy { - return false - } - } - if len(this.Attests) != len(that.Attests) { - return false - } - for i, vx := range this.Attests { - vy := that.Attests[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Attest{} - } - if q == nil { - q = &Attest{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.BuildArgs) != len(that.BuildArgs) { - return false - } - for i, vx := range this.BuildArgs { - vy, ok := that.BuildArgs[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if len(this.CacheFrom) != len(that.CacheFrom) { - return false - } - for i, vx := range this.CacheFrom { - vy := that.CacheFrom[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &CacheOptionsEntry{} - } - if q == nil { - q = &CacheOptionsEntry{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.CacheTo) != len(that.CacheTo) { - return false - } - for i, vx := range this.CacheTo { - vy := that.CacheTo[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &CacheOptionsEntry{} - } - if q == nil { - q = &CacheOptionsEntry{} - } - if !p.EqualVT(q) { - return false - } - } - } - if this.CgroupParent != that.CgroupParent { - return false - } - if len(this.Exports) != len(that.Exports) { - return false - } - for i, vx := range this.Exports { - vy := that.Exports[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &ExportEntry{} - } - if q == nil { - q = &ExportEntry{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.ExtraHosts) != len(that.ExtraHosts) { - return false - } - for i, vx := range this.ExtraHosts { - vy := that.ExtraHosts[i] - if vx != vy { - return false - } - } - if len(this.Labels) != len(that.Labels) { - return false - } - for i, vx := range this.Labels { - vy, ok := that.Labels[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if this.NetworkMode != that.NetworkMode { - return false - } - if len(this.NoCacheFilter) != len(that.NoCacheFilter) { - return false - } - for i, vx := range this.NoCacheFilter { - vy := that.NoCacheFilter[i] - if vx != vy { - return false - } - } - if len(this.Platforms) != len(that.Platforms) { - return false - } - for i, vx := range this.Platforms { - vy := that.Platforms[i] - if vx != vy { - return false - } - } - if len(this.Secrets) != len(that.Secrets) { - return false - } - for i, vx := range this.Secrets { - vy := that.Secrets[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &Secret{} - } - if q == nil { - q = &Secret{} - } - if !p.EqualVT(q) { - return false - } - } - } - if this.ShmSize != that.ShmSize { - return false - } - if len(this.SSH) != len(that.SSH) { - return false - } - for i, vx := range this.SSH { - vy := that.SSH[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &SSH{} - } - if q == nil { - q = &SSH{} - } - if !p.EqualVT(q) { - return false - } - } - } - if len(this.Tags) != len(that.Tags) { - return false - } - for i, vx := range this.Tags { - vy := that.Tags[i] - if vx != vy { - return false - } - } - if this.Target != that.Target { - return false - } - if !this.Ulimits.EqualVT(that.Ulimits) { - return false - } - if this.Builder != that.Builder { - return false - } - if this.NoCache != that.NoCache { - return false - } - if this.Pull != that.Pull { - return false - } - if this.ExportPush != that.ExportPush { - return false - } - if this.ExportLoad != that.ExportLoad { - return false - } - if equal, ok := interface{}(this.SourcePolicy).(interface{ EqualVT(*pb.Policy) bool }); ok { - if !equal.EqualVT(that.SourcePolicy) { - return false - } - } else if !proto.Equal(this.SourcePolicy, that.SourcePolicy) { - return false - } - if this.Ref != that.Ref { - return false - } - if this.GroupRef != that.GroupRef { - return false - } - if len(this.Annotations) != len(that.Annotations) { - return false - } - for i, vx := range this.Annotations { - vy := that.Annotations[i] - if vx != vy { - return false - } - } - if this.ProvenanceResponseMode != that.ProvenanceResponseMode { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *BuildOptions) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*BuildOptions) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ExportEntry) EqualVT(that *ExportEntry) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Type != that.Type { - return false - } - if len(this.Attrs) != len(that.Attrs) { - return false - } - for i, vx := range this.Attrs { - vy, ok := that.Attrs[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - if this.Destination != that.Destination { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ExportEntry) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ExportEntry) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *CacheOptionsEntry) EqualVT(that *CacheOptionsEntry) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Type != that.Type { - return false - } - if len(this.Attrs) != len(that.Attrs) { - return false - } - for i, vx := range this.Attrs { - vy, ok := that.Attrs[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *CacheOptionsEntry) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*CacheOptionsEntry) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Attest) EqualVT(that *Attest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Type != that.Type { - return false - } - if this.Disabled != that.Disabled { - return false - } - if this.Attrs != that.Attrs { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Attest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Attest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *SSH) EqualVT(that *SSH) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.ID != that.ID { - return false - } - if len(this.Paths) != len(that.Paths) { - return false - } - for i, vx := range this.Paths { - vy := that.Paths[i] - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *SSH) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*SSH) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Secret) EqualVT(that *Secret) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.ID != that.ID { - return false - } - if this.FilePath != that.FilePath { - return false - } - if this.Env != that.Env { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Secret) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Secret) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *CallFunc) EqualVT(that *CallFunc) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - if this.Format != that.Format { - return false - } - if this.IgnoreStatus != that.IgnoreStatus { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *CallFunc) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*CallFunc) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InspectRequest) EqualVT(that *InspectRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InspectRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InspectRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InspectResponse) EqualVT(that *InspectResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.Options.EqualVT(that.Options) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InspectResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InspectResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *UlimitOpt) EqualVT(that *UlimitOpt) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Values) != len(that.Values) { - return false - } - for i, vx := range this.Values { - vy, ok := that.Values[i] - if !ok { - return false - } - if p, q := vx, vy; p != q { - if p == nil { - p = &Ulimit{} - } - if q == nil { - q = &Ulimit{} - } - if !p.EqualVT(q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *UlimitOpt) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*UlimitOpt) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Ulimit) EqualVT(that *Ulimit) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - if this.Hard != that.Hard { - return false - } - if this.Soft != that.Soft { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Ulimit) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Ulimit) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *BuildResponse) EqualVT(that *BuildResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.ExporterResponse) != len(that.ExporterResponse) { - return false - } - for i, vx := range this.ExporterResponse { - vy, ok := that.ExporterResponse[i] - if !ok { - return false - } - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *BuildResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*BuildResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DisconnectRequest) EqualVT(that *DisconnectRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DisconnectRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DisconnectRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DisconnectResponse) EqualVT(that *DisconnectResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DisconnectResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DisconnectResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ListRequest) EqualVT(that *ListRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ListRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ListRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ListResponse) EqualVT(that *ListResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Keys) != len(that.Keys) { - return false - } - for i, vx := range this.Keys { - vy := that.Keys[i] - if vx != vy { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ListResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ListResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InputMessage) EqualVT(that *InputMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Input == nil && that.Input != nil { - return false - } else if this.Input != nil { - if that.Input == nil { - return false - } - if !this.Input.(interface { - EqualVT(isInputMessage_Input) bool - }).EqualVT(that.Input) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InputMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InputMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InputMessage_Init) EqualVT(thatIface isInputMessage_Input) bool { - that, ok := thatIface.(*InputMessage_Init) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Init, that.Init; p != q { - if p == nil { - p = &InputInitMessage{} - } - if q == nil { - q = &InputInitMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *InputMessage_Data) EqualVT(thatIface isInputMessage_Input) bool { - that, ok := thatIface.(*InputMessage_Data) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Data, that.Data; p != q { - if p == nil { - p = &DataMessage{} - } - if q == nil { - q = &DataMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *InputInitMessage) EqualVT(that *InputInitMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InputInitMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InputInitMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *DataMessage) EqualVT(that *DataMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.EOF != that.EOF { - return false - } - if string(this.Data) != string(that.Data) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *DataMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*DataMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InputResponse) EqualVT(that *InputResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InputResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InputResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Message) EqualVT(that *Message) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Input == nil && that.Input != nil { - return false - } else if this.Input != nil { - if that.Input == nil { - return false - } - if !this.Input.(interface{ EqualVT(isMessage_Input) bool }).EqualVT(that.Input) { - return false - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *Message) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Message) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *Message_Init) EqualVT(thatIface isMessage_Input) bool { - that, ok := thatIface.(*Message_Init) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Init, that.Init; p != q { - if p == nil { - p = &InitMessage{} - } - if q == nil { - q = &InitMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *Message_File) EqualVT(thatIface isMessage_Input) bool { - that, ok := thatIface.(*Message_File) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.File, that.File; p != q { - if p == nil { - p = &FdMessage{} - } - if q == nil { - q = &FdMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *Message_Resize) EqualVT(thatIface isMessage_Input) bool { - that, ok := thatIface.(*Message_Resize) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Resize, that.Resize; p != q { - if p == nil { - p = &ResizeMessage{} - } - if q == nil { - q = &ResizeMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *Message_Signal) EqualVT(thatIface isMessage_Input) bool { - that, ok := thatIface.(*Message_Signal) - if !ok { - return false - } - if this == that { - return true - } - if this == nil && that != nil || this != nil && that == nil { - return false - } - if p, q := this.Signal, that.Signal; p != q { - if p == nil { - p = &SignalMessage{} - } - if q == nil { - q = &SignalMessage{} - } - if !p.EqualVT(q) { - return false - } - } - return true -} - -func (this *InitMessage) EqualVT(that *InitMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - if this.ProcessID != that.ProcessID { - return false - } - if !this.InvokeConfig.EqualVT(that.InvokeConfig) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InitMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InitMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InvokeConfig) EqualVT(that *InvokeConfig) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Entrypoint) != len(that.Entrypoint) { - return false - } - for i, vx := range this.Entrypoint { - vy := that.Entrypoint[i] - if vx != vy { - return false - } - } - if len(this.Cmd) != len(that.Cmd) { - return false - } - for i, vx := range this.Cmd { - vy := that.Cmd[i] - if vx != vy { - return false - } - } - if len(this.Env) != len(that.Env) { - return false - } - for i, vx := range this.Env { - vy := that.Env[i] - if vx != vy { - return false - } - } - if this.User != that.User { - return false - } - if this.NoUser != that.NoUser { - return false - } - if this.Cwd != that.Cwd { - return false - } - if this.NoCwd != that.NoCwd { - return false - } - if this.Tty != that.Tty { - return false - } - if this.Rollback != that.Rollback { - return false - } - if this.Initial != that.Initial { - return false - } - if this.NoCmd != that.NoCmd { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InvokeConfig) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InvokeConfig) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *FdMessage) EqualVT(that *FdMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Fd != that.Fd { - return false - } - if this.EOF != that.EOF { - return false - } - if string(this.Data) != string(that.Data) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *FdMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*FdMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *ResizeMessage) EqualVT(that *ResizeMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Rows != that.Rows { - return false - } - if this.Cols != that.Cols { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *ResizeMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*ResizeMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *SignalMessage) EqualVT(that *SignalMessage) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Name != that.Name { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *SignalMessage) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*SignalMessage) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *StatusRequest) EqualVT(that *StatusRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.SessionID != that.SessionID { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StatusRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StatusRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *StatusResponse) EqualVT(that *StatusResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if len(this.Vertexes) != len(that.Vertexes) { - return false - } - for i, vx := range this.Vertexes { - vy := that.Vertexes[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &control.Vertex{} - } - if q == nil { - q = &control.Vertex{} - } - if equal, ok := interface{}(p).(interface{ EqualVT(*control.Vertex) bool }); ok { - if !equal.EqualVT(q) { - return false - } - } else if !proto.Equal(p, q) { - return false - } - } - } - if len(this.Statuses) != len(that.Statuses) { - return false - } - for i, vx := range this.Statuses { - vy := that.Statuses[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &control.VertexStatus{} - } - if q == nil { - q = &control.VertexStatus{} - } - if equal, ok := interface{}(p).(interface { - EqualVT(*control.VertexStatus) bool - }); ok { - if !equal.EqualVT(q) { - return false - } - } else if !proto.Equal(p, q) { - return false - } - } - } - if len(this.Logs) != len(that.Logs) { - return false - } - for i, vx := range this.Logs { - vy := that.Logs[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &control.VertexLog{} - } - if q == nil { - q = &control.VertexLog{} - } - if equal, ok := interface{}(p).(interface{ EqualVT(*control.VertexLog) bool }); ok { - if !equal.EqualVT(q) { - return false - } - } else if !proto.Equal(p, q) { - return false - } - } - } - if len(this.Warnings) != len(that.Warnings) { - return false - } - for i, vx := range this.Warnings { - vy := that.Warnings[i] - if p, q := vx, vy; p != q { - if p == nil { - p = &control.VertexWarning{} - } - if q == nil { - q = &control.VertexWarning{} - } - if equal, ok := interface{}(p).(interface { - EqualVT(*control.VertexWarning) bool - }); ok { - if !equal.EqualVT(q) { - return false - } - } else if !proto.Equal(p, q) { - return false - } - } - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *StatusResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*StatusResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InfoRequest) EqualVT(that *InfoRequest) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InfoRequest) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InfoRequest) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *InfoResponse) EqualVT(that *InfoResponse) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if !this.BuildxVersion.EqualVT(that.BuildxVersion) { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *InfoResponse) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*InfoResponse) - if !ok { - return false - } - return this.EqualVT(that) -} -func (this *BuildxVersion) EqualVT(that *BuildxVersion) bool { - if this == that { - return true - } else if this == nil || that == nil { - return false - } - if this.Package != that.Package { - return false - } - if this.Version != that.Version { - return false - } - if this.Revision != that.Revision { - return false - } - return string(this.unknownFields) == string(that.unknownFields) -} - -func (this *BuildxVersion) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*BuildxVersion) - if !ok { - return false - } - return this.EqualVT(that) -} -func (m *ListProcessesRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListProcessesRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ListProcessesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListProcessesResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListProcessesResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ListProcessesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Infos) > 0 { - for iNdEx := len(m.Infos) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Infos[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ProcessInfo) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProcessInfo) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ProcessInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.InvokeConfig != nil { - size, err := m.InvokeConfig.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.ProcessID) > 0 { - i -= len(m.ProcessID) - copy(dAtA[i:], m.ProcessID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProcessID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DisconnectProcessRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DisconnectProcessRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DisconnectProcessRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ProcessID) > 0 { - i -= len(m.ProcessID) - copy(dAtA[i:], m.ProcessID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProcessID))) - i-- - dAtA[i] = 0x12 - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DisconnectProcessResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DisconnectProcessResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DisconnectProcessResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *BuildRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *BuildRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Options != nil { - size, err := m.Options.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BuildOptions) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildOptions) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *BuildOptions) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ProvenanceResponseMode) > 0 { - i -= len(m.ProvenanceResponseMode) - copy(dAtA[i:], m.ProvenanceResponseMode) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProvenanceResponseMode))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - if len(m.Annotations) > 0 { - for iNdEx := len(m.Annotations) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Annotations[iNdEx]) - copy(dAtA[i:], m.Annotations[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Annotations[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - } - if len(m.GroupRef) > 0 { - i -= len(m.GroupRef) - copy(dAtA[i:], m.GroupRef) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupRef))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(m.Ref) > 0 { - i -= len(m.Ref) - copy(dAtA[i:], m.Ref) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ref))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - if m.SourcePolicy != nil { - if vtmsg, ok := interface{}(m.SourcePolicy).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.SourcePolicy) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if m.ExportLoad { - i-- - if m.ExportLoad { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - if m.ExportPush { - i-- - if m.ExportPush { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - } - if m.Pull { - i-- - if m.Pull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if m.NoCache { - i-- - if m.NoCache { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc0 - } - if len(m.Builder) > 0 { - i -= len(m.Builder) - copy(dAtA[i:], m.Builder) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Builder))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - if m.Ulimits != nil { - size, err := m.Ulimits.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(m.Target) > 0 { - i -= len(m.Target) - copy(dAtA[i:], m.Target) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Target))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Tags[iNdEx]) - copy(dAtA[i:], m.Tags[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tags[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if len(m.SSH) > 0 { - for iNdEx := len(m.SSH) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.SSH[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - } - if m.ShmSize != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ShmSize)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Secrets[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - } - if len(m.Platforms) > 0 { - for iNdEx := len(m.Platforms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Platforms[iNdEx]) - copy(dAtA[i:], m.Platforms[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Platforms[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - } - if len(m.NoCacheFilter) > 0 { - for iNdEx := len(m.NoCacheFilter) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NoCacheFilter[iNdEx]) - copy(dAtA[i:], m.NoCacheFilter[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NoCacheFilter[iNdEx]))) - i-- - dAtA[i] = 0x7a - } - } - if len(m.NetworkMode) > 0 { - i -= len(m.NetworkMode) - copy(dAtA[i:], m.NetworkMode) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NetworkMode))) - i-- - dAtA[i] = 0x72 - } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x6a - } - } - if len(m.ExtraHosts) > 0 { - for iNdEx := len(m.ExtraHosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExtraHosts[iNdEx]) - copy(dAtA[i:], m.ExtraHosts[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExtraHosts[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(m.Exports) > 0 { - for iNdEx := len(m.Exports) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Exports[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x5a - } - } - if len(m.CgroupParent) > 0 { - i -= len(m.CgroupParent) - copy(dAtA[i:], m.CgroupParent) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CgroupParent))) - i-- - dAtA[i] = 0x52 - } - if len(m.CacheTo) > 0 { - for iNdEx := len(m.CacheTo) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CacheTo[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - } - if len(m.CacheFrom) > 0 { - for iNdEx := len(m.CacheFrom) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.CacheFrom[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - } - if len(m.BuildArgs) > 0 { - for k := range m.BuildArgs { - v := m.BuildArgs[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Attests) > 0 { - for iNdEx := len(m.Attests) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Attests[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Allow) > 0 { - for iNdEx := len(m.Allow) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Allow[iNdEx]) - copy(dAtA[i:], m.Allow[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Allow[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.NamedContexts) > 0 { - for k := range m.NamedContexts { - v := m.NamedContexts[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.CallFunc != nil { - size, err := m.CallFunc.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.DockerfileName) > 0 { - i -= len(m.DockerfileName) - copy(dAtA[i:], m.DockerfileName) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DockerfileName))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContextPath) > 0 { - i -= len(m.ContextPath) - copy(dAtA[i:], m.ContextPath) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContextPath))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExportEntry) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportEntry) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ExportEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Destination) > 0 { - i -= len(m.Destination) - copy(dAtA[i:], m.Destination) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Destination))) - i-- - dAtA[i] = 0x1a - } - if len(m.Attrs) > 0 { - for k := range m.Attrs { - v := m.Attrs[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CacheOptionsEntry) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CacheOptionsEntry) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CacheOptionsEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Attrs) > 0 { - for k := range m.Attrs { - v := m.Attrs[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Attest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Attest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Attest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Attrs) > 0 { - i -= len(m.Attrs) - copy(dAtA[i:], m.Attrs) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Attrs))) - i-- - dAtA[i] = 0x1a - } - if m.Disabled { - i-- - if m.Disabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SSH) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SSH) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *SSH) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Secret) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Secret) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Secret) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Env) > 0 { - i -= len(m.Env) - copy(dAtA[i:], m.Env) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Env))) - i-- - dAtA[i] = 0x1a - } - if len(m.FilePath) > 0 { - i -= len(m.FilePath) - copy(dAtA[i:], m.FilePath) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FilePath))) - i-- - dAtA[i] = 0x12 - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CallFunc) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CallFunc) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CallFunc) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.IgnoreStatus { - i-- - if m.IgnoreStatus { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Format) > 0 { - i -= len(m.Format) - copy(dAtA[i:], m.Format) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Format))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InspectRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InspectRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InspectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InspectResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InspectResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InspectResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Options != nil { - size, err := m.Options.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UlimitOpt) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UlimitOpt) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *UlimitOpt) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Values) > 0 { - for k := range m.Values { - v := m.Values[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Ulimit) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Ulimit) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Ulimit) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Soft != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Soft)) - i-- - dAtA[i] = 0x18 - } - if m.Hard != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Hard)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BuildResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *BuildResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ExporterResponse) > 0 { - for k := range m.ExporterResponse { - v := m.ExporterResponse[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DisconnectRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DisconnectRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DisconnectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DisconnectResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DisconnectResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DisconnectResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *ListRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ListRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ListResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keys[iNdEx]) - copy(dAtA[i:], m.Keys[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Keys[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *InputMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InputMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InputMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if vtmsg, ok := m.Input.(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - return len(dAtA) - i, nil -} - -func (m *InputMessage_Init) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InputMessage_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Init != nil { - size, err := m.Init.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *InputMessage_Data) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InputMessage_Data) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Data != nil { - size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *InputInitMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InputInitMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InputInitMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DataMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.EOF { - i-- - if m.EOF { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *InputResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InputResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InputResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *Message) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Message) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if vtmsg, ok := m.Input.(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - return len(dAtA) - i, nil -} - -func (m *Message_Init) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Message_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Init != nil { - size, err := m.Init.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Message_File) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Message_File) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.File != nil { - size, err := m.File.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Message_Resize) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Message_Resize) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Resize != nil { - size, err := m.Resize.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Message_Signal) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Message_Signal) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Signal != nil { - size, err := m.Signal.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *InitMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InitMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InitMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.InvokeConfig != nil { - size, err := m.InvokeConfig.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if len(m.ProcessID) > 0 { - i -= len(m.ProcessID) - copy(dAtA[i:], m.ProcessID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProcessID))) - i-- - dAtA[i] = 0x12 - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InvokeConfig) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InvokeConfig) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InvokeConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.NoCmd { - i-- - if m.NoCmd { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.Initial { - i-- - if m.Initial { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.Rollback { - i-- - if m.Rollback { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.Tty { - i-- - if m.Tty { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.NoCwd { - i-- - if m.NoCwd { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if len(m.Cwd) > 0 { - i -= len(m.Cwd) - copy(dAtA[i:], m.Cwd) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cwd))) - i-- - dAtA[i] = 0x32 - } - if m.NoUser { - i-- - if m.NoUser { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x22 - } - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Env[iNdEx]) - copy(dAtA[i:], m.Env[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Env[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Cmd) > 0 { - for iNdEx := len(m.Cmd) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Cmd[iNdEx]) - copy(dAtA[i:], m.Cmd[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Cmd[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Entrypoint) > 0 { - for iNdEx := len(m.Entrypoint) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Entrypoint[iNdEx]) - copy(dAtA[i:], m.Entrypoint[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Entrypoint[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FdMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FdMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *FdMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if m.EOF { - i-- - if m.EOF { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Fd != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Fd)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ResizeMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResizeMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ResizeMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Cols != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Cols)) - i-- - dAtA[i] = 0x10 - } - if m.Rows != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Rows)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SignalMessage) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignalMessage) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *SignalMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatusRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StatusRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SessionID) > 0 { - i -= len(m.SessionID) - copy(dAtA[i:], m.SessionID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SessionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatusResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Warnings) > 0 { - for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.Warnings[iNdEx]).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Warnings[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.Logs[iNdEx]).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Logs[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Statuses) > 0 { - for iNdEx := len(m.Statuses) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.Statuses[iNdEx]).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Statuses[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Vertexes) > 0 { - for iNdEx := len(m.Vertexes) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.Vertexes[iNdEx]).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Vertexes[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *InfoRequest) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InfoRequest) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *InfoResponse) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InfoResponse) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *InfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.BuildxVersion != nil { - size, err := m.BuildxVersion.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BuildxVersion) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildxVersion) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *BuildxVersion) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Revision) > 0 { - i -= len(m.Revision) - copy(dAtA[i:], m.Revision) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Revision))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Package) > 0 { - i -= len(m.Package) - copy(dAtA[i:], m.Package) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Package))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListProcessesRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ListProcessesResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Infos) > 0 { - for _, e := range m.Infos { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *ProcessInfo) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProcessID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.InvokeConfig != nil { - l = m.InvokeConfig.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DisconnectProcessRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ProcessID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DisconnectProcessResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *BuildRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Options != nil { - l = m.Options.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *BuildOptions) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContextPath) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.DockerfileName) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.CallFunc != nil { - l = m.CallFunc.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.NamedContexts) > 0 { - for k, v := range m.NamedContexts { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - if len(m.Allow) > 0 { - for _, s := range m.Allow { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Attests) > 0 { - for _, e := range m.Attests { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.BuildArgs) > 0 { - for k, v := range m.BuildArgs { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - if len(m.CacheFrom) > 0 { - for _, e := range m.CacheFrom { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.CacheTo) > 0 { - for _, e := range m.CacheTo { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.CgroupParent) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Exports) > 0 { - for _, e := range m.Exports { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.ExtraHosts) > 0 { - for _, s := range m.ExtraHosts { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.NetworkMode) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.NoCacheFilter) > 0 { - for _, s := range m.NoCacheFilter { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Platforms) > 0 { - for _, s := range m.Platforms { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.ShmSize != 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(m.ShmSize)) - } - if len(m.SSH) > 0 { - for _, e := range m.SSH { - l = e.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Target) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Ulimits != nil { - l = m.Ulimits.SizeVT() - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Builder) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.NoCache { - n += 3 - } - if m.Pull { - n += 3 - } - if m.ExportPush { - n += 3 - } - if m.ExportLoad { - n += 3 - } - if m.SourcePolicy != nil { - if size, ok := interface{}(m.SourcePolicy).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.SourcePolicy) - } - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Ref) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.GroupRef) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Annotations) > 0 { - for _, s := range m.Annotations { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.ProvenanceResponseMode) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ExportEntry) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Attrs) > 0 { - for k, v := range m.Attrs { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.Destination) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *CacheOptionsEntry) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Attrs) > 0 { - for k, v := range m.Attrs { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Attest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Disabled { - n += 2 - } - l = len(m.Attrs) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *SSH) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Secret) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.FilePath) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Env) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *CallFunc) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Format) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.IgnoreStatus { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *InspectRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *InspectResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Options != nil { - l = m.Options.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *UlimitOpt) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for k, v := range m.Values { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + protohelpers.SizeOfVarint(uint64(l)) - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Ulimit) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Hard != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Hard)) - } - if m.Soft != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Soft)) - } - n += len(m.unknownFields) - return n -} - -func (m *BuildResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ExporterResponse) > 0 { - for k, v := range m.ExporterResponse { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *DisconnectRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DisconnectResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *ListRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ListResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Keys) > 0 { - for _, s := range m.Keys { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *InputMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.Input.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() - } - n += len(m.unknownFields) - return n -} - -func (m *InputMessage_Init) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Init != nil { - l = m.Init.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *InputMessage_Data) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *InputInitMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *DataMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EOF { - n += 2 - } - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *InputResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *Message) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.Input.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() - } - n += len(m.unknownFields) - return n -} - -func (m *Message_Init) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Init != nil { - l = m.Init.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *Message_File) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.File != nil { - l = m.File.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *Message_Resize) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Resize != nil { - l = m.Resize.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *Message_Signal) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Signal != nil { - l = m.Signal.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 3 - } - return n -} -func (m *InitMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ProcessID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.InvokeConfig != nil { - l = m.InvokeConfig.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *InvokeConfig) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Entrypoint) > 0 { - for _, s := range m.Entrypoint { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Cmd) > 0 { - for _, s := range m.Cmd { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Env) > 0 { - for _, s := range m.Env { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.User) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.NoUser { - n += 2 - } - l = len(m.Cwd) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.NoCwd { - n += 2 - } - if m.Tty { - n += 2 - } - if m.Rollback { - n += 2 - } - if m.Initial { - n += 2 - } - if m.NoCmd { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *FdMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fd != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Fd)) - } - if m.EOF { - n += 2 - } - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ResizeMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Rows != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Rows)) - } - if m.Cols != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Cols)) - } - n += len(m.unknownFields) - return n -} - -func (m *SignalMessage) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *StatusRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SessionID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *StatusResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Vertexes) > 0 { - for _, e := range m.Vertexes { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Statuses) > 0 { - for _, e := range m.Statuses { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Logs) > 0 { - for _, e := range m.Logs { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Warnings) > 0 { - for _, e := range m.Warnings { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *InfoRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *InfoResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuildxVersion != nil { - l = m.BuildxVersion.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *BuildxVersion) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Package) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Revision) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ListProcessesRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListProcessesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListProcessesResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListProcessesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Infos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Infos = append(m.Infos, &ProcessInfo{}) - if err := m.Infos[len(m.Infos)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProcessInfo) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProcessInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProcessInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InvokeConfig == nil { - m.InvokeConfig = &InvokeConfig{} - } - if err := m.InvokeConfig.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DisconnectProcessRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DisconnectProcessRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DisconnectProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DisconnectProcessResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DisconnectProcessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DisconnectProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Options == nil { - m.Options = &BuildOptions{} - } - if err := m.Options.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildOptions) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContextPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerfileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerfileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallFunc", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CallFunc == nil { - m.CallFunc = &CallFunc{} - } - if err := m.CallFunc.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedContexts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamedContexts == nil { - m.NamedContexts = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NamedContexts[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allow", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Allow = append(m.Allow, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attests = append(m.Attests, &Attest{}) - if err := m.Attests[len(m.Attests)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildArgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BuildArgs == nil { - m.BuildArgs = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.BuildArgs[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CacheFrom", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CacheFrom = append(m.CacheFrom, &CacheOptionsEntry{}) - if err := m.CacheFrom[len(m.CacheFrom)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CacheTo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CacheTo = append(m.CacheTo, &CacheOptionsEntry{}) - if err := m.CacheTo[len(m.CacheTo)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CgroupParent", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CgroupParent = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exports = append(m.Exports, &ExportEntry{}) - if err := m.Exports[len(m.Exports)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtraHosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtraHosts = append(m.ExtraHosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCacheFilter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NoCacheFilter = append(m.NoCacheFilter, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Platforms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Platforms = append(m.Platforms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, &Secret{}) - if err := m.Secrets[len(m.Secrets)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShmSize", wireType) - } - m.ShmSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ShmSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SSH", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SSH = append(m.SSH, &SSH{}) - if err := m.SSH[len(m.SSH)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Target = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ulimits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ulimits == nil { - m.Ulimits = &UlimitOpt{} - } - if err := m.Ulimits.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Builder", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Builder = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 24: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCache", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoCache = bool(v != 0) - case 25: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Pull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Pull = bool(v != 0) - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportPush", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExportPush = bool(v != 0) - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportLoad", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExportLoad = bool(v != 0) - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourcePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourcePolicy == nil { - m.SourcePolicy = &pb.Policy{} - } - if unmarshal, ok := interface{}(m.SourcePolicy).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.SourcePolicy); err != nil { - return err - } - } - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ref = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupRef", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupRef = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Annotations = append(m.Annotations, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProvenanceResponseMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProvenanceResponseMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportEntry) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attrs == nil { - m.Attrs = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attrs[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Destination = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CacheOptionsEntry) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CacheOptionsEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CacheOptionsEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attrs == nil { - m.Attrs = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attrs[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Attest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Attest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Attest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Disabled = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attrs = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SSH) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SSH: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SSH: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Secret) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Secret: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CallFunc) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CallFunc: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CallFunc: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Format = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnoreStatus", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IgnoreStatus = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InspectRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InspectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InspectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InspectResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InspectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InspectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Options == nil { - m.Options = &BuildOptions{} - } - if err := m.Options.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UlimitOpt) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UlimitOpt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UlimitOpt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Values == nil { - m.Values = make(map[string]*Ulimit) - } - var mapkey string - var mapvalue *Ulimit - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Ulimit{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Values[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ulimit) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ulimit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ulimit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType) - } - m.Hard = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Hard |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Soft", wireType) - } - m.Soft = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Soft |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExporterResponse", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExporterResponse == nil { - m.ExporterResponse = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ExporterResponse[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DisconnectRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DisconnectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DisconnectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DisconnectResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DisconnectResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DisconnectResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keys = append(m.Keys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InputMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InputMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InputMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*InputMessage_Init); ok { - if err := oneof.Init.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InputInitMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &InputMessage_Init{Init: v} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*InputMessage_Data); ok { - if err := oneof.Data.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &DataMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &InputMessage_Data{Data: v} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InputInitMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InputInitMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InputInitMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EOF", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EOF = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InputResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InputResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InputResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Message) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Message: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*Message_Init); ok { - if err := oneof.Init.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &InitMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &Message_Init{Init: v} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field File", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*Message_File); ok { - if err := oneof.File.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &FdMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &Message_File{File: v} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*Message_Resize); ok { - if err := oneof.Resize.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &ResizeMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &Message_Resize{Resize: v} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.Input.(*Message_Signal); ok { - if err := oneof.Signal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &SignalMessage{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Input = &Message_Signal{Signal: v} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InitMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InitMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InitMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InvokeConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InvokeConfig == nil { - m.InvokeConfig = &InvokeConfig{} - } - if err := m.InvokeConfig.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InvokeConfig) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InvokeConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InvokeConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entrypoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entrypoint = append(m.Entrypoint, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cmd = append(m.Cmd, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoUser", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoUser = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cwd", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cwd = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCwd", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoCwd = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Tty = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rollback", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Rollback = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Initial", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Initial = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCmd", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoCmd = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FdMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FdMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FdMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fd", wireType) - } - m.Fd = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Fd |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EOF", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EOF = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResizeMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResizeMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rows", wireType) - } - m.Rows = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Rows |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cols", wireType) - } - m.Cols = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Cols |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignalMessage) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignalMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignalMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SessionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vertexes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vertexes = append(m.Vertexes, &control.Vertex{}) - if unmarshal, ok := interface{}(m.Vertexes[len(m.Vertexes)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Vertexes[len(m.Vertexes)-1]); err != nil { - return err - } - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Statuses = append(m.Statuses, &control.VertexStatus{}) - if unmarshal, ok := interface{}(m.Statuses[len(m.Statuses)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Statuses[len(m.Statuses)-1]); err != nil { - return err - } - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Logs = append(m.Logs, &control.VertexLog{}) - if unmarshal, ok := interface{}(m.Logs[len(m.Logs)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Logs[len(m.Logs)-1]); err != nil { - return err - } - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Warnings = append(m.Warnings, &control.VertexWarning{}) - if unmarshal, ok := interface{}(m.Warnings[len(m.Warnings)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Warnings[len(m.Warnings)-1]); err != nil { - return err - } - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InfoRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InfoResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildxVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BuildxVersion == nil { - m.BuildxVersion = &BuildxVersion{} - } - if err := m.BuildxVersion.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildxVersion) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildxVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildxVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Package", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Package = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Revision = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/controller/pb/export.go b/controller/pb/export.go index c7eef8c9..9842fed7 100644 --- a/controller/pb/export.go +++ b/controller/pb/export.go @@ -11,6 +11,12 @@ import ( "github.com/pkg/errors" ) +type ExportEntry struct { + Type string + Attrs map[string]string + Destination string +} + func CreateExports(entries []*ExportEntry) ([]client.ExportEntry, []string, error) { var outs []client.ExportEntry var localPaths []string diff --git a/controller/pb/invoke.go b/controller/pb/invoke.go new file mode 100644 index 00000000..76839cc9 --- /dev/null +++ b/controller/pb/invoke.go @@ -0,0 +1,40 @@ +package pb + +import ( + "fmt" + "strings" +) + +type CallFunc struct { + Name string + Format string + IgnoreStatus bool +} + +func (x *CallFunc) String() string { + var elems []string + if x.Name != "" { + elems = append(elems, fmt.Sprintf("Name:%q", x.Name)) + } + if x.Format != "" { + elems = append(elems, fmt.Sprintf("Format:%q", x.Format)) + } + if x.IgnoreStatus { + elems = append(elems, fmt.Sprintf("IgnoreStatus:%v", x.IgnoreStatus)) + } + return strings.Join(elems, " ") +} + +type InvokeConfig struct { + Entrypoint []string + Cmd []string + NoCmd bool + Env []string + User string + NoUser bool + Cwd string + NoCwd bool + Tty bool + Rollback bool + Initial bool +} diff --git a/controller/pb/progress.go b/controller/pb/progress.go deleted file mode 100644 index 02a98e8d..00000000 --- a/controller/pb/progress.go +++ /dev/null @@ -1,162 +0,0 @@ -package pb - -import ( - "time" - - "github.com/docker/buildx/util/progress" - control "github.com/moby/buildkit/api/services/control" - "github.com/moby/buildkit/client" - "github.com/opencontainers/go-digest" - "google.golang.org/protobuf/types/known/timestamppb" -) - -type writer struct { - ch chan<- *StatusResponse -} - -func NewProgressWriter(ch chan<- *StatusResponse) progress.Writer { - return &writer{ch: ch} -} - -func (w *writer) Write(status *client.SolveStatus) { - w.ch <- ToControlStatus(status) -} - -func (w *writer) WriteBuildRef(target string, ref string) {} - -func (w *writer) ValidateLogSource(digest.Digest, any) bool { - return true -} - -func (w *writer) ClearLogSource(any) {} - -func ToControlStatus(s *client.SolveStatus) *StatusResponse { - resp := StatusResponse{} - for _, v := range s.Vertexes { - resp.Vertexes = append(resp.Vertexes, &control.Vertex{ - Digest: string(v.Digest), - Inputs: digestSliceToPB(v.Inputs), - Name: v.Name, - Started: timestampToPB(v.Started), - Completed: timestampToPB(v.Completed), - Error: v.Error, - Cached: v.Cached, - ProgressGroup: v.ProgressGroup, - }) - } - for _, v := range s.Statuses { - resp.Statuses = append(resp.Statuses, &control.VertexStatus{ - ID: v.ID, - Vertex: string(v.Vertex), - Name: v.Name, - Total: v.Total, - Current: v.Current, - Timestamp: timestamppb.New(v.Timestamp), - Started: timestampToPB(v.Started), - Completed: timestampToPB(v.Completed), - }) - } - for _, v := range s.Logs { - resp.Logs = append(resp.Logs, &control.VertexLog{ - Vertex: string(v.Vertex), - Stream: int64(v.Stream), - Msg: v.Data, - Timestamp: timestamppb.New(v.Timestamp), - }) - } - for _, v := range s.Warnings { - resp.Warnings = append(resp.Warnings, &control.VertexWarning{ - Vertex: string(v.Vertex), - Level: int64(v.Level), - Short: v.Short, - Detail: v.Detail, - Url: v.URL, - Info: v.SourceInfo, - Ranges: v.Range, - }) - } - return &resp -} - -func FromControlStatus(resp *StatusResponse) *client.SolveStatus { - s := client.SolveStatus{} - for _, v := range resp.Vertexes { - s.Vertexes = append(s.Vertexes, &client.Vertex{ - Digest: digest.Digest(v.Digest), - Inputs: digestSliceFromPB(v.Inputs), - Name: v.Name, - Started: timestampFromPB(v.Started), - Completed: timestampFromPB(v.Completed), - Error: v.Error, - Cached: v.Cached, - ProgressGroup: v.ProgressGroup, - }) - } - for _, v := range resp.Statuses { - s.Statuses = append(s.Statuses, &client.VertexStatus{ - ID: v.ID, - Vertex: digest.Digest(v.Vertex), - Name: v.Name, - Total: v.Total, - Current: v.Current, - Timestamp: v.Timestamp.AsTime(), - Started: timestampFromPB(v.Started), - Completed: timestampFromPB(v.Completed), - }) - } - for _, v := range resp.Logs { - s.Logs = append(s.Logs, &client.VertexLog{ - Vertex: digest.Digest(v.Vertex), - Stream: int(v.Stream), - Data: v.Msg, - Timestamp: v.Timestamp.AsTime(), - }) - } - for _, v := range resp.Warnings { - s.Warnings = append(s.Warnings, &client.VertexWarning{ - Vertex: digest.Digest(v.Vertex), - Level: int(v.Level), - Short: v.Short, - Detail: v.Detail, - URL: v.Url, - SourceInfo: v.Info, - Range: v.Ranges, - }) - } - return &s -} - -func timestampFromPB(ts *timestamppb.Timestamp) *time.Time { - if ts == nil { - return nil - } - - t := ts.AsTime() - if t.IsZero() { - return nil - } - return &t -} - -func timestampToPB(ts *time.Time) *timestamppb.Timestamp { - if ts == nil { - return nil - } - return timestamppb.New(*ts) -} - -func digestSliceFromPB(elems []string) []digest.Digest { - clone := make([]digest.Digest, len(elems)) - for i, e := range elems { - clone[i] = digest.Digest(e) - } - return clone -} - -func digestSliceToPB(elems []digest.Digest) []string { - clone := make([]string, len(elems)) - for i, e := range elems { - clone[i] = string(e) - } - return clone -} diff --git a/controller/pb/secrets.go b/controller/pb/secrets.go index c85b55d1..f58583f6 100644 --- a/controller/pb/secrets.go +++ b/controller/pb/secrets.go @@ -5,6 +5,12 @@ import ( "github.com/moby/buildkit/session/secrets/secretsprovider" ) +type Secret struct { + ID string + FilePath string + Env string +} + func CreateSecrets(secrets []*Secret) (session.Attachable, error) { fs := make([]secretsprovider.Source, 0, len(secrets)) for _, secret := range secrets { diff --git a/controller/pb/ssh.go b/controller/pb/ssh.go index 6ce1ca1f..5b91cf9e 100644 --- a/controller/pb/ssh.go +++ b/controller/pb/ssh.go @@ -7,6 +7,11 @@ import ( "github.com/moby/buildkit/session/sshforward/sshprovider" ) +type SSH struct { + ID string + Paths []string +} + func CreateSSH(ssh []*SSH) (session.Attachable, error) { configs := make([]sshprovider.AgentConfig, 0, len(ssh)) for _, ssh := range ssh { diff --git a/controller/pb/ulimit.go b/controller/pb/ulimit.go new file mode 100644 index 00000000..35e068da --- /dev/null +++ b/controller/pb/ulimit.go @@ -0,0 +1,11 @@ +package pb + +type UlimitOpt struct { + Values map[string]*Ulimit +} + +type Ulimit struct { + Name string + Hard int64 + Soft int64 +} diff --git a/controller/processes/processes.go b/controller/processes/processes.go index dee82d84..28879be2 100644 --- a/controller/processes/processes.go +++ b/controller/processes/processes.go @@ -73,9 +73,9 @@ func (m *Manager) CancelRunningProcesses() { } // ListProcesses lists all running processes. -func (m *Manager) ListProcesses() (res []*pb.ProcessInfo) { +func (m *Manager) ListProcesses() (res []*ProcessInfo) { m.processes.Range(func(key, value any) bool { - res = append(res, &pb.ProcessInfo{ + res = append(res, &ProcessInfo{ ProcessID: key.(string), InvokeConfig: value.(*Process).invokeConfig, }) @@ -154,3 +154,8 @@ func (m *Manager) StartProcess(pid string, resultCtx *build.ResultHandle, cfg *p return p, nil } + +type ProcessInfo struct { + ProcessID string + InvokeConfig *pb.InvokeConfig +} diff --git a/controller/remote/client.go b/controller/remote/client.go deleted file mode 100644 index 5e3baea6..00000000 --- a/controller/remote/client.go +++ /dev/null @@ -1,243 +0,0 @@ -package remote - -import ( - "context" - "io" - "sync" - "time" - - "github.com/containerd/containerd/v2/defaults" - "github.com/containerd/containerd/v2/pkg/dialer" - "github.com/docker/buildx/build" - "github.com/docker/buildx/controller/pb" - "github.com/docker/buildx/util/progress" - "github.com/moby/buildkit/client" - "github.com/moby/buildkit/identity" - "github.com/moby/buildkit/util/grpcerrors" - "github.com/pkg/errors" - "golang.org/x/sync/errgroup" - "google.golang.org/grpc" - "google.golang.org/grpc/backoff" - "google.golang.org/grpc/credentials/insecure" -) - -func NewClient(ctx context.Context, addr string) (*Client, error) { - backoffConfig := backoff.DefaultConfig - backoffConfig.MaxDelay = 3 * time.Second - connParams := grpc.ConnectParams{ - Backoff: backoffConfig, - } - gopts := []grpc.DialOption{ - //nolint:staticcheck // ignore SA1019: WithBlock is deprecated and does not work with NewClient. - grpc.WithBlock(), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithConnectParams(connParams), - grpc.WithContextDialer(dialer.ContextDialer), - grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize)), - grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize)), - grpc.WithUnaryInterceptor(grpcerrors.UnaryClientInterceptor), - grpc.WithStreamInterceptor(grpcerrors.StreamClientInterceptor), - } - //nolint:staticcheck // ignore SA1019: Recommended NewClient has different behavior from DialContext. - conn, err := grpc.DialContext(ctx, dialer.DialAddress(addr), gopts...) - if err != nil { - return nil, err - } - return &Client{conn: conn}, nil -} - -type Client struct { - conn *grpc.ClientConn - closeOnce sync.Once -} - -func (c *Client) Close() (err error) { - c.closeOnce.Do(func() { - err = c.conn.Close() - }) - return -} - -func (c *Client) Version(ctx context.Context) (string, string, string, error) { - res, err := c.client().Info(ctx, &pb.InfoRequest{}) - if err != nil { - return "", "", "", err - } - v := res.BuildxVersion - return v.Package, v.Version, v.Revision, nil -} - -func (c *Client) List(ctx context.Context) (keys []string, retErr error) { - res, err := c.client().List(ctx, &pb.ListRequest{}) - if err != nil { - return nil, err - } - return res.Keys, nil -} - -func (c *Client) Disconnect(ctx context.Context, sessionID string) error { - if sessionID == "" { - return nil - } - _, err := c.client().Disconnect(ctx, &pb.DisconnectRequest{SessionID: sessionID}) - return err -} - -func (c *Client) ListProcesses(ctx context.Context, sessionID string) (infos []*pb.ProcessInfo, retErr error) { - res, err := c.client().ListProcesses(ctx, &pb.ListProcessesRequest{SessionID: sessionID}) - if err != nil { - return nil, err - } - return res.Infos, nil -} - -func (c *Client) DisconnectProcess(ctx context.Context, sessionID, pid string) error { - _, err := c.client().DisconnectProcess(ctx, &pb.DisconnectProcessRequest{SessionID: sessionID, ProcessID: pid}) - return err -} - -func (c *Client) Invoke(ctx context.Context, sessionID string, pid string, invokeConfig *pb.InvokeConfig, in io.ReadCloser, stdout io.WriteCloser, stderr io.WriteCloser) error { - if sessionID == "" || pid == "" { - return errors.New("build session ID must be specified") - } - stream, err := c.client().Invoke(ctx) - if err != nil { - return err - } - return attachIO(ctx, stream, &pb.InitMessage{SessionID: sessionID, ProcessID: pid, InvokeConfig: invokeConfig}, ioAttachConfig{ - stdin: in, - stdout: stdout, - stderr: stderr, - // TODO: Signal, Resize - }) -} - -func (c *Client) Inspect(ctx context.Context, sessionID string) (*pb.InspectResponse, error) { - return c.client().Inspect(ctx, &pb.InspectRequest{SessionID: sessionID}) -} - -func (c *Client) Build(ctx context.Context, options *pb.BuildOptions, in io.ReadCloser, progress progress.Writer) (string, *client.SolveResponse, *build.Inputs, error) { - ref := identity.NewID() - statusChan := make(chan *client.SolveStatus) - eg, egCtx := errgroup.WithContext(ctx) - var resp *client.SolveResponse - eg.Go(func() error { - defer close(statusChan) - var err error - resp, err = c.build(egCtx, ref, options, in, statusChan) - return err - }) - eg.Go(func() error { - for s := range statusChan { - st := s - progress.Write(st) - } - return nil - }) - return ref, resp, nil, eg.Wait() -} - -func (c *Client) build(ctx context.Context, sessionID string, options *pb.BuildOptions, in io.ReadCloser, statusChan chan *client.SolveStatus) (*client.SolveResponse, error) { - eg, egCtx := errgroup.WithContext(ctx) - done := make(chan struct{}) - - var resp *client.SolveResponse - - eg.Go(func() error { - defer close(done) - pbResp, err := c.client().Build(egCtx, &pb.BuildRequest{ - SessionID: sessionID, - Options: options, - }) - if err != nil { - return err - } - resp = &client.SolveResponse{ - ExporterResponse: pbResp.ExporterResponse, - } - return nil - }) - eg.Go(func() error { - stream, err := c.client().Status(egCtx, &pb.StatusRequest{ - SessionID: sessionID, - }) - if err != nil { - return err - } - for { - resp, err := stream.Recv() - if err != nil { - if err == io.EOF { - return nil - } - return errors.Wrap(err, "failed to receive status") - } - statusChan <- pb.FromControlStatus(resp) - } - }) - if in != nil { - eg.Go(func() error { - stream, err := c.client().Input(egCtx) - if err != nil { - return err - } - if err := stream.Send(&pb.InputMessage{ - Input: &pb.InputMessage_Init{ - Init: &pb.InputInitMessage{ - SessionID: sessionID, - }, - }, - }); err != nil { - return errors.Wrap(err, "failed to init input") - } - - inReader, inWriter := io.Pipe() - eg2, _ := errgroup.WithContext(ctx) - eg2.Go(func() error { - <-done - return inWriter.Close() - }) - go func() { - // do not wait for read completion but return here and let the caller send EOF - // this allows us to return on ctx.Done() without being blocked by this reader. - io.Copy(inWriter, in) - inWriter.Close() - }() - eg2.Go(func() error { - for { - buf := make([]byte, 32*1024) - n, err := inReader.Read(buf) - if err != nil { - if err == io.EOF { - break // break loop and send EOF - } - return err - } else if n > 0 { - if err := stream.Send(&pb.InputMessage{ - Input: &pb.InputMessage_Data{ - Data: &pb.DataMessage{ - Data: buf[:n], - }, - }, - }); err != nil { - return err - } - } - } - return stream.Send(&pb.InputMessage{ - Input: &pb.InputMessage_Data{ - Data: &pb.DataMessage{ - EOF: true, - }, - }, - }) - }) - return eg2.Wait() - }) - } - return resp, eg.Wait() -} - -func (c *Client) client() pb.ControllerClient { - return pb.NewControllerClient(c.conn) -} diff --git a/controller/remote/controller.go b/controller/remote/controller.go deleted file mode 100644 index c0914d18..00000000 --- a/controller/remote/controller.go +++ /dev/null @@ -1,335 +0,0 @@ -//go:build linux - -package remote - -import ( - "context" - "fmt" - "io" - "net" - "os" - "os/exec" - "os/signal" - "path/filepath" - "strconv" - "syscall" - "time" - - "github.com/containerd/log" - "github.com/docker/buildx/build" - cbuild "github.com/docker/buildx/controller/build" - "github.com/docker/buildx/controller/control" - controllerapi "github.com/docker/buildx/controller/pb" - "github.com/docker/buildx/util/confutil" - "github.com/docker/buildx/util/progress" - "github.com/docker/buildx/version" - "github.com/docker/cli/cli/command" - "github.com/moby/buildkit/client" - "github.com/moby/buildkit/util/grpcerrors" - "github.com/pelletier/go-toml" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "github.com/spf13/cobra" - "google.golang.org/grpc" -) - -const ( - serveCommandName = "_INTERNAL_SERVE" -) - -var ( - defaultLogFilename = fmt.Sprintf("buildx.%s.log", version.Revision) - defaultSocketFilename = fmt.Sprintf("buildx.%s.sock", version.Revision) - defaultPIDFilename = fmt.Sprintf("buildx.%s.pid", version.Revision) -) - -type serverConfig struct { - // Specify buildx server root - Root string `toml:"root"` - - // LogLevel sets the logging level [trace, debug, info, warn, error, fatal, panic] - LogLevel string `toml:"log_level"` - - // Specify file to output buildx server log - LogFile string `toml:"log_file"` -} - -func NewRemoteBuildxController(ctx context.Context, dockerCli command.Cli, opts control.ControlOptions, logger progress.SubLogger) (control.BuildxController, error) { - rootDir := opts.Root - if rootDir == "" { - rootDir = rootDataDir(dockerCli) - } - serverRoot := filepath.Join(rootDir, "shared") - - // connect to buildx server if it is already running - ctx2, cancel := context.WithCancelCause(ctx) - ctx2, _ = context.WithTimeoutCause(ctx2, 1*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent - c, err := newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename)) - cancel(errors.WithStack(context.Canceled)) - if err != nil { - if !errors.Is(err, context.DeadlineExceeded) { - return nil, errors.Wrap(err, "cannot connect to the buildx server") - } - } else { - return &buildxController{c, serverRoot}, nil - } - - // start buildx server via subcommand - err = logger.Wrap("no buildx server found; launching...", func() error { - launchFlags := []string{} - if opts.ServerConfig != "" { - launchFlags = append(launchFlags, "--config", opts.ServerConfig) - } - logFile, err := getLogFilePath(dockerCli, opts.ServerConfig) - if err != nil { - return err - } - wait, err := launch(ctx, logFile, append([]string{serveCommandName}, launchFlags...)...) - if err != nil { - return err - } - go wait() - - // wait for buildx server to be ready - ctx2, cancel = context.WithCancelCause(ctx) - ctx2, _ = context.WithTimeoutCause(ctx2, 10*time.Second, errors.WithStack(context.DeadlineExceeded)) //nolint:govet,lostcancel // no need to manually cancel this context as we already rely on parent - c, err = newBuildxClientAndCheck(ctx2, filepath.Join(serverRoot, defaultSocketFilename)) - cancel(errors.WithStack(context.Canceled)) - if err != nil { - return errors.Wrap(err, "cannot connect to the buildx server") - } - return nil - }) - if err != nil { - return nil, err - } - return &buildxController{c, serverRoot}, nil -} - -func AddControllerCommands(cmd *cobra.Command, dockerCli command.Cli) { - cmd.AddCommand( - serveCmd(dockerCli), - ) -} - -func serveCmd(dockerCli command.Cli) *cobra.Command { - var serverConfigPath string - cmd := &cobra.Command{ - Use: fmt.Sprintf("%s [OPTIONS]", serveCommandName), - Hidden: true, - RunE: func(cmd *cobra.Command, args []string) error { - // Parse config - config, err := getConfig(dockerCli, serverConfigPath) - if err != nil { - return err - } - if config.LogLevel == "" { - logrus.SetLevel(logrus.InfoLevel) - } else { - lvl, err := logrus.ParseLevel(config.LogLevel) - if err != nil { - return errors.Wrap(err, "failed to prepare logger") - } - logrus.SetLevel(lvl) - } - logrus.SetFormatter(&logrus.JSONFormatter{ - TimestampFormat: log.RFC3339NanoFixed, - }) - root, err := prepareRootDir(dockerCli, config) - if err != nil { - return err - } - pidF := filepath.Join(root, defaultPIDFilename) - if err := os.WriteFile(pidF, fmt.Appendf(nil, "%d", os.Getpid()), 0600); err != nil { - return err - } - defer func() { - if err := os.Remove(pidF); err != nil { - logrus.Errorf("failed to clean up info file %q: %v", pidF, err) - } - }() - - // prepare server - b := NewServer(func(ctx context.Context, options *controllerapi.BuildOptions, stdin io.Reader, progress progress.Writer) (*client.SolveResponse, *build.ResultHandle, *build.Inputs, error) { - return cbuild.RunBuild(ctx, dockerCli, options, stdin, progress, true) - }) - defer b.Close() - - // serve server - addr := filepath.Join(root, defaultSocketFilename) - if err := os.Remove(addr); err != nil && !os.IsNotExist(err) { // avoid EADDRINUSE - return err - } - defer func() { - if err := os.Remove(addr); err != nil { - logrus.Errorf("failed to clean up socket %q: %v", addr, err) - } - }() - logrus.Infof("starting server at %q", addr) - l, err := net.Listen("unix", addr) - if err != nil { - return err - } - rpc := grpc.NewServer( - grpc.UnaryInterceptor(grpcerrors.UnaryServerInterceptor), - grpc.StreamInterceptor(grpcerrors.StreamServerInterceptor), - ) - controllerapi.RegisterControllerServer(rpc, b) - doneCh := make(chan struct{}) - errCh := make(chan error, 1) - go func() { - defer close(doneCh) - if err := rpc.Serve(l); err != nil { - errCh <- errors.Wrapf(err, "error on serving via socket %q", addr) - } - }() - - var s os.Signal - sigCh := make(chan os.Signal, 1) - signal.Notify(sigCh, syscall.SIGINT) - signal.Notify(sigCh, syscall.SIGTERM) - select { - case err := <-errCh: - logrus.Errorf("got error %s, exiting", err) - return err - case s = <-sigCh: - logrus.Infof("got signal %s, exiting", s) - return nil - case <-doneCh: - logrus.Infof("rpc server done, exiting") - return nil - } - }, - } - - flags := cmd.Flags() - flags.StringVar(&serverConfigPath, "config", "", "Specify buildx server config file") - return cmd -} - -func getLogFilePath(dockerCli command.Cli, configPath string) (string, error) { - config, err := getConfig(dockerCli, configPath) - if err != nil { - return "", err - } - if config.LogFile == "" { - root, err := prepareRootDir(dockerCli, config) - if err != nil { - return "", err - } - return filepath.Join(root, defaultLogFilename), nil - } - return config.LogFile, nil -} - -func getConfig(dockerCli command.Cli, configPath string) (*serverConfig, error) { - var defaultConfigPath bool - if configPath == "" { - defaultRoot := rootDataDir(dockerCli) - configPath = filepath.Join(defaultRoot, "config.toml") - defaultConfigPath = true - } - var config serverConfig - tree, err := toml.LoadFile(configPath) - if err != nil && !(os.IsNotExist(err) && defaultConfigPath) { - return nil, errors.Wrapf(err, "failed to read config %q", configPath) - } else if err == nil { - if err := tree.Unmarshal(&config); err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal config %q", configPath) - } - } - return &config, nil -} - -func prepareRootDir(dockerCli command.Cli, config *serverConfig) (string, error) { - rootDir := config.Root - if rootDir == "" { - rootDir = rootDataDir(dockerCli) - } - if rootDir == "" { - return "", errors.New("buildx root dir must be determined") - } - if err := os.MkdirAll(rootDir, 0700); err != nil { - return "", err - } - serverRoot := filepath.Join(rootDir, "shared") - if err := os.MkdirAll(serverRoot, 0700); err != nil { - return "", err - } - return serverRoot, nil -} - -func rootDataDir(dockerCli command.Cli) string { - return filepath.Join(confutil.NewConfig(dockerCli).Dir(), "controller") -} - -func newBuildxClientAndCheck(ctx context.Context, addr string) (*Client, error) { - c, err := NewClient(ctx, addr) - if err != nil { - return nil, err - } - p, v, r, err := c.Version(ctx) - if err != nil { - return nil, err - } - logrus.Debugf("connected to server (\"%v %v %v\")", p, v, r) - if !(p == version.Package && v == version.Version && r == version.Revision) { - return nil, errors.Errorf("version mismatch (client: \"%v %v %v\", server: \"%v %v %v\")", version.Package, version.Version, version.Revision, p, v, r) - } - return c, nil -} - -type buildxController struct { - *Client - serverRoot string -} - -func (c *buildxController) Kill(ctx context.Context) error { - pidB, err := os.ReadFile(filepath.Join(c.serverRoot, defaultPIDFilename)) - if err != nil { - return err - } - pid, err := strconv.ParseInt(string(pidB), 10, 64) - if err != nil { - return err - } - if pid <= 0 { - return errors.New("no PID is recorded for buildx server") - } - p, err := os.FindProcess(int(pid)) - if err != nil { - return err - } - if err := p.Signal(syscall.SIGINT); err != nil { - return err - } - // TODO: Should we send SIGKILL if process doesn't finish? - return nil -} - -func launch(ctx context.Context, logFile string, args ...string) (func() error, error) { - // set absolute path of binary, since we set the working directory to the root - pathname, err := os.Executable() - if err != nil { - return nil, err - } - bCmd := exec.CommandContext(ctx, pathname, args...) - if logFile != "" { - f, err := os.OpenFile(logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) - if err != nil { - return nil, err - } - defer f.Close() - bCmd.Stdout = f - bCmd.Stderr = f - } - bCmd.Stdin = nil - bCmd.Dir = "/" - bCmd.SysProcAttr = &syscall.SysProcAttr{ - Setsid: true, - } - if err := bCmd.Start(); err != nil { - return nil, err - } - return bCmd.Wait, nil -} diff --git a/controller/remote/controller_nolinux.go b/controller/remote/controller_nolinux.go deleted file mode 100644 index 07c1c3b2..00000000 --- a/controller/remote/controller_nolinux.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build !linux - -package remote - -import ( - "context" - - "github.com/docker/buildx/controller/control" - "github.com/docker/buildx/util/progress" - "github.com/docker/cli/cli/command" - "github.com/pkg/errors" - "github.com/spf13/cobra" -) - -func NewRemoteBuildxController(ctx context.Context, dockerCli command.Cli, opts control.ControlOptions, logger progress.SubLogger) (control.BuildxController, error) { - return nil, errors.New("remote buildx unsupported") -} - -func AddControllerCommands(cmd *cobra.Command, dockerCli command.Cli) {} diff --git a/controller/remote/io.go b/controller/remote/io.go deleted file mode 100644 index 8685a772..00000000 --- a/controller/remote/io.go +++ /dev/null @@ -1,430 +0,0 @@ -package remote - -import ( - "context" - "io" - "syscall" - "time" - - "github.com/docker/buildx/controller/pb" - "github.com/moby/sys/signal" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "golang.org/x/sync/errgroup" -) - -type msgStream interface { - Send(*pb.Message) error - Recv() (*pb.Message, error) -} - -type ioServerConfig struct { - stdin io.WriteCloser - stdout, stderr io.ReadCloser - - // signalFn is a callback function called when a signal is reached to the client. - signalFn func(context.Context, syscall.Signal) error - - // resizeFn is a callback function called when a resize event is reached to the client. - resizeFn func(context.Context, winSize) error -} - -func serveIO(attachCtx context.Context, srv msgStream, initFn func(*pb.InitMessage) error, ioConfig *ioServerConfig) (err error) { - stdin, stdout, stderr := ioConfig.stdin, ioConfig.stdout, ioConfig.stderr - stream := &debugStream{srv, "server=" + time.Now().String()} - eg, ctx := errgroup.WithContext(attachCtx) - done := make(chan struct{}) - - msg, err := receive(ctx, stream) - if err != nil { - return err - } - init := msg.GetInit() - if init == nil { - return errors.Errorf("unexpected message: %T; wanted init", msg.GetInput()) - } - sessionID := init.SessionID - if sessionID == "" { - return errors.New("no session ID is provided") - } - if err := initFn(init); err != nil { - return errors.Wrap(err, "failed to initialize IO server") - } - - if stdout != nil { - stdoutReader, stdoutWriter := io.Pipe() - eg.Go(func() error { - <-done - return stdoutWriter.Close() - }) - - go func() { - // do not wait for read completion but return here and let the caller send EOF - // this allows us to return on ctx.Done() without being blocked by this reader. - io.Copy(stdoutWriter, stdout) - stdoutWriter.Close() - }() - - eg.Go(func() error { - defer stdoutReader.Close() - return copyToStream(1, stream, stdoutReader) - }) - } - - if stderr != nil { - stderrReader, stderrWriter := io.Pipe() - eg.Go(func() error { - <-done - return stderrWriter.Close() - }) - - go func() { - // do not wait for read completion but return here and let the caller send EOF - // this allows us to return on ctx.Done() without being blocked by this reader. - io.Copy(stderrWriter, stderr) - stderrWriter.Close() - }() - - eg.Go(func() error { - defer stderrReader.Close() - return copyToStream(2, stream, stderrReader) - }) - } - - msgCh := make(chan *pb.Message) - eg.Go(func() error { - defer close(msgCh) - for { - msg, err := receive(ctx, stream) - if err != nil { - return err - } - select { - case msgCh <- msg: - case <-done: - return nil - case <-ctx.Done(): - return nil - } - } - }) - - eg.Go(func() error { - defer close(done) - for { - var msg *pb.Message - select { - case msg = <-msgCh: - case <-ctx.Done(): - return nil - } - if msg == nil { - return nil - } - if file := msg.GetFile(); file != nil { - if file.Fd != 0 { - return errors.Errorf("unexpected fd: %v", file.Fd) - } - if stdin == nil { - continue // no stdin destination is specified so ignore the data - } - if len(file.Data) > 0 { - _, err := stdin.Write(file.Data) - if err != nil { - return err - } - } - if file.EOF { - stdin.Close() - } - } else if resize := msg.GetResize(); resize != nil { - if ioConfig.resizeFn != nil { - ioConfig.resizeFn(ctx, winSize{ - cols: resize.Cols, - rows: resize.Rows, - }) - } - } else if sig := msg.GetSignal(); sig != nil { - if ioConfig.signalFn != nil { - syscallSignal, ok := signal.SignalMap[sig.Name] - if !ok { - continue - } - ioConfig.signalFn(ctx, syscallSignal) - } - } else { - return errors.Errorf("unexpected message: %T", msg.GetInput()) - } - } - }) - - return eg.Wait() -} - -type ioAttachConfig struct { - stdin io.ReadCloser - stdout, stderr io.WriteCloser - signal <-chan syscall.Signal - resize <-chan winSize -} - -type winSize struct { - rows uint32 - cols uint32 -} - -func attachIO(ctx context.Context, stream msgStream, initMessage *pb.InitMessage, cfg ioAttachConfig) (retErr error) { - eg, ctx := errgroup.WithContext(ctx) - done := make(chan struct{}) - - if err := stream.Send(&pb.Message{ - Input: &pb.Message_Init{ - Init: initMessage, - }, - }); err != nil { - return errors.Wrap(err, "failed to init") - } - - if cfg.stdin != nil { - stdinReader, stdinWriter := io.Pipe() - eg.Go(func() error { - <-done - return stdinWriter.Close() - }) - - go func() { - // do not wait for read completion but return here and let the caller send EOF - // this allows us to return on ctx.Done() without being blocked by this reader. - io.Copy(stdinWriter, cfg.stdin) - stdinWriter.Close() - }() - - eg.Go(func() error { - defer stdinReader.Close() - return copyToStream(0, stream, stdinReader) - }) - } - - if cfg.signal != nil { - eg.Go(func() error { - names := signalNames() - for { - var sig syscall.Signal - select { - case sig = <-cfg.signal: - case <-done: - return nil - case <-ctx.Done(): - return nil - } - name := names[sig] - if name == "" { - continue - } - if err := stream.Send(&pb.Message{ - Input: &pb.Message_Signal{ - Signal: &pb.SignalMessage{ - Name: name, - }, - }, - }); err != nil { - return errors.Wrap(err, "failed to send signal") - } - } - }) - } - - if cfg.resize != nil { - eg.Go(func() error { - for { - var win winSize - select { - case win = <-cfg.resize: - case <-done: - return nil - case <-ctx.Done(): - return nil - } - if err := stream.Send(&pb.Message{ - Input: &pb.Message_Resize{ - Resize: &pb.ResizeMessage{ - Rows: win.rows, - Cols: win.cols, - }, - }, - }); err != nil { - return errors.Wrap(err, "failed to send resize") - } - } - }) - } - - msgCh := make(chan *pb.Message) - eg.Go(func() error { - defer close(msgCh) - for { - msg, err := receive(ctx, stream) - if err != nil { - return err - } - select { - case msgCh <- msg: - case <-done: - return nil - case <-ctx.Done(): - return nil - } - } - }) - - eg.Go(func() error { - eofs := make(map[uint32]struct{}) - defer close(done) - for { - var msg *pb.Message - select { - case msg = <-msgCh: - case <-ctx.Done(): - return nil - } - if msg == nil { - return nil - } - if file := msg.GetFile(); file != nil { - if _, ok := eofs[file.Fd]; ok { - continue - } - var out io.WriteCloser - switch file.Fd { - case 1: - out = cfg.stdout - case 2: - out = cfg.stderr - default: - return errors.Errorf("unsupported fd %d", file.Fd) - } - if out == nil { - logrus.Warnf("attachIO: no writer for fd %d", file.Fd) - continue - } - if len(file.Data) > 0 { - if _, err := out.Write(file.Data); err != nil { - return err - } - } - if file.EOF { - eofs[file.Fd] = struct{}{} - } - } else { - return errors.Errorf("unexpected message: %T", msg.GetInput()) - } - } - }) - - return eg.Wait() -} - -func receive(ctx context.Context, stream msgStream) (*pb.Message, error) { - msgCh := make(chan *pb.Message) - errCh := make(chan error) - go func() { - msg, err := stream.Recv() - if err != nil { - if errors.Is(err, io.EOF) { - return - } - errCh <- err - return - } - msgCh <- msg - }() - select { - case msg := <-msgCh: - return msg, nil - case err := <-errCh: - return nil, err - case <-ctx.Done(): - return nil, context.Cause(ctx) - } -} - -func copyToStream(fd uint32, snd msgStream, r io.Reader) error { - for { - buf := make([]byte, 32*1024) - n, err := r.Read(buf) - if err != nil { - if err == io.EOF { - break // break loop and send EOF - } - return err - } else if n > 0 { - if err := snd.Send(&pb.Message{ - Input: &pb.Message_File{ - File: &pb.FdMessage{ - Fd: fd, - Data: buf[:n], - }, - }, - }); err != nil { - return err - } - } - } - return snd.Send(&pb.Message{ - Input: &pb.Message_File{ - File: &pb.FdMessage{ - Fd: fd, - EOF: true, - }, - }, - }) -} - -func signalNames() map[syscall.Signal]string { - m := make(map[syscall.Signal]string, len(signal.SignalMap)) - for name, value := range signal.SignalMap { - m[value] = name - } - return m -} - -type debugStream struct { - msgStream - prefix string -} - -func (s *debugStream) Send(msg *pb.Message) error { - switch m := msg.GetInput().(type) { - case *pb.Message_File: - if m.File.EOF { - logrus.Debugf("|---> File Message (sender:%v) fd=%d, EOF", s.prefix, m.File.Fd) - } else { - logrus.Debugf("|---> File Message (sender:%v) fd=%d, %d bytes", s.prefix, m.File.Fd, len(m.File.Data)) - } - case *pb.Message_Resize: - logrus.Debugf("|---> Resize Message (sender:%v): %+v", s.prefix, m.Resize) - case *pb.Message_Signal: - logrus.Debugf("|---> Signal Message (sender:%v): %s", s.prefix, m.Signal.Name) - } - return s.msgStream.Send(msg) -} - -func (s *debugStream) Recv() (*pb.Message, error) { - msg, err := s.msgStream.Recv() - if err != nil { - return nil, err - } - switch m := msg.GetInput().(type) { - case *pb.Message_File: - if m.File.EOF { - logrus.Debugf("|<--- File Message (receiver:%v) fd=%d, EOF", s.prefix, m.File.Fd) - } else { - logrus.Debugf("|<--- File Message (receiver:%v) fd=%d, %d bytes", s.prefix, m.File.Fd, len(m.File.Data)) - } - case *pb.Message_Resize: - logrus.Debugf("|<--- Resize Message (receiver:%v): %+v", s.prefix, m.Resize) - case *pb.Message_Signal: - logrus.Debugf("|<--- Signal Message (receiver:%v): %s", s.prefix, m.Signal.Name) - } - return msg, nil -} diff --git a/controller/remote/server.go b/controller/remote/server.go deleted file mode 100644 index e18e43b5..00000000 --- a/controller/remote/server.go +++ /dev/null @@ -1,445 +0,0 @@ -package remote - -import ( - "context" - "io" - "sync" - "sync/atomic" - "time" - - "github.com/docker/buildx/build" - controllererrors "github.com/docker/buildx/controller/errdefs" - "github.com/docker/buildx/controller/pb" - "github.com/docker/buildx/controller/processes" - "github.com/docker/buildx/util/desktop" - "github.com/docker/buildx/util/ioset" - "github.com/docker/buildx/util/progress" - "github.com/docker/buildx/version" - "github.com/moby/buildkit/client" - "github.com/pkg/errors" - "golang.org/x/sync/errgroup" -) - -type BuildFunc func(ctx context.Context, options *pb.BuildOptions, stdin io.Reader, progress progress.Writer) (resp *client.SolveResponse, res *build.ResultHandle, inp *build.Inputs, err error) - -func NewServer(buildFunc BuildFunc) *Server { - return &Server{ - buildFunc: buildFunc, - } -} - -type Server struct { - buildFunc BuildFunc - session map[string]*session - sessionMu sync.Mutex -} - -type session struct { - buildOnGoing atomic.Bool - statusChan chan *pb.StatusResponse - cancelBuild func(error) - buildOptions *pb.BuildOptions - inputPipe *io.PipeWriter - - result *build.ResultHandle - - processes *processes.Manager -} - -func (s *session) cancelRunningProcesses() { - s.processes.CancelRunningProcesses() -} - -func (m *Server) ListProcesses(ctx context.Context, req *pb.ListProcessesRequest) (res *pb.ListProcessesResponse, err error) { - m.sessionMu.Lock() - defer m.sessionMu.Unlock() - s, ok := m.session[req.SessionID] - if !ok { - return nil, errors.Errorf("unknown session ID %q", req.SessionID) - } - res = new(pb.ListProcessesResponse) - res.Infos = append(res.Infos, s.processes.ListProcesses()...) - return res, nil -} - -func (m *Server) DisconnectProcess(ctx context.Context, req *pb.DisconnectProcessRequest) (res *pb.DisconnectProcessResponse, err error) { - m.sessionMu.Lock() - defer m.sessionMu.Unlock() - s, ok := m.session[req.SessionID] - if !ok { - return nil, errors.Errorf("unknown session ID %q", req.SessionID) - } - return res, s.processes.DeleteProcess(req.ProcessID) -} - -func (m *Server) Info(ctx context.Context, req *pb.InfoRequest) (res *pb.InfoResponse, err error) { - return &pb.InfoResponse{ - BuildxVersion: &pb.BuildxVersion{ - Package: version.Package, - Version: version.Version, - Revision: version.Revision, - }, - }, nil -} - -func (m *Server) List(ctx context.Context, req *pb.ListRequest) (res *pb.ListResponse, err error) { - keys := make(map[string]struct{}) - - m.sessionMu.Lock() - for k := range m.session { - keys[k] = struct{}{} - } - m.sessionMu.Unlock() - - var keysL []string - for k := range keys { - keysL = append(keysL, k) - } - return &pb.ListResponse{ - Keys: keysL, - }, nil -} - -func (m *Server) Disconnect(ctx context.Context, req *pb.DisconnectRequest) (res *pb.DisconnectResponse, err error) { - sessionID := req.SessionID - if sessionID == "" { - return nil, errors.New("disconnect: empty session ID") - } - - m.sessionMu.Lock() - if s, ok := m.session[sessionID]; ok { - if s.cancelBuild != nil { - s.cancelBuild(errors.WithStack(context.Canceled)) - } - s.cancelRunningProcesses() - if s.result != nil { - s.result.Done() - } - } - delete(m.session, sessionID) - m.sessionMu.Unlock() - - return &pb.DisconnectResponse{}, nil -} - -func (m *Server) Close() error { - m.sessionMu.Lock() - for k := range m.session { - if s, ok := m.session[k]; ok { - if s.cancelBuild != nil { - s.cancelBuild(errors.WithStack(context.Canceled)) - } - s.cancelRunningProcesses() - } - } - m.sessionMu.Unlock() - return nil -} - -func (m *Server) Inspect(ctx context.Context, req *pb.InspectRequest) (*pb.InspectResponse, error) { - sessionID := req.SessionID - if sessionID == "" { - return nil, errors.New("inspect: empty session ID") - } - var bo *pb.BuildOptions - m.sessionMu.Lock() - if s, ok := m.session[sessionID]; ok { - bo = s.buildOptions - } else { - m.sessionMu.Unlock() - return nil, errors.Errorf("inspect: unknown key %v", sessionID) - } - m.sessionMu.Unlock() - return &pb.InspectResponse{Options: bo}, nil -} - -func (m *Server) Build(ctx context.Context, req *pb.BuildRequest) (*pb.BuildResponse, error) { - sessionID := req.SessionID - if sessionID == "" { - return nil, errors.New("build: empty session ID") - } - - // Prepare status channel and session - m.sessionMu.Lock() - if m.session == nil { - m.session = make(map[string]*session) - } - s, ok := m.session[sessionID] - if ok { - if !s.buildOnGoing.CompareAndSwap(false, true) { - m.sessionMu.Unlock() - return &pb.BuildResponse{}, errors.New("build ongoing") - } - s.cancelRunningProcesses() - s.result = nil - } else { - s = &session{} - s.buildOnGoing.Store(true) - } - - s.processes = processes.NewManager() - statusChan := make(chan *pb.StatusResponse) - s.statusChan = statusChan - inR, inW := io.Pipe() - defer inR.Close() - s.inputPipe = inW - m.session[sessionID] = s - m.sessionMu.Unlock() - defer func() { - close(statusChan) - m.sessionMu.Lock() - s, ok := m.session[sessionID] - if ok { - s.statusChan = nil - s.buildOnGoing.Store(false) - } - m.sessionMu.Unlock() - }() - - pw := pb.NewProgressWriter(statusChan) - - // Build the specified request - ctx, cancel := context.WithCancelCause(ctx) - defer func() { cancel(errors.WithStack(context.Canceled)) }() - resp, res, _, buildErr := m.buildFunc(ctx, req.Options, inR, pw) - m.sessionMu.Lock() - if s, ok := m.session[sessionID]; ok { - // NOTE: buildFunc can return *build.ResultHandle even on error (e.g. when it's implemented using (github.com/docker/buildx/controller/build).RunBuild). - if res != nil { - s.result = res - s.cancelBuild = cancel - s.buildOptions = req.Options - m.session[sessionID] = s - if buildErr != nil { - var ref string - var ebr *desktop.ErrorWithBuildRef - if errors.As(buildErr, &ebr) { - ref = ebr.Ref - } - buildErr = controllererrors.WrapBuild(buildErr, sessionID, ref) - } - } - } else { - m.sessionMu.Unlock() - return nil, errors.Errorf("build: unknown session ID %v", sessionID) - } - m.sessionMu.Unlock() - - if buildErr != nil { - return nil, buildErr - } - - if resp == nil { - resp = &client.SolveResponse{} - } - return &pb.BuildResponse{ - ExporterResponse: resp.ExporterResponse, - }, nil -} - -func (m *Server) Status(req *pb.StatusRequest, stream pb.Controller_StatusServer) error { - sessionID := req.SessionID - if sessionID == "" { - return errors.New("status: empty session ID") - } - - // Wait and get status channel prepared by Build() - var statusChan <-chan *pb.StatusResponse - for { - // TODO: timeout? - m.sessionMu.Lock() - if _, ok := m.session[sessionID]; !ok || m.session[sessionID].statusChan == nil { - m.sessionMu.Unlock() - time.Sleep(time.Millisecond) // TODO: wait Build without busy loop and make it cancellable - continue - } - statusChan = m.session[sessionID].statusChan - m.sessionMu.Unlock() - break - } - - // forward status - for ss := range statusChan { - if ss == nil { - break - } - if err := stream.Send(ss); err != nil { - return err - } - } - - return nil -} - -func (m *Server) Input(stream pb.Controller_InputServer) (err error) { - // Get the target ref from init message - msg, err := stream.Recv() - if err != nil { - if !errors.Is(err, io.EOF) { - return err - } - return nil - } - init := msg.GetInit() - if init == nil { - return errors.Errorf("unexpected message: %T; wanted init", msg.GetInit()) - } - sessionID := init.SessionID - if sessionID == "" { - return errors.New("input: no session ID is provided") - } - - // Wait and get input stream pipe prepared by Build() - var inputPipeW *io.PipeWriter - for { - // TODO: timeout? - m.sessionMu.Lock() - if _, ok := m.session[sessionID]; !ok || m.session[sessionID].inputPipe == nil { - m.sessionMu.Unlock() - time.Sleep(time.Millisecond) // TODO: wait Build without busy loop and make it cancellable - continue - } - inputPipeW = m.session[sessionID].inputPipe - m.sessionMu.Unlock() - break - } - - // Forward input stream - eg, ctx := errgroup.WithContext(context.TODO()) - done := make(chan struct{}) - msgCh := make(chan *pb.InputMessage) - eg.Go(func() error { - defer close(msgCh) - for { - msg, err := stream.Recv() - if err != nil { - if !errors.Is(err, io.EOF) { - return err - } - return nil - } - select { - case msgCh <- msg: - case <-done: - return nil - case <-ctx.Done(): - return nil - } - } - }) - eg.Go(func() (retErr error) { - defer close(done) - defer func() { - if retErr != nil { - inputPipeW.CloseWithError(retErr) - return - } - inputPipeW.Close() - }() - for { - var msg *pb.InputMessage - select { - case msg = <-msgCh: - case <-ctx.Done(): - return context.Cause(ctx) - } - if msg == nil { - return nil - } - if data := msg.GetData(); data != nil { - if len(data.Data) > 0 { - _, err := inputPipeW.Write(data.Data) - if err != nil { - return err - } - } - if data.EOF { - return nil - } - } - } - }) - - return eg.Wait() -} - -func (m *Server) Invoke(srv pb.Controller_InvokeServer) error { - containerIn, containerOut := ioset.Pipe() - defer func() { containerOut.Close(); containerIn.Close() }() - - initDoneCh := make(chan *processes.Process) - initErrCh := make(chan error) - eg, egCtx := errgroup.WithContext(context.TODO()) - srvIOCtx, srvIOCancel := context.WithCancelCause(egCtx) - eg.Go(func() error { - defer srvIOCancel(errors.WithStack(context.Canceled)) - return serveIO(srvIOCtx, srv, func(initMessage *pb.InitMessage) (retErr error) { - defer func() { - if retErr != nil { - initErrCh <- retErr - } - }() - sessionID := initMessage.SessionID - cfg := initMessage.InvokeConfig - - m.sessionMu.Lock() - s, ok := m.session[sessionID] - if !ok { - m.sessionMu.Unlock() - return errors.Errorf("invoke: unknown session ID %v", sessionID) - } - m.sessionMu.Unlock() - - pid := initMessage.ProcessID - if pid == "" { - return errors.Errorf("invoke: specify process ID") - } - proc, ok := s.processes.Get(pid) - if !ok { - // Start a new process. - if cfg == nil { - return errors.New("no container config is provided") - } - var err error - proc, err = s.processes.StartProcess(pid, s.result, cfg) - if err != nil { - return err - } - } - // Attach containerIn to this process - proc.ForwardIO(&containerIn, srvIOCancel) - initDoneCh <- proc - return nil - }, &ioServerConfig{ - stdin: containerOut.Stdin, - stdout: containerOut.Stdout, - stderr: containerOut.Stderr, - // TODO: signal, resize - }) - }) - eg.Go(func() (rErr error) { - defer srvIOCancel(errors.WithStack(context.Canceled)) - // Wait for init done - var proc *processes.Process - select { - case p := <-initDoneCh: - proc = p - case err := <-initErrCh: - return err - case <-egCtx.Done(): - return egCtx.Err() - } - - // Wait for IO done - select { - case <-srvIOCtx.Done(): - return srvIOCtx.Err() - case err := <-proc.Done(): - return err - case <-egCtx.Done(): - return egCtx.Err() - } - }) - - return eg.Wait() -} diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 8b536fa5..e9de2927 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -28,7 +28,6 @@ Start a build | [`--cgroup-parent`](#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | [`--check`](#check) | `bool` | | Shorthand for `--call=check` | | `-D`, `--debug` | `bool` | | Enable debug logging | -| `--detach` | `bool` | | Detach buildx server (supported only on linux) (EXPERIMENTAL) | | [`-f`](#file), [`--file`](#file) | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) | | `--iidfile` | `string` | | Write the image ID to a file | | `--label` | `stringArray` | | Set metadata for an image | @@ -44,10 +43,8 @@ Start a build | `--pull` | `bool` | | Always attempt to pull all referenced images | | [`--push`](#push) | `bool` | | Shorthand for `--output=type=registry` | | `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success | -| `--root` | `string` | | Specify root directory of server to connect (EXPERIMENTAL) | | [`--sbom`](#sbom) | `string` | | Shorthand for `--attest=type=sbom` | | [`--secret`](#secret) | `stringArray` | | Secret to expose to the build (format: `id=mysecret[,src=/local/secret]`) | -| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) (EXPERIMENTAL) | | [`--shm-size`](#shm-size) | `bytes` | `0` | Shared memory size for build containers | | [`--ssh`](#ssh) | `stringArray` | | SSH agent socket or keys to expose to the build (format: `default\|[=\|[,]]`) | | [`-t`](#tag), [`--tag`](#tag) | `stringArray` | | Name and optionally a tag (format: `name:tag`) | diff --git a/docs/reference/buildx_debug.md b/docs/reference/buildx_debug.md index 6f72b5cc..afe69567 100644 --- a/docs/reference/buildx_debug.md +++ b/docs/reference/buildx_debug.md @@ -12,16 +12,13 @@ Start debugger (EXPERIMENTAL) ### Options -| Name | Type | Default | Description | -|:------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------| -| `--builder` | `string` | | Override the configured builder instance | -| `-D`, `--debug` | `bool` | | Enable debug logging | -| `--detach` | `bool` | `true` | Detach buildx server for the monitor (supported only on linux) (EXPERIMENTAL) | -| `--invoke` | `string` | | Launch a monitor with executing specified command (EXPERIMENTAL) | -| `--on` | `string` | `error` | When to launch the monitor ([always, error]) (EXPERIMENTAL) | -| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`) for the monitor. Use plain to show container output | -| `--root` | `string` | | Specify root directory of server to connect for the monitor (EXPERIMENTAL) | -| `--server-config` | `string` | | Specify buildx server config file for the monitor (used only when launching new server) (EXPERIMENTAL) | +| Name | Type | Default | Description | +|:----------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------| +| `--builder` | `string` | | Override the configured builder instance | +| `-D`, `--debug` | `bool` | | Enable debug logging | +| `--invoke` | `string` | | Launch a monitor with executing specified command (EXPERIMENTAL) | +| `--on` | `string` | `error` | When to launch the monitor ([always, error]) (EXPERIMENTAL) | +| `--progress` | `string` | `auto` | Set type of progress output (`auto`, `plain`, `tty`, `rawjson`) for the monitor. Use plain to show container output | diff --git a/docs/reference/buildx_debug_build.md b/docs/reference/buildx_debug_build.md index 609ca150..ee359480 100644 --- a/docs/reference/buildx_debug_build.md +++ b/docs/reference/buildx_debug_build.md @@ -24,7 +24,6 @@ Start a build | `--cgroup-parent` | `string` | | Set the parent cgroup for the `RUN` instructions during build | | `--check` | `bool` | | Shorthand for `--call=check` | | `-D`, `--debug` | `bool` | | Enable debug logging | -| `--detach` | `bool` | | Detach buildx server (supported only on linux) (EXPERIMENTAL) | | `-f`, `--file` | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) | | `--iidfile` | `string` | | Write the image ID to a file | | `--label` | `stringArray` | | Set metadata for an image | @@ -40,10 +39,8 @@ Start a build | `--pull` | `bool` | | Always attempt to pull all referenced images | | `--push` | `bool` | | Shorthand for `--output=type=registry` | | `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success | -| `--root` | `string` | | Specify root directory of server to connect (EXPERIMENTAL) | | `--sbom` | `string` | | Shorthand for `--attest=type=sbom` | | `--secret` | `stringArray` | | Secret to expose to the build (format: `id=mysecret[,src=/local/secret]`) | -| `--server-config` | `string` | | Specify buildx server config file (used only when launching new server) (EXPERIMENTAL) | | `--shm-size` | `bytes` | `0` | Shared memory size for build containers | | `--ssh` | `stringArray` | | SSH agent socket or keys to expose to the build (format: `default\|[=\|[,]]`) | | `-t`, `--tag` | `stringArray` | | Name and optionally a tag (format: `name:tag`) | diff --git a/go.mod b/go.mod index 5eaaa4df..fa25088f 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,6 @@ require ( github.com/moby/go-archive v0.1.0 github.com/moby/sys/atomicwriter v0.1.0 github.com/moby/sys/mountinfo v0.7.2 - github.com/moby/sys/signal v0.7.1 github.com/morikuni/aec v1.0.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.1 @@ -130,6 +129,7 @@ require ( github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/spdystream v0.5.0 // indirect github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/signal v0.7.1 // indirect github.com/moby/sys/user v0.4.0 // indirect github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.2 // indirect diff --git a/monitor/commands/attach.go b/monitor/commands/attach.go index 34b3dcba..8d8a6f99 100644 --- a/monitor/commands/attach.go +++ b/monitor/commands/attach.go @@ -4,8 +4,8 @@ import ( "context" "fmt" "io" - "slices" + cerrdefs "github.com/containerd/errdefs" "github.com/docker/buildx/monitor/types" "github.com/pkg/errors" ) @@ -23,57 +23,33 @@ func NewAttachCmd(m types.Monitor, stdout io.WriteCloser) types.Command { func (cm *AttachCmd) Info() types.CommandInfo { return types.CommandInfo{ Name: "attach", - HelpMessage: "attach to a buildx server or a process in the container", + HelpMessage: "attach to a process in the container", HelpMessageLong: ` Usage: - attach ID + attach PID -ID is for a session (visible via list command) or a process (visible via ps command). -If you attached to a process, use Ctrl-a-c for switching the monitor to that process's STDIO. +PID is for a process (visible via ps command). +Use Ctrl-a-c for switching the monitor to that process's STDIO. `, } } func (cm *AttachCmd) Exec(ctx context.Context, args []string) error { if len(args) < 2 { - return errors.Errorf("ID of session or process must be passed") + return errors.Errorf("PID of process must be passed") } - ref := args[1] - var id string + pid := args[1] - isProcess, err := isProcessID(ctx, cm.m, ref) - if err == nil && isProcess { - cm.m.Attach(ctx, ref) - id = ref - } - if id == "" { - refs, err := cm.m.List(ctx) - if err != nil { - return errors.Errorf("failed to get the list of sessions: %v", err) - } - if !slices.Contains(refs, ref) { - return errors.Errorf("unknown ID: %q", ref) - } - cm.m.Detach() // Finish existing attach - cm.m.AttachSession(ref) - } - fmt.Fprintf(cm.stdout, "Attached to process %q. Press Ctrl-a-c to switch to the new container\n", id) - return nil -} - -func isProcessID(ctx context.Context, c types.Monitor, ref string) (bool, error) { - sid := c.AttachedSessionID() - if sid == "" { - return false, errors.Errorf("no attaching session") - } - infos, err := c.ListProcesses(ctx, sid) + infos, err := cm.m.ListProcesses(ctx) if err != nil { - return false, err + return err } for _, p := range infos { - if p.ProcessID == ref { - return true, nil + if p.ProcessID == pid { + cm.m.Attach(ctx, pid) + fmt.Fprintf(cm.stdout, "Attached to process %q. Press Ctrl-a-c to switch to the new container\n", pid) + return nil } } - return false, nil + return errors.Wrapf(cerrdefs.ErrNotFound, "pid %s", pid) } diff --git a/monitor/commands/disconnect.go b/monitor/commands/disconnect.go deleted file mode 100644 index f358eda3..00000000 --- a/monitor/commands/disconnect.go +++ /dev/null @@ -1,54 +0,0 @@ -package commands - -import ( - "context" - "fmt" - - "github.com/docker/buildx/monitor/types" - "github.com/pkg/errors" -) - -type DisconnectCmd struct { - m types.Monitor -} - -func NewDisconnectCmd(m types.Monitor) types.Command { - return &DisconnectCmd{m} -} - -func (cm *DisconnectCmd) Info() types.CommandInfo { - return types.CommandInfo{ - Name: "disconnect", - HelpMessage: "disconnect a client from a buildx server. Specific session ID can be specified an arg", - HelpMessageLong: fmt.Sprintf(` -Usage: - disconnect [ID] - -ID is for a session (visible via list command). Default is %q. -`, cm.m.AttachedSessionID()), - } -} - -func (cm *DisconnectCmd) Exec(ctx context.Context, args []string) error { - target := cm.m.AttachedSessionID() - if len(args) >= 2 { - target = args[1] - } else if target == "" { - return errors.Errorf("no attaching session") - } - isProcess, err := isProcessID(ctx, cm.m, target) - if err == nil && isProcess { - sid := cm.m.AttachedSessionID() - if sid == "" { - return errors.Errorf("no attaching session") - } - if err := cm.m.DisconnectProcess(ctx, sid, target); err != nil { - return errors.Errorf("disconnecting from process failed %v", target) - } - return nil - } - if err := cm.m.DisconnectSession(ctx, target); err != nil { - return errors.Errorf("disconnecting from session failed: %v", err) - } - return nil -} diff --git a/monitor/commands/exec.go b/monitor/commands/exec.go index d3a93ba5..5a5968ee 100644 --- a/monitor/commands/exec.go +++ b/monitor/commands/exec.go @@ -35,9 +35,6 @@ COMMAND and ARG... will be executed in the container. } func (cm *ExecCmd) Exec(ctx context.Context, args []string) error { - if ref := cm.m.AttachedSessionID(); ref == "" { - return errors.Errorf("no attaching session") - } if len(args) < 2 { return errors.Errorf("command must be passed") } diff --git a/monitor/commands/kill.go b/monitor/commands/kill.go deleted file mode 100644 index 2cb9cb5f..00000000 --- a/monitor/commands/kill.go +++ /dev/null @@ -1,36 +0,0 @@ -package commands - -import ( - "context" - - "github.com/docker/buildx/monitor/types" - "github.com/pkg/errors" -) - -type KillCmd struct { - m types.Monitor -} - -func NewKillCmd(m types.Monitor) types.Command { - return &KillCmd{m} -} - -func (cm *KillCmd) Info() types.CommandInfo { - return types.CommandInfo{ - Name: "kill", - HelpMessage: "kill buildx server", - HelpMessageLong: ` -Usage: - kill - -Kills the currently connecting buildx server process. -`, - } -} - -func (cm *KillCmd) Exec(ctx context.Context, args []string) error { - if err := cm.m.Kill(ctx); err != nil { - return errors.Errorf("failed to kill: %v", err) - } - return nil -} diff --git a/monitor/commands/list.go b/monitor/commands/list.go deleted file mode 100644 index 29b9f597..00000000 --- a/monitor/commands/list.go +++ /dev/null @@ -1,47 +0,0 @@ -package commands - -import ( - "context" - "fmt" - "io" - "sort" - "text/tabwriter" - - "github.com/docker/buildx/monitor/types" -) - -type ListCmd struct { - m types.Monitor - - stdout io.WriteCloser -} - -func NewListCmd(m types.Monitor, stdout io.WriteCloser) types.Command { - return &ListCmd{m, stdout} -} - -func (cm *ListCmd) Info() types.CommandInfo { - return types.CommandInfo{ - Name: "list", - HelpMessage: "list buildx sessions", - HelpMessageLong: ` -Usage: - list -`, - } -} - -func (cm *ListCmd) Exec(ctx context.Context, args []string) error { - refs, err := cm.m.List(ctx) - if err != nil { - return err - } - sort.Strings(refs) - tw := tabwriter.NewWriter(cm.stdout, 1, 8, 1, '\t', 0) - fmt.Fprintln(tw, "ID\tCURRENT_SESSION") - for _, k := range refs { - fmt.Fprintf(tw, "%-20s\t%v\n", k, k == cm.m.AttachedSessionID()) - } - tw.Flush() - return nil -} diff --git a/monitor/commands/ps.go b/monitor/commands/ps.go index b5e30c3e..e7ed1dde 100644 --- a/monitor/commands/ps.go +++ b/monitor/commands/ps.go @@ -7,7 +7,6 @@ import ( "text/tabwriter" "github.com/docker/buildx/monitor/types" - "github.com/pkg/errors" ) type PsCmd struct { @@ -31,11 +30,7 @@ Usage: } func (cm *PsCmd) Exec(ctx context.Context, args []string) error { - ref := cm.m.AttachedSessionID() - if ref == "" { - return errors.Errorf("no attaching session") - } - plist, err := cm.m.ListProcesses(ctx, ref) + plist, err := cm.m.ListProcesses(ctx) if err != nil { return err } diff --git a/monitor/commands/reload.go b/monitor/commands/reload.go index eaf4d403..2559d002 100644 --- a/monitor/commands/reload.go +++ b/monitor/commands/reload.go @@ -5,6 +5,7 @@ import ( "fmt" "io" + cbuild "github.com/docker/buildx/controller/build" controllererrors "github.com/docker/buildx/controller/errdefs" controllerapi "github.com/docker/buildx/controller/pb" "github.com/docker/buildx/monitor/types" @@ -19,11 +20,11 @@ type ReloadCmd struct { stdout io.WriteCloser progress *progress.Printer - options *controllerapi.BuildOptions + options *cbuild.Options invokeConfig *controllerapi.InvokeConfig } -func NewReloadCmd(m types.Monitor, stdout io.WriteCloser, progress *progress.Printer, options *controllerapi.BuildOptions, invokeConfig *controllerapi.InvokeConfig) types.Command { +func NewReloadCmd(m types.Monitor, stdout io.WriteCloser, progress *progress.Printer, options *cbuild.Options, invokeConfig *controllerapi.InvokeConfig) types.Command { return &ReloadCmd{m, stdout, progress, options, invokeConfig} } @@ -39,34 +40,15 @@ Usage: } func (cm *ReloadCmd) Exec(ctx context.Context, args []string) error { - var bo *controllerapi.BuildOptions - if ref := cm.m.AttachedSessionID(); ref != "" { - // Rebuilding an existing session; Restore the build option used for building this session. - res, err := cm.m.Inspect(ctx, ref) - if err != nil { - fmt.Printf("failed to inspect the current build session: %v\n", err) - } else { - bo = res.Options - } - } else { - bo = cm.options - } - if bo == nil { - return errors.Errorf("no build option is provided") - } - if ref := cm.m.AttachedSessionID(); ref != "" { - if err := cm.m.Disconnect(ctx, ref); err != nil { - fmt.Println("disconnect error", err) - } - } + bo := cm.m.Inspect(ctx) + var resultUpdated bool cm.progress.Unpause() - ref, _, _, err := cm.m.Build(ctx, bo, nil, cm.progress) // TODO: support stdin, hold build ref + _, _, err := cm.m.Build(ctx, bo, nil, cm.progress) // TODO: support stdin, hold build ref cm.progress.Pause() if err != nil { var be *controllererrors.BuildError if errors.As(err, &be) { - ref = be.SessionID resultUpdated = true } else { fmt.Printf("failed to reload: %v\n", err) @@ -79,7 +61,6 @@ func (cm *ReloadCmd) Exec(ctx context.Context, args []string) error { } else { resultUpdated = true } - cm.m.AttachSession(ref) if resultUpdated { // rollback the running container with the new result id := cm.m.Rollback(ctx, cm.invokeConfig) diff --git a/monitor/commands/rollback.go b/monitor/commands/rollback.go index 53a24833..b6ef4a7f 100644 --- a/monitor/commands/rollback.go +++ b/monitor/commands/rollback.go @@ -7,7 +7,6 @@ import ( controllerapi "github.com/docker/buildx/controller/pb" "github.com/docker/buildx/monitor/types" - "github.com/pkg/errors" ) type RollbackCmd struct { @@ -38,9 +37,6 @@ COMMAND and ARG... will be executed in the container. } func (cm *RollbackCmd) Exec(ctx context.Context, args []string) error { - if ref := cm.m.AttachedSessionID(); ref == "" { - return errors.Errorf("no attaching session") - } cfg := cm.invokeConfig if len(args) >= 2 { cmds := args[1:] diff --git a/monitor/monitor.go b/monitor/monitor.go index afc4af39..750f4439 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -11,6 +11,7 @@ import ( "github.com/containerd/console" "github.com/docker/buildx/build" + cbuild "github.com/docker/buildx/controller/build" "github.com/docker/buildx/controller/control" controllerapi "github.com/docker/buildx/controller/pb" "github.com/docker/buildx/monitor/commands" @@ -31,10 +32,10 @@ type MonitorBuildResult struct { } // RunMonitor provides an interactive session for running and managing containers via specified IO. -func RunMonitor(ctx context.Context, curRef string, options *controllerapi.BuildOptions, invokeConfig *controllerapi.InvokeConfig, c control.BuildxController, stdin io.ReadCloser, stdout io.WriteCloser, stderr console.File, progress *progress.Printer) (*MonitorBuildResult, error) { +func RunMonitor(ctx context.Context, curRef string, options *cbuild.Options, invokeConfig *controllerapi.InvokeConfig, c control.BuildxController, stdin io.ReadCloser, stdout io.WriteCloser, stderr console.File, progress *progress.Printer) (*MonitorBuildResult, error) { defer func() { - if err := c.Disconnect(ctx, curRef); err != nil { - logrus.Warnf("disconnect error: %v", err) + if err := c.Close(); err != nil { + logrus.Warnf("close error: %v", err) } }() @@ -95,9 +96,6 @@ func RunMonitor(ctx context.Context, curRef string, options *controllerapi.Build availableCommands := []types.Command{ commands.NewReloadCmd(m, stdout, progress, options, invokeConfig), commands.NewRollbackCmd(m, invokeConfig, stdout), - commands.NewListCmd(m, stdout), - commands.NewDisconnectCmd(m), - commands.NewKillCmd(m), commands.NewAttachCmd(m, stdout), commands.NewExecCmd(m, invokeConfig, stdout), commands.NewPsCmd(m, stdout), @@ -244,24 +242,12 @@ type monitor struct { lastBuildResult *MonitorBuildResult } -func (m *monitor) Build(ctx context.Context, options *controllerapi.BuildOptions, in io.ReadCloser, progress progress.Writer) (ref string, resp *client.SolveResponse, input *build.Inputs, err error) { - ref, resp, _, err = m.BuildxController.Build(ctx, options, in, progress) +func (m *monitor) Build(ctx context.Context, options *cbuild.Options, in io.ReadCloser, progress progress.Writer) (resp *client.SolveResponse, input *build.Inputs, err error) { + resp, _, err = m.BuildxController.Build(ctx, options, in, progress) m.lastBuildResult = &MonitorBuildResult{Resp: resp, Err: err} // Record build result return } -func (m *monitor) DisconnectSession(ctx context.Context, targetID string) error { - return m.Disconnect(ctx, targetID) -} - -func (m *monitor) AttachSession(ref string) { - m.ref.Store(ref) -} - -func (m *monitor) AttachedSessionID() string { - return m.ref.Load().(string) -} - func (m *monitor) Rollback(ctx context.Context, cfg *controllerapi.InvokeConfig) string { pid := identity.NewID() cfg1 := cfg @@ -323,9 +309,6 @@ func (m *monitor) invoke(ctx context.Context, pid string, cfg *controllerapi.Inv if err := m.muxIO.SwitchTo(1); err != nil { return errors.Errorf("failed to switch to process IO: %v", err) } - if m.AttachedSessionID() == "" { - return nil - } invokeCtx, invokeCancel := context.WithCancelCause(ctx) containerIn, containerOut := ioset.Pipe() @@ -343,7 +326,7 @@ func (m *monitor) invoke(ctx context.Context, pid string, cfg *controllerapi.Inv defer invokeCancelAndDetachFn() m.invokeCancel = invokeCancelAndDetachFn - err := m.Invoke(invokeCtx, m.AttachedSessionID(), pid, cfg, containerIn.Stdin, containerIn.Stdout, containerIn.Stderr) + err := m.Invoke(invokeCtx, pid, cfg, containerIn.Stdin, containerIn.Stdout, containerIn.Stderr) close(waitInvokeDoneCh) return err diff --git a/monitor/types/types.go b/monitor/types/types.go index 0848e6de..201f273a 100644 --- a/monitor/types/types.go +++ b/monitor/types/types.go @@ -25,15 +25,6 @@ type Monitor interface { // Detach detaches IO from the container. Detach() - - // DisconnectSession finishes the specified session. - DisconnectSession(ctx context.Context, targetID string) error - - // AttachSession attaches the monitor to the specified session. - AttachSession(ref string) - - // AttachedSessionID returns the ID of the attached session. - AttachedSessionID() string } // CommandInfo is information about a command. diff --git a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer.go b/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer.go deleted file mode 100644 index 125edf69..00000000 --- a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer.go +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package dialer - -import ( - "context" - "fmt" - "net" - "time" -) - -type dialResult struct { - c net.Conn - err error -} - -// ContextDialer returns a GRPC net.Conn connected to the provided address -func ContextDialer(ctx context.Context, address string) (net.Conn, error) { - if deadline, ok := ctx.Deadline(); ok { - return timeoutDialer(address, time.Until(deadline)) - } - return timeoutDialer(address, 0) -} - -func timeoutDialer(address string, timeout time.Duration) (net.Conn, error) { - var ( - stopC = make(chan struct{}) - synC = make(chan *dialResult) - ) - go func() { - defer close(synC) - for { - select { - case <-stopC: - return - default: - c, err := dialer(address, timeout) - if isNoent(err) { - <-time.After(10 * time.Millisecond) - continue - } - synC <- &dialResult{c, err} - return - } - } - }() - select { - case dr := <-synC: - return dr.c, dr.err - case <-time.After(timeout): - close(stopC) - go func() { - dr := <-synC - if dr != nil && dr.c != nil { - dr.c.Close() - } - }() - return nil, fmt.Errorf("dial %s: timeout", address) - } -} diff --git a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_unix.go b/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_unix.go deleted file mode 100644 index 1c58d16b..00000000 --- a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_unix.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build !windows - -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package dialer - -import ( - "errors" - "fmt" - "net" - "strings" - "syscall" - "time" -) - -// DialAddress returns the address with unix:// prepended to the -// provided address -func DialAddress(address string) string { - return fmt.Sprintf("unix://%s", address) -} - -func isNoent(err error) bool { - return errors.Is(err, syscall.ENOENT) -} - -func dialer(address string, timeout time.Duration) (net.Conn, error) { - address = strings.TrimPrefix(address, "unix://") - return net.DialTimeout("unix", address, timeout) -} diff --git a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_windows.go b/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_windows.go deleted file mode 100644 index cf74cc0d..00000000 --- a/vendor/github.com/containerd/containerd/v2/pkg/dialer/dialer_windows.go +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package dialer - -import ( - "fmt" - "net" - "os" - "path/filepath" - "strings" - "time" - - winio "github.com/Microsoft/go-winio" -) - -func isNoent(err error) bool { - return os.IsNotExist(err) -} - -func dialer(address string, timeout time.Duration) (net.Conn, error) { - address = strings.TrimPrefix(filepath.ToSlash(address), "npipe://") - return winio.DialPipe(address, &timeout) -} - -// DialAddress returns the dial address with npipe:// prepended to the -// provided address -func DialAddress(address string) string { - address = filepath.ToSlash(address) - if !strings.HasPrefix(address, "npipe://") { - address = fmt.Sprintf("npipe://%s", address) - } - return address -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 4be8c4e3..1d4f6f93 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -164,7 +164,6 @@ github.com/containerd/containerd/v2/internal/fsverity github.com/containerd/containerd/v2/internal/randutil github.com/containerd/containerd/v2/pkg/archive/compression github.com/containerd/containerd/v2/pkg/deprecation -github.com/containerd/containerd/v2/pkg/dialer github.com/containerd/containerd/v2/pkg/filters github.com/containerd/containerd/v2/pkg/identifiers github.com/containerd/containerd/v2/pkg/kernelversion