Documentation
¶
Index ¶
- Constants
- Variables
- func CreateGrpcClientConn(bc BuilderConfig) (*grpc.ClientConn, error)
- func DeleteSessionClientCert() error
- func DetermineStateDir(specified string, subdirIfDefault string) (string, error)
- func DumpListWorkers(ctx context.Context, bc BuilderConfig) (*controlapi.ListWorkersResponse, error)
- func InlineSsh(ctx context.Context, cluster *api.KubernetesCluster, opts InlineSshOpts, ...) error
- func MakeWireBuilder(useServerSideProxy bool, experimental string, waitUntilReady bool) func(context.Context, specs.Platform) (*client.Client, error)
- func NewArtifactCmd() *cobra.Command
- func NewBareClusterCmd(use string, hidden bool) *cobra.Command
- func NewBazelCmd() *cobra.Command
- func NewBazelCredHelperGetCmd() *cobra.Command
- func NewBuildCmd() *cobra.Command
- func NewBuildkitCmd() *cobra.Command
- func NewClusterCmd(hidden bool) *cobra.Command
- func NewCreateCmd() *cobra.Command
- func NewDescribeCmd() *cobra.Command
- func NewDestroyCmd() *cobra.Command
- func NewDockerCmd() *cobra.Command
- func NewDockerCredHelperEraseCmd(hidden bool) *cobra.Command
- func NewDockerCredHelperGetCmd(hidden bool) *cobra.Command
- func NewDockerCredHelperListCmd(hidden bool) *cobra.Command
- func NewDockerCredHelperStoreCmd(hidden bool) *cobra.Command
- func NewExecScoped() *cobra.Command
- func NewExposeCmd() *cobra.Command
- func NewExtendDurationCmd(name string) *cobra.Command
- func NewGitCheckoutCmd() *cobra.Command
- func NewIngressCmd() *cobra.Command
- func NewKubeconfigCmd() *cobra.Command
- func NewKubectlCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewLogsCmd() *cobra.Command
- func NewMetadataCmd() *cobra.Command
- func NewPantsCmd() *cobra.Command
- func NewProxyCmd() *cobra.Command
- func NewRdpCmd() *cobra.Command
- func NewRegistryCmd() *cobra.Command
- func NewRunCmd() *cobra.Command
- func NewSshCmd() *cobra.Command
- func NewTopCmd() *cobra.Command
- func NewVncCmd() *cobra.Command
- func NewVolumeCmd() *cobra.Command
- func ParseMachineType(machineType string) (vcpu int32, memoryMB int32, err error)
- func ParseVolumeFlag(def string) (api.VolumeSpec, error)
- func PrintCreateClusterMsg(ctx context.Context)
- func PrintCreateContainersResult(ctx context.Context, output string, resp *CreateContainerResult) error
- func RefreshSessionClientCert(ctx context.Context) (bool, error)
- func SelectRunningCluster(ctx context.Context, args []string) (*api.KubernetesCluster, []string, error)
- func StartBuilds(ctx context.Context, fragments []BuildFragment, ...) ([]*client.SolveResponse, error)
- func TestServerSideBuildxProxyConnectivity(ctx context.Context, bc BuilderConfig) (bool, error)
- type BuildCluster
- type BuildFragment
- type BuilderConfig
- type ConnectBits
- type ConnectSshFunc
- type CreateContainerOpts
- type CreateContainerResult
- type InlineSshOpts
- type LocalBuilderInstance
- type ProxyStatus
- type RemoteBuildClusterInstance
- type ServerProxyEndpoint
- type StatusData
- type Stream
Constants ¶
View Source
const ( SSH gitScheme = "ssh" HTTPS gitScheme = "https" )
View Source
const (
BazelCredHelperBinary = "bazel-credential-nsc"
)
View Source
const (
BuildkitProxyPath = "buildkit/" + proxyDir
)
Variables ¶
View Source
var ErrBuildxNodeGroupNotFound = errors.New("buildx node group not found")
View Source
var ErrEmptyClusterList = errors.New("no instances")
View Source
var ErrIsNotRemoteDriver = errors.New("buildx node group does not have 'remote' driver")
Functions ¶
func CreateGrpcClientConn ¶ added in v0.0.409
func CreateGrpcClientConn(bc BuilderConfig) (*grpc.ClientConn, error)
func DeleteSessionClientCert ¶ added in v0.0.430
func DeleteSessionClientCert() error
func DetermineStateDir ¶ added in v0.0.406
Determines the directory to store state in. If "specified" is non-empty, it will be used - for historical reasons, the ${specified}/proxy directory will be returned. If "specified" is empty, a directory that ends with ${subdirIfDefault} will be returned.
func DumpListWorkers ¶ added in v0.0.415
func DumpListWorkers(ctx context.Context, bc BuilderConfig) (*controlapi.ListWorkersResponse, error)
func InlineSsh ¶ added in v0.0.291
func InlineSsh(ctx context.Context, cluster *api.KubernetesCluster, opts InlineSshOpts, args []string) error
func MakeWireBuilder ¶ added in v0.0.426
func NewArtifactCmd ¶ added in v0.0.401
func NewBareClusterCmd ¶ added in v0.0.204
Used by `nsc` (and as the basis to `ns cluster`)
func NewBazelCmd ¶ added in v0.0.385
func NewBazelCredHelperGetCmd ¶ added in v0.0.392
func NewBuildCmd ¶ added in v0.0.178
func NewBuildkitCmd ¶ added in v0.0.204
func NewCreateCmd ¶ added in v0.0.203
func NewDescribeCmd ¶ added in v0.0.230
func NewDestroyCmd ¶ added in v0.0.350
func NewDockerCmd ¶ added in v0.0.222
func NewDockerCredHelperEraseCmd ¶ added in v0.0.212
func NewDockerCredHelperGetCmd ¶ added in v0.0.212
func NewDockerCredHelperListCmd ¶ added in v0.0.212
func NewDockerCredHelperStoreCmd ¶ added in v0.0.212
func NewExecScoped ¶ added in v0.0.231
func NewExposeCmd ¶ added in v0.0.203
func NewExtendDurationCmd ¶ added in v0.0.387
func NewGitCheckoutCmd ¶ added in v0.0.380
func NewIngressCmd ¶ added in v0.0.271
func NewKubeconfigCmd ¶ added in v0.0.209
func NewKubectlCmd ¶ added in v0.0.161
func NewListCmd ¶ added in v0.0.203
func NewLogsCmd ¶ added in v0.0.203
func NewMetadataCmd ¶ added in v0.0.203
func NewPantsCmd ¶ added in v0.0.400
func NewProxyCmd ¶ added in v0.0.185
func NewRegistryCmd ¶ added in v0.0.441
func NewVolumeCmd ¶ added in v0.0.299
func ParseMachineType ¶ added in v0.0.445
ParseMachineType parses a machine type string in the format "CPUxMemoryGB" (e.g., "4x8") and returns the vCPU count and memory in megabytes. This function is used for converting the shorthand format into structured data.
func ParseVolumeFlag ¶ added in v0.0.429
func ParseVolumeFlag(def string) (api.VolumeSpec, error)
func PrintCreateClusterMsg ¶ added in v0.0.291
func PrintCreateContainersResult ¶ added in v0.0.291
func PrintCreateContainersResult(ctx context.Context, output string, resp *CreateContainerResult) error
func RefreshSessionClientCert ¶ added in v0.0.395
func SelectRunningCluster ¶ added in v0.0.291
func StartBuilds ¶ added in v0.0.416
func TestServerSideBuildxProxyConnectivity ¶ added in v0.0.409
func TestServerSideBuildxProxyConnectivity(ctx context.Context, bc BuilderConfig) (bool, error)
Types ¶
type BuildCluster ¶ added in v0.0.341
type BuildCluster interface {
NewConn(ctx context.Context) (net.Conn, string, error)
GetPlatform() string
RunBuildProxy(ctx context.Context, socketPath, controlSocketPath string, useGrpcProxy, annotateBuild bool, workersInfo *controlapi.ListWorkersResponse) (*buildProxy, error)
}
func NewBuildCluster ¶ added in v0.0.341
type BuildFragment ¶ added in v0.0.416
type BuilderConfig ¶ added in v0.0.406
type BuilderConfig struct {
Platform string // e.g. "linux/amd64"
Arch string // e.g. "amd64"
FullBuildkitEndpoint string
ServerCAPath string
ClientKeyPath string
ClientCertPath string
}
func PrepareServerSideBuildxProxy ¶ added in v0.0.406
func PrepareServerSideBuildxProxy(ctx context.Context, stateDir string, platforms []api.BuildPlatform, conf api.BuilderConfiguration) ([]BuilderConfig, error)
type ConnectBits ¶ added in v0.0.440
type ConnectSshFunc ¶ added in v0.0.440
type ConnectSshFunc func(context.Context, string) (ConnectBits, error)
type CreateContainerOpts ¶ added in v0.0.291
type CreateContainerOpts struct {
Name string
Image string
Args []string
Env map[string]string
Flags []string
ExportedPorts []exportContainerPort
Features []string
Labels map[string]string
InternalExtra string
EnableDocker bool
ForwardNscState bool
ExposeNscBins bool
Network string
Experimental map[string]any
InstanceExperimental map[string]any
User string
}
type CreateContainerResult ¶ added in v0.0.404
type CreateContainerResult struct {
InstanceId string
InstanceUrl string
ApiEndpoint string
Containers []api.CreateInstanceResponse_ContainerReference
LegacyContainer []*api.Container
}
func CreateContainerInstance ¶ added in v0.0.291
func CreateContainerInstance(ctx context.Context, machineType string, duration, waitFor time.Duration, target string, opts CreateContainerOpts) (*CreateContainerResult, error)
type InlineSshOpts ¶ added in v0.0.387
type LocalBuilderInstance ¶ added in v0.0.341
type LocalBuilderInstance struct {
// contains filtered or unexported fields
}
func NewLocalBuilderInstance ¶ added in v0.0.341
func NewLocalBuilderInstance(buildkitSockPath string) (*LocalBuilderInstance, error)
func (*LocalBuilderInstance) GetPlatform ¶ added in v0.0.341
func (l *LocalBuilderInstance) GetPlatform() string
func (*LocalBuilderInstance) RunBuildProxy ¶ added in v0.0.341
func (l *LocalBuilderInstance) RunBuildProxy(ctx context.Context, socketPath, controlSocketPath string, useGrpcProxy, annotateBuild bool, workersInfo *controlapi.ListWorkersResponse) (*buildProxy, error)
type ProxyStatus ¶ added in v0.0.303
type ProxyStatus string
const ( ProxyStatus_Starting ProxyStatus = "Starting" ProxyStatus_Running ProxyStatus = "Running" ProxyStatus_Failing ProxyStatus = "Failing" ProxyStatus_ServerSide ProxyStatus = "ServerSideProxy" ProxyStatus_ServerSideUnreachable ProxyStatus = "ServerSideProxyUnreachable" )
type RemoteBuildClusterInstance ¶ added in v0.0.341
type RemoteBuildClusterInstance struct {
// contains filtered or unexported fields
}
func NewRemoteBuildClusterInstance ¶ added in v0.0.444
func NewRemoteBuildClusterInstance(p api.BuildPlatform, waitUntilReady bool) *RemoteBuildClusterInstance
func (*RemoteBuildClusterInstance) GetPlatform ¶ added in v0.0.341
func (bp *RemoteBuildClusterInstance) GetPlatform() string
func (*RemoteBuildClusterInstance) RunBuildProxy ¶ added in v0.0.341
func (bp *RemoteBuildClusterInstance) RunBuildProxy(ctx context.Context, socketPath, controlSocketPath string, useGrpcProxy, annotateBuild bool, workersInfo *controlapi.ListWorkersResponse) (*buildProxy, error)
type ServerProxyEndpoint ¶ added in v0.0.406
type StatusData ¶ added in v0.0.318
Source Files
¶
- artifact.go
- attachdocker.go
- bazel.go
- bazelcredhelper.go
- build.go
- buildkit.go
- buildproxy.go
- buildx.go
- buildx_workers_def.go
- cmd.go
- create.go
- describe.go
- destroy.go
- docker.go
- execscoped.go
- expose.go
- extendduration.go
- git.go
- gitcheckout.go
- grpcproxy.go
- history.go
- ingress.go
- kubectl.go
- logs.go
- machinetype.go
- metadata.go
- pants.go
- portforward.go
- proxy.go
- rdp.go
- registry.go
- release.go
- run.go
- server_side_buildx.go
- ssh.go
- unixsockproxy.go
- vnc.go
- volume.go
Click to show internal directories.
Click to hide internal directories.