github.com/chenbh/concourse/v6@v6.4.2/worker/workercmd/worker_nonlinux.go (about)

     1  // +build !linux
     2  
     3  package workercmd
     4  
     5  import (
     6  	"runtime"
     7  	"time"
     8  
     9  	"code.cloudfoundry.org/lager"
    10  	"github.com/chenbh/concourse/v6/atc"
    11  	"github.com/jessevdk/go-flags"
    12  	"github.com/tedsuo/ifrit"
    13  )
    14  
    15  type RuntimeConfiguration struct {
    16  }
    17  
    18  type GuardianRuntime struct {
    19  	RequestTimeout time.Duration `long:"request-timeout" default:"5m" description:"How long to wait for requests to the Garden server to complete. 0 means no timeout."`
    20  }
    21  
    22  type ContainerdRuntime struct {
    23  }
    24  
    25  type Certs struct{}
    26  
    27  func (cmd WorkerCommand) LessenRequirements(prefix string, command *flags.Command) {
    28  	// created in the work-dir
    29  	command.FindOptionByLongName(prefix + "baggageclaim-volumes").Required = false
    30  }
    31  
    32  func (cmd *WorkerCommand) gardenServerRunner(logger lager.Logger) (atc.Worker, ifrit.Runner, error) {
    33  	worker := cmd.Worker.Worker()
    34  	worker.Platform = runtime.GOOS
    35  	var err error
    36  	worker.Name, err = cmd.workerName()
    37  	if err != nil {
    38  		return atc.Worker{}, nil, err
    39  	}
    40  
    41  	runner, err := cmd.houdiniRunner(logger)
    42  	if err != nil {
    43  		return atc.Worker{}, nil, err
    44  	}
    45  
    46  	return worker, runner, nil
    47  }