Copy disabled (too large)
Download .txt
Showing preview only (11,431K chars total). Download the full file to get everything.
Repository: alexellis/k3sup
Branch: master
Commit: 0e4426970b9f
Files: 911
Total size: 10.7 MB
Directory structure:
gitextract_pskgmy49/
├── .DEREK.yml
├── .github/
│ ├── CODEOWNERS
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── report-an-issue.md
│ │ └── request-a-feature.md
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── build.yaml
│ └── publish.yaml
├── .gitignore
├── EULA.md
├── LICENSE
├── Makefile
├── README.md
├── cmd/
│ ├── get-config.go
│ ├── get.go
│ ├── get_pro.go
│ ├── install.go
│ ├── install_test.go
│ ├── join.go
│ ├── join_test.go
│ ├── node-token.go
│ ├── plan.go
│ ├── pro.go
│ ├── ready.go
│ ├── update.go
│ └── version.go
├── docs/
│ └── assets/
│ └── README.md
├── get.sh
├── go.mod
├── go.sum
├── hack/
│ ├── hashgen.sh
│ └── platform-tag.sh
├── main.go
├── pkg/
│ ├── operator/
│ │ ├── exec_operator.go
│ │ ├── operator.go
│ │ └── ssh_operator.go
│ └── thanks.go
└── vendor/
├── github.com/
│ ├── alexellis/
│ │ ├── arkade/
│ │ │ ├── LICENSE
│ │ │ └── pkg/
│ │ │ ├── archive/
│ │ │ │ ├── untar.go
│ │ │ │ ├── untar_nested.go
│ │ │ │ └── unzip.go
│ │ │ └── env/
│ │ │ └── env.go
│ │ └── go-execute/
│ │ └── v2/
│ │ ├── .DEREK.yml
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ └── exec.go
│ ├── containerd/
│ │ └── stargz-snapshotter/
│ │ └── estargz/
│ │ ├── LICENSE
│ │ ├── build.go
│ │ ├── errorutil/
│ │ │ └── errors.go
│ │ ├── estargz.go
│ │ ├── gzip.go
│ │ ├── testutil.go
│ │ └── types.go
│ ├── docker/
│ │ ├── cli/
│ │ │ ├── AUTHORS
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ └── cli/
│ │ │ └── config/
│ │ │ ├── config.go
│ │ │ ├── configfile/
│ │ │ │ ├── file.go
│ │ │ │ ├── file_unix.go
│ │ │ │ └── file_windows.go
│ │ │ ├── credentials/
│ │ │ │ ├── credentials.go
│ │ │ │ ├── default_store.go
│ │ │ │ ├── default_store_darwin.go
│ │ │ │ ├── default_store_linux.go
│ │ │ │ ├── default_store_unsupported.go
│ │ │ │ ├── default_store_windows.go
│ │ │ │ ├── file_store.go
│ │ │ │ └── native_store.go
│ │ │ ├── memorystore/
│ │ │ │ └── store.go
│ │ │ └── types/
│ │ │ └── authconfig.go
│ │ ├── distribution/
│ │ │ ├── LICENSE
│ │ │ └── registry/
│ │ │ └── client/
│ │ │ └── auth/
│ │ │ └── challenge/
│ │ │ ├── addr.go
│ │ │ └── authchallenge.go
│ │ └── docker-credential-helpers/
│ │ ├── LICENSE
│ │ ├── client/
│ │ │ ├── client.go
│ │ │ └── command.go
│ │ └── credentials/
│ │ ├── credentials.go
│ │ ├── error.go
│ │ ├── helper.go
│ │ └── version.go
│ ├── google/
│ │ └── go-containerregistry/
│ │ ├── LICENSE
│ │ ├── internal/
│ │ │ ├── and/
│ │ │ │ └── and_closer.go
│ │ │ ├── compression/
│ │ │ │ └── compression.go
│ │ │ ├── estargz/
│ │ │ │ └── estargz.go
│ │ │ ├── gzip/
│ │ │ │ └── zip.go
│ │ │ ├── redact/
│ │ │ │ └── redact.go
│ │ │ ├── retry/
│ │ │ │ ├── retry.go
│ │ │ │ └── wait/
│ │ │ │ └── kubernetes_apimachinery_wait.go
│ │ │ ├── verify/
│ │ │ │ └── verify.go
│ │ │ ├── windows/
│ │ │ │ └── windows.go
│ │ │ └── zstd/
│ │ │ └── zstd.go
│ │ └── pkg/
│ │ ├── authn/
│ │ │ ├── README.md
│ │ │ ├── anon.go
│ │ │ ├── auth.go
│ │ │ ├── authn.go
│ │ │ ├── basic.go
│ │ │ ├── bearer.go
│ │ │ ├── doc.go
│ │ │ ├── keychain.go
│ │ │ └── multikeychain.go
│ │ ├── compression/
│ │ │ └── compression.go
│ │ ├── crane/
│ │ │ ├── append.go
│ │ │ ├── catalog.go
│ │ │ ├── config.go
│ │ │ ├── copy.go
│ │ │ ├── delete.go
│ │ │ ├── digest.go
│ │ │ ├── doc.go
│ │ │ ├── export.go
│ │ │ ├── filemap.go
│ │ │ ├── get.go
│ │ │ ├── list.go
│ │ │ ├── manifest.go
│ │ │ ├── options.go
│ │ │ ├── pull.go
│ │ │ ├── push.go
│ │ │ └── tag.go
│ │ ├── legacy/
│ │ │ ├── config.go
│ │ │ ├── doc.go
│ │ │ └── tarball/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ └── write.go
│ │ ├── logs/
│ │ │ └── logs.go
│ │ ├── name/
│ │ │ ├── README.md
│ │ │ ├── check.go
│ │ │ ├── digest.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── options.go
│ │ │ ├── ref.go
│ │ │ ├── registry.go
│ │ │ ├── repository.go
│ │ │ └── tag.go
│ │ └── v1/
│ │ ├── config.go
│ │ ├── doc.go
│ │ ├── empty/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ └── index.go
│ │ ├── hash.go
│ │ ├── image.go
│ │ ├── index.go
│ │ ├── layer.go
│ │ ├── layout/
│ │ │ ├── README.md
│ │ │ ├── blob.go
│ │ │ ├── doc.go
│ │ │ ├── gc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── layoutpath.go
│ │ │ ├── options.go
│ │ │ ├── read.go
│ │ │ └── write.go
│ │ ├── manifest.go
│ │ ├── match/
│ │ │ └── match.go
│ │ ├── mutate/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── mutate.go
│ │ │ └── rebase.go
│ │ ├── partial/
│ │ │ ├── README.md
│ │ │ ├── compressed.go
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── uncompressed.go
│ │ │ └── with.go
│ │ ├── platform.go
│ │ ├── progress.go
│ │ ├── remote/
│ │ │ ├── README.md
│ │ │ ├── catalog.go
│ │ │ ├── check.go
│ │ │ ├── delete.go
│ │ │ ├── descriptor.go
│ │ │ ├── doc.go
│ │ │ ├── fetcher.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── layer.go
│ │ │ ├── list.go
│ │ │ ├── mount.go
│ │ │ ├── multi_write.go
│ │ │ ├── options.go
│ │ │ ├── progress.go
│ │ │ ├── puller.go
│ │ │ ├── pusher.go
│ │ │ ├── referrers.go
│ │ │ ├── schema1.go
│ │ │ ├── transport/
│ │ │ │ ├── README.md
│ │ │ │ ├── basic.go
│ │ │ │ ├── bearer.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── error.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── ping.go
│ │ │ │ ├── retry.go
│ │ │ │ ├── schemer.go
│ │ │ │ ├── scope.go
│ │ │ │ ├── transport.go
│ │ │ │ └── useragent.go
│ │ │ └── write.go
│ │ ├── stream/
│ │ │ ├── README.md
│ │ │ └── layer.go
│ │ ├── tarball/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── layer.go
│ │ │ └── write.go
│ │ ├── types/
│ │ │ └── types.go
│ │ └── zz_deepcopy_generated.go
│ ├── inconshreveable/
│ │ └── mousetrap/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── trap_others.go
│ │ └── trap_windows.go
│ ├── klauspost/
│ │ └── compress/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .goreleaser.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ ├── compressible.go
│ │ ├── fse/
│ │ │ ├── README.md
│ │ │ ├── bitreader.go
│ │ │ ├── bitwriter.go
│ │ │ ├── bytereader.go
│ │ │ ├── compress.go
│ │ │ ├── decompress.go
│ │ │ └── fse.go
│ │ ├── gen.sh
│ │ ├── huff0/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── bitreader.go
│ │ │ ├── bitwriter.go
│ │ │ ├── compress.go
│ │ │ ├── decompress.go
│ │ │ ├── decompress_amd64.go
│ │ │ ├── decompress_amd64.s
│ │ │ ├── decompress_generic.go
│ │ │ └── huff0.go
│ │ ├── internal/
│ │ │ ├── cpuinfo/
│ │ │ │ ├── cpuinfo.go
│ │ │ │ ├── cpuinfo_amd64.go
│ │ │ │ └── cpuinfo_amd64.s
│ │ │ ├── le/
│ │ │ │ ├── le.go
│ │ │ │ ├── unsafe_disabled.go
│ │ │ │ └── unsafe_enabled.go
│ │ │ └── snapref/
│ │ │ ├── LICENSE
│ │ │ ├── decode.go
│ │ │ ├── decode_other.go
│ │ │ ├── encode.go
│ │ │ ├── encode_other.go
│ │ │ └── snappy.go
│ │ ├── s2sx.mod
│ │ ├── s2sx.sum
│ │ └── zstd/
│ │ ├── README.md
│ │ ├── bitreader.go
│ │ ├── bitwriter.go
│ │ ├── blockdec.go
│ │ ├── blockenc.go
│ │ ├── blocktype_string.go
│ │ ├── bytebuf.go
│ │ ├── bytereader.go
│ │ ├── decodeheader.go
│ │ ├── decoder.go
│ │ ├── decoder_options.go
│ │ ├── dict.go
│ │ ├── enc_base.go
│ │ ├── enc_best.go
│ │ ├── enc_better.go
│ │ ├── enc_dfast.go
│ │ ├── enc_fast.go
│ │ ├── encoder.go
│ │ ├── encoder_options.go
│ │ ├── framedec.go
│ │ ├── frameenc.go
│ │ ├── fse_decoder.go
│ │ ├── fse_decoder_amd64.go
│ │ ├── fse_decoder_amd64.s
│ │ ├── fse_decoder_generic.go
│ │ ├── fse_encoder.go
│ │ ├── fse_predefined.go
│ │ ├── hash.go
│ │ ├── history.go
│ │ ├── internal/
│ │ │ └── xxhash/
│ │ │ ├── README.md
│ │ │ ├── xxhash.go
│ │ │ ├── xxhash_amd64.s
│ │ │ ├── xxhash_arm64.s
│ │ │ ├── xxhash_asm.go
│ │ │ ├── xxhash_other.go
│ │ │ └── xxhash_safe.go
│ │ ├── matchlen_amd64.go
│ │ ├── matchlen_amd64.s
│ │ ├── matchlen_generic.go
│ │ ├── seqdec.go
│ │ ├── seqdec_amd64.go
│ │ ├── seqdec_amd64.s
│ │ ├── seqdec_generic.go
│ │ ├── seqenc.go
│ │ ├── simple_go124.go
│ │ ├── snappy.go
│ │ ├── zip.go
│ │ └── zstd.go
│ ├── mitchellh/
│ │ └── go-homedir/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── homedir.go
│ ├── morikuni/
│ │ └── aec/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── aec.go
│ │ ├── ansi.go
│ │ ├── builder.go
│ │ └── sgr.go
│ ├── opencontainers/
│ │ ├── go-digest/
│ │ │ ├── .mailmap
│ │ │ ├── .pullapprove.yml
│ │ │ ├── .travis.yml
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── LICENSE.docs
│ │ │ ├── MAINTAINERS
│ │ │ ├── README.md
│ │ │ ├── algorithm.go
│ │ │ ├── digest.go
│ │ │ ├── digester.go
│ │ │ ├── doc.go
│ │ │ └── verifiers.go
│ │ └── image-spec/
│ │ ├── LICENSE
│ │ └── specs-go/
│ │ ├── v1/
│ │ │ ├── annotations.go
│ │ │ ├── config.go
│ │ │ ├── descriptor.go
│ │ │ ├── index.go
│ │ │ ├── layout.go
│ │ │ ├── manifest.go
│ │ │ └── mediatype.go
│ │ ├── version.go
│ │ └── versioned.go
│ ├── spf13/
│ │ ├── cobra/
│ │ │ ├── .gitignore
│ │ │ ├── .golangci.yml
│ │ │ ├── .mailmap
│ │ │ ├── CONDUCT.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── MAINTAINERS
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SECURITY.md
│ │ │ ├── active_help.go
│ │ │ ├── args.go
│ │ │ ├── bash_completions.go
│ │ │ ├── bash_completionsV2.go
│ │ │ ├── cobra.go
│ │ │ ├── command.go
│ │ │ ├── command_notwin.go
│ │ │ ├── command_win.go
│ │ │ ├── completions.go
│ │ │ ├── fish_completions.go
│ │ │ ├── flag_groups.go
│ │ │ ├── powershell_completions.go
│ │ │ ├── shell_completions.go
│ │ │ └── zsh_completions.go
│ │ └── pflag/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── .golangci.yaml
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bool.go
│ │ ├── bool_func.go
│ │ ├── bool_slice.go
│ │ ├── bytes.go
│ │ ├── count.go
│ │ ├── duration.go
│ │ ├── duration_slice.go
│ │ ├── errors.go
│ │ ├── flag.go
│ │ ├── float32.go
│ │ ├── float32_slice.go
│ │ ├── float64.go
│ │ ├── float64_slice.go
│ │ ├── func.go
│ │ ├── golangflag.go
│ │ ├── int.go
│ │ ├── int16.go
│ │ ├── int32.go
│ │ ├── int32_slice.go
│ │ ├── int64.go
│ │ ├── int64_slice.go
│ │ ├── int8.go
│ │ ├── int_slice.go
│ │ ├── ip.go
│ │ ├── ip_slice.go
│ │ ├── ipmask.go
│ │ ├── ipnet.go
│ │ ├── ipnet_slice.go
│ │ ├── string.go
│ │ ├── string_array.go
│ │ ├── string_slice.go
│ │ ├── string_to_int.go
│ │ ├── string_to_int64.go
│ │ ├── string_to_string.go
│ │ ├── text.go
│ │ ├── time.go
│ │ ├── uint.go
│ │ ├── uint16.go
│ │ ├── uint32.go
│ │ ├── uint64.go
│ │ ├── uint8.go
│ │ └── uint_slice.go
│ └── vbatts/
│ └── tar-split/
│ ├── LICENSE
│ └── archive/
│ └── tar/
│ ├── common.go
│ ├── format.go
│ ├── reader.go
│ ├── stat_actime1.go
│ ├── stat_actime2.go
│ ├── stat_unix.go
│ ├── strconv.go
│ └── writer.go
└── golang.org/
└── x/
├── crypto/
│ ├── LICENSE
│ ├── PATENTS
│ ├── blowfish/
│ │ ├── block.go
│ │ ├── cipher.go
│ │ └── const.go
│ ├── chacha20/
│ │ ├── chacha_arm64.go
│ │ ├── chacha_arm64.s
│ │ ├── chacha_generic.go
│ │ ├── chacha_noasm.go
│ │ ├── chacha_ppc64x.go
│ │ ├── chacha_ppc64x.s
│ │ ├── chacha_s390x.go
│ │ ├── chacha_s390x.s
│ │ └── xor.go
│ ├── curve25519/
│ │ └── curve25519.go
│ ├── internal/
│ │ ├── alias/
│ │ │ ├── alias.go
│ │ │ └── alias_purego.go
│ │ └── poly1305/
│ │ ├── mac_noasm.go
│ │ ├── poly1305.go
│ │ ├── sum_amd64.s
│ │ ├── sum_asm.go
│ │ ├── sum_generic.go
│ │ ├── sum_loong64.s
│ │ ├── sum_ppc64x.s
│ │ ├── sum_s390x.go
│ │ └── sum_s390x.s
│ └── ssh/
│ ├── agent/
│ │ ├── client.go
│ │ ├── forward.go
│ │ ├── keyring.go
│ │ └── server.go
│ ├── buffer.go
│ ├── certs.go
│ ├── channel.go
│ ├── cipher.go
│ ├── client.go
│ ├── client_auth.go
│ ├── common.go
│ ├── connection.go
│ ├── doc.go
│ ├── handshake.go
│ ├── internal/
│ │ └── bcrypt_pbkdf/
│ │ └── bcrypt_pbkdf.go
│ ├── kex.go
│ ├── keys.go
│ ├── mac.go
│ ├── messages.go
│ ├── mlkem.go
│ ├── mux.go
│ ├── server.go
│ ├── session.go
│ ├── ssh_gss.go
│ ├── streamlocal.go
│ ├── tcpip.go
│ └── transport.go
├── sync/
│ ├── LICENSE
│ ├── PATENTS
│ └── errgroup/
│ └── errgroup.go
├── sys/
│ ├── LICENSE
│ ├── PATENTS
│ ├── cpu/
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_darwin_x86_gc.s
│ │ ├── byteorder.go
│ │ ├── cpu.go
│ │ ├── cpu_aix.go
│ │ ├── cpu_arm.go
│ │ ├── cpu_arm64.go
│ │ ├── cpu_arm64.s
│ │ ├── cpu_darwin_x86.go
│ │ ├── cpu_gc_arm64.go
│ │ ├── cpu_gc_s390x.go
│ │ ├── cpu_gc_x86.go
│ │ ├── cpu_gc_x86.s
│ │ ├── cpu_gccgo_arm64.go
│ │ ├── cpu_gccgo_s390x.go
│ │ ├── cpu_gccgo_x86.c
│ │ ├── cpu_gccgo_x86.go
│ │ ├── cpu_linux.go
│ │ ├── cpu_linux_arm.go
│ │ ├── cpu_linux_arm64.go
│ │ ├── cpu_linux_loong64.go
│ │ ├── cpu_linux_mips64x.go
│ │ ├── cpu_linux_noinit.go
│ │ ├── cpu_linux_ppc64x.go
│ │ ├── cpu_linux_riscv64.go
│ │ ├── cpu_linux_s390x.go
│ │ ├── cpu_loong64.go
│ │ ├── cpu_loong64.s
│ │ ├── cpu_mips64x.go
│ │ ├── cpu_mipsx.go
│ │ ├── cpu_netbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.s
│ │ ├── cpu_other_arm.go
│ │ ├── cpu_other_arm64.go
│ │ ├── cpu_other_mips64x.go
│ │ ├── cpu_other_ppc64x.go
│ │ ├── cpu_other_riscv64.go
│ │ ├── cpu_other_x86.go
│ │ ├── cpu_ppc64x.go
│ │ ├── cpu_riscv64.go
│ │ ├── cpu_s390x.go
│ │ ├── cpu_s390x.s
│ │ ├── cpu_wasm.go
│ │ ├── cpu_windows_arm64.go
│ │ ├── cpu_x86.go
│ │ ├── cpu_zos.go
│ │ ├── cpu_zos_s390x.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── hwcap_linux.go
│ │ ├── parse.go
│ │ ├── proc_cpuinfo_linux.go
│ │ ├── runtime_auxv.go
│ │ ├── runtime_auxv_go121.go
│ │ ├── syscall_aix_gccgo.go
│ │ ├── syscall_aix_ppc64_gc.go
│ │ └── syscall_darwin_x86_gc.go
│ ├── plan9/
│ │ ├── asm.s
│ │ ├── asm_plan9_386.s
│ │ ├── asm_plan9_amd64.s
│ │ ├── asm_plan9_arm.s
│ │ ├── const_plan9.go
│ │ ├── dir_plan9.go
│ │ ├── env_plan9.go
│ │ ├── errors_plan9.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mksysnum_plan9.sh
│ │ ├── pwd_plan9.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_plan9.go
│ │ ├── zsyscall_plan9_386.go
│ │ ├── zsyscall_plan9_amd64.go
│ │ ├── zsyscall_plan9_arm.go
│ │ └── zsysnum_plan9.go
│ ├── unix/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_bsd_386.s
│ │ ├── asm_bsd_amd64.s
│ │ ├── asm_bsd_arm.s
│ │ ├── asm_bsd_arm64.s
│ │ ├── asm_bsd_ppc64.s
│ │ ├── asm_bsd_riscv64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_loong64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_riscv64.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_openbsd_mips64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── asm_zos_s390x.s
│ │ ├── auxv.go
│ │ ├── auxv_unsupported.go
│ │ ├── bluetooth_linux.go
│ │ ├── bpxsvc_zos.go
│ │ ├── bpxsvc_zos.s
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dev_zos.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ifreq_linux.go
│ │ ├── ioctl_linux.go
│ │ ├── ioctl_signed.go
│ │ ├── ioctl_unsigned.go
│ │ ├── ioctl_zos.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mmap_nomremap.go
│ │ ├── mremap.go
│ │ ├── pagesize_unix.go
│ │ ├── pledge_openbsd.go
│ │ ├── ptrace_darwin.go
│ │ ├── ptrace_ios.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── readdirent_getdents.go
│ │ ├── readdirent_getdirentries.go
│ │ ├── sockcmsg_dragonfly.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── sockcmsg_unix_other.go
│ │ ├── sockcmsg_zos.go
│ │ ├── symaddr_zos_s390x.s
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_freebsd_riscv64.go
│ │ ├── syscall_hurd.go
│ │ ├── syscall_hurd_386.go
│ │ ├── syscall_illumos.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_alarm.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gc_arm.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_loong64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_openbsd_libc.go
│ │ ├── syscall_openbsd_mips64.go
│ │ ├── syscall_openbsd_ppc64.go
│ │ ├── syscall_openbsd_riscv64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── syscall_zos_s390x.go
│ │ ├── sysvshm_linux.go
│ │ ├── sysvshm_unix.go
│ │ ├── sysvshm_unix_other.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── vgetrandom_linux.go
│ │ ├── vgetrandom_unsupported.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_freebsd_riscv64.go
│ │ ├── zerrors_linux.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_loong64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_openbsd_mips64.go
│ │ ├── zerrors_openbsd_ppc64.go
│ │ ├── zerrors_openbsd_riscv64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zerrors_zos_s390x.go
│ │ ├── zptrace_armnn_linux.go
│ │ ├── zptrace_linux_arm64.go
│ │ ├── zptrace_mipsnn_linux.go
│ │ ├── zptrace_mipsnnle_linux.go
│ │ ├── zptrace_x86_linux.go
│ │ ├── zsymaddr_zos_s390x.s
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_freebsd_riscv64.go
│ │ ├── zsyscall_illumos_amd64.go
│ │ ├── zsyscall_linux.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_loong64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_386.s
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_amd64.s
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm.s
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_openbsd_arm64.s
│ │ ├── zsyscall_openbsd_mips64.go
│ │ ├── zsyscall_openbsd_mips64.s
│ │ ├── zsyscall_openbsd_ppc64.go
│ │ ├── zsyscall_openbsd_ppc64.s
│ │ ├── zsyscall_openbsd_riscv64.go
│ │ ├── zsyscall_openbsd_riscv64.s
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsyscall_zos_s390x.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysctl_openbsd_mips64.go
│ │ ├── zsysctl_openbsd_ppc64.go
│ │ ├── zsysctl_openbsd_riscv64.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_freebsd_riscv64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_loong64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── zsysnum_openbsd_mips64.go
│ │ ├── zsysnum_openbsd_ppc64.go
│ │ ├── zsysnum_openbsd_riscv64.go
│ │ ├── zsysnum_zos_s390x.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_freebsd_riscv64.go
│ │ ├── ztypes_linux.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_loong64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ ├── ztypes_openbsd_mips64.go
│ │ ├── ztypes_openbsd_ppc64.go
│ │ ├── ztypes_openbsd_riscv64.go
│ │ ├── ztypes_solaris_amd64.go
│ │ └── ztypes_zos_s390x.go
│ └── windows/
│ ├── aliases.go
│ ├── dll_windows.go
│ ├── env_windows.go
│ ├── eventlog.go
│ ├── exec_windows.go
│ ├── memory_windows.go
│ ├── mkerrors.bash
│ ├── mkknownfolderids.bash
│ ├── mksyscall.go
│ ├── race.go
│ ├── race0.go
│ ├── security_windows.go
│ ├── service.go
│ ├── setupapi_windows.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_windows.go
│ ├── types_windows.go
│ ├── types_windows_386.go
│ ├── types_windows_amd64.go
│ ├── types_windows_arm.go
│ ├── types_windows_arm64.go
│ ├── zerrors_windows.go
│ ├── zknownfolderids_windows.go
│ └── zsyscall_windows.go
└── term/
├── CONTRIBUTING.md
├── LICENSE
├── PATENTS
├── README.md
├── codereview.cfg
├── term.go
├── term_plan9.go
├── term_unix.go
├── term_unix_bsd.go
├── term_unix_other.go
├── term_unsupported.go
├── term_windows.go
└── terminal.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .DEREK.yml
================================================
curators:
- alexellis
- welteki
- rgee0
features:
- dco_check
- comments
- pr_description_required
- release_notes
custom_messages:
- name: k3s
value: |
--
Thank you for your interest in k3sup.
This issue appears to be a problem with the upstream k3s project
which k3sup installs and automates.
Please raise an issue on [Rancher's k3s repository](https://github.com/rancher/k3s/) and
link it back to this issue for tracking purposes. If Rancher determines that this is
actually an error with k3sup, then please feel free to return and re-open the issue, or
to comment again.
- name: template
value: |
This project uses Issue and PR templates and requires that all
users fill out the template in detail before help can be given.
To continue please edit your Issue/PR or open a new one, and
please provide all the fields requested.
Thank you for your contribution.
- name: propose
value: |
This project follows a contributing guide which states that all
changes must be proposed with an Issue before being worked on.
Please raise an Issue and update your Pull Request to include
the ID or link as part of the description.
Thank you for your contribution.
- name: test
value: |
This project follows a contributing guide which requires that
all changes are tested before being merged. You should include
worked examples that a maintainer can run to prove that the
changes are good.
Screenshots and command line output are also accepted, but
must show the positive, and negative cases, not just that
what was added worked as you expected.
Thank you for your contribution.
contributing_url: https://github.com/alexellis/arkade/blob/master/CONTRIBUTING.md
================================================
FILE: .github/CODEOWNERS
================================================
@alexellis
================================================
FILE: .github/FUNDING.yml
================================================
custom: ["https://slicervm.com"]
================================================
FILE: .github/ISSUE_TEMPLATE/report-an-issue.md
================================================
---
name: Report an issue
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Expected behaviour**
What did you expect to happen?
**Current behaviour**
What happened?
**To Reproduce**
Include full unabridged instructions that anyone can use to reproduce the problem
**Screenshots / console output**
Add a screenshot or console output
**Versions:**
- OS:
- K3sup Version:
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/request-a-feature.md
================================================
---
name: Request a feature
about: Request a new feature or change in this project
title: ''
labels: ''
assignees: ''
---
**What do you want?**
Focus on the feature, not the technical approach or solution.
**Why do you want this?**
Make a case for why your request should be considered.
**Recommended solution**
If you are aware of one, share your preferred solution here
**Additional context**
Share any other context you feel is relevant or adds to your case.
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--- Provide a general summary of the issue in the Title above -->
## Why do you need this?
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
<!--- Is this request for work, a client, your employer or for fun? -->
## Expected Behaviour
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
## Current Behaviour
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Your Environment
* k3sup version:
```
k3sup version
```
* What Kubernetes distribution, client and server version are you using?
```
kubectl version
```
* What OS or type or VM are you using for your cluster? Where is it hosted? (for `k3sup install/join`):
* Operating System and version (e.g. Linux, Windows, MacOS):
```
uname -a
cat /etc/os-release
```
## Do you want to work on this?
Subject to design approval, are you willing to work on a Pull Request for this issue or feature request?
- [ ] Yes
- [ ] No
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--- Provide a general summary of the issue in the Title above -->
## Why do you need this?
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
- [ ] I have raised an issue to propose this change ([required](https://github.com/openfaas/faas/blob/master/CONTRIBUTING.md))
If you have no approval from a maintainer, close this PR and raise an issue.
## Description
<!--- Describe your changes in detail -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I've read the [CONTRIBUTION](https://github.com/alexellis/arkade/blob/master/CONTRIBUTING.md) guide
- [ ] I have signed-off my commits with `git commit -s`
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
================================================
FILE: .github/workflows/build.yaml
================================================
name: build
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
build:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: "1.26.x"
- name: Make all
run: make all
================================================
FILE: .github/workflows/publish.yaml
================================================
name: publish
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: "1.26.x"
- name: Make all
run: make all
- name: Upload release binaries
uses: alexellis/upload-assets@0.4.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./bin/k3sup*"]'
================================================
FILE: .gitignore
================================================
k3sup
bin/**
kubeconfig
.DS_Store
.idea/
mc
/install.sh
/*.json
*.txt
/bootstrap.sh
================================================
FILE: EULA.md
================================================
End User License Agreement (EULA) for K3sup Pro
Note: K3sup CE is licensed under the MIT license, see LICENSE for details.
1. Licensed Software
1.1 K3sup Pro (the “Licensed Software”) is licensed as commercial software and must not be used without a valid license key issued by OpenFaaS Ltd.
1.2 K3sup Pro may be offered in different editions or variants from time to time. The term “K3sup Pro” in this Agreement refers to any commercially licensed edition or variant of K3sup Pro provided by OpenFaaS Ltd.
1.3 OpenFaaS Ltd (“Supplier”) is a company registered in England & Wales, company number: 11076587, registered address: Peterborough, UK.
2. Your Agreement
2.1 By accessing, executing, or otherwise using the Licensed Software, you (“Customer”) acknowledge that you have read this Agreement, understand it, and agree to be bound by its terms and conditions. If you are not willing to be bound by the terms of this Agreement, do not access or use the Licensed Software.
2.2 If you are using the Licensed Software in your capacity as employee or agent of a company or organization, then any references to “you” in this Agreement shall refer to such entity and not to you in your personal capacity. You warrant that you are authorized to legally bind the company or organization on whose behalf you are accessing the Licensed Software. If you are not so authorized, then neither you nor your company or organization may use the Licensed Software in any manner whatsoever.
2.3 This Agreement, including any supplemental terms, is between you (“Customer”) and OpenFaaS Ltd (“Supplier”).
2.4 Governing law. This Agreement is entered into under the jurisdiction of the Courts of England and Wales and shall be governed by, and construed in accordance with, the laws of England and Wales, exclusive of its choice of law rules.
3. No Free Trial
3.1 No free trial is offered or available for K3sup Pro. Access to and use of the Licensed Software requires a valid, paid license at all times.
3.2 Any evaluation use of K3sup Pro may only occur under a separate, written evaluation agreement executed by Supplier in its sole discretion. In the absence of such a written evaluation agreement, you must not use the Licensed Software for any evaluation or trial purposes.
4. Grant of License; Ownership; Restrictions; Feedback
4.1 License Grant. Subject to the terms and conditions of this Agreement and any applicable order form, invoice, quote, or checkout confirmation (each an “Order Form”), Supplier grants to Customer a limited, non-exclusive, non-transferable, revocable license to install and use the Licensed Software solely for Customer’s internal purposes and only for the term and in accordance with the conditions and limitations set forth herein and in the applicable Order Form.
4.2 Third-Party and Open Source Software. To the extent that there is any third-party software embedded in, bundled with, or otherwise provided to Customer in connection with the Licensed Software (“Third Party Software”), such Third Party Software shall be used solely with the operation of the Licensed Software and not as a standalone application or for any other purpose. Certain Third Party Software may be subject to an open source license (“OSS License”). Customer’s rights with respect to such components are governed by the applicable OSS License; nothing in this Agreement shall restrict, limit, or otherwise affect any rights or obligations Customer may have under such OSS License. This includes, without limitation, the Apache License, Version 2.0 and the MIT License.
4.3 Ownership. As between the parties, Supplier retains all right, title, and interest in and to the Licensed Software and all related materials, including all intellectual property rights therein, whether now existing or later arising.
4.4 Intellectual Property Rights. Copyright for samples, code, logos, trademarks, diagrams, and documentation rests with Supplier. All pre-existing intellectual property remains the property of the originating party; no intellectual property is transferred from Customer to Supplier under this Agreement.
4.5 Restrictions. Except to the extent expressly permitted by applicable law and only to the extent Supplier is not permitted by that applicable law to exclude or limit such rights, Customer shall not (and shall not permit any third party to) distribute, display, sublicense, rent, lease, lend, timeshare, use in a service bureau, modify, translate, reverse engineer, decompile, disassemble, create derivative works based on, or copy the Licensed Software or related documentation. Customer shall not remove, alter, or obscure any proprietary notices or labels on the Licensed Software.
4.6 Feedback. Customer may provide feedback to Supplier about the Licensed Software (including suggestions or enhancement requests). Supplier may develop, modify, and improve the Licensed Software based on Customer’s feedback without obligation to Customer, and Customer irrevocably assigns to Supplier all right, title, and interest in such feedback.
5. Licensing and Use Rights
5.1 Personal Use via GitHub Sponsorship. Personal use is permitted through an active GitHub Sponsorship to either @alexellis or @openfaas on GitHub at a minimum of 25 USD per month. Termination, lapse, or downgrade of Sponsorship below this minimum immediately terminates the license. Personal use counts only for installation to privately owned hardware, or rented cloud hosts, which are in no way connected to or operated for or on the behalf of a business. Personal licenses are for a single named individual, non-transferable, and may not be used to provide services to, or on behalf of, any business, organization, or client.
5.2 Commercial Use. Commercial use requires a paid license per user (seat). A minimum of five (5) seats is required and licenses are paid annually via ACH in USD or SWIFT in GBP. To request a commercial license, email [contact@openfaas.com](mailto:contact@openfaas.com). Contractors, consultants, managed service providers, and any use on infrastructure connected to or operated for or on behalf of a business require a commercial license.
5.3 Priority of Terms. If there is any conflict between this Section 5 and any Order Form, the Order Form shall prevail solely with respect to the quantities, term, and pricing stated therein.
6. Termination and Continuing Obligations; Renewal Responsibility
6.1 Term. This Agreement is effective from the first date you install, access, or use the Licensed Software and continues until terminated as set forth below.
6.2 By Customer. Customer may terminate this Agreement at any time by permanently deleting the Licensed Software, destroying all copies, and ceasing all use.
6.3 By Supplier. Supplier may terminate this Agreement immediately upon written notice if Customer fails to comply with any terms or conditions herein, including use without a valid license (including a lapsed Sponsorship for personal use) or use beyond the scope or term of the license granted.
6.4 Automatic Termination. This Agreement terminates automatically without notice upon expiry of the license term, failure to renew, or termination of the qualifying GitHub Sponsorship for personal use.
6.5 Effect of Termination. Upon termination, Customer must immediately stop using the Licensed Software, delete all copies in its possession or control, and confirm in writing to Supplier that these actions have been completed. Sections 1, 2, 4, 5, 7, 8, and 9 survive termination.
6.6 Renewal Responsibility. It is the sole responsibility of Customer to renew and remit payment for any licenses in a timely manner to maintain uninterrupted access and compliance. Supplier recommends requesting a renewal quote at least thirty (30) days prior to the expiry of the current term. Supplier bears no costs, liabilities, or obligations related to Customer’s failure to renew or remit payment; any interruption due to non-renewal or non-payment does not entitle Customer to any remedies or compensation.
7. Customer Data; Audit
7.1 Account Data. To use the Licensed Software, Customer may need to provide contact and billing information (“Account Data”). Customer must provide complete and accurate Account Data and keep it up to date. By providing Account Data, Customer consents to receive communications from Supplier regarding the Licensed Software and other Supplier products. Customer may opt out of marketing communications by contacting [contact@openfaas.com](mailto:contact@openfaas.com).
7.2 Audit. Supplier may audit Customer’s use of the Licensed Software to assess compliance with this Agreement. Customer agrees to cooperate and provide reasonable assistance and access to relevant records (including, for example, purchase records, deployment records, and license key usage logs). Any audit shall not unreasonably interfere with Customer’s normal business operations.
8. Co-Marketing
8.1 At the request of Supplier, Customer agrees to participate in reasonable marketing activities that promote the benefits of the Licensed Software to other potential customers, which may include providing testimonials, case studies, and references.
8.2 Customer grants Supplier the right to use Customer’s name and logo on Supplier’s websites and in Supplier’s promotional materials.
8.3 Customer agrees that Supplier may disclose Customer as a customer of the Licensed Software.
9. Limitation of Liability; Disclaimer
9.1 Warranty Disclaimer. The Licensed Software and documentation are provided “as is” and “as available” without warranty of any kind, express or implied. Customer uses the Licensed Software at its own risk. Customer assumes all responsibility for selecting the Licensed Software to achieve its intended results and for the installation of, and results obtained from, the Licensed Software.
9.2 No Consequential Damages. IN NO EVENT SHALL SUPPLIER BE LIABLE HEREUNDER FOR SPECIAL, PUNITIVE, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES, INCLUDING, BUT NOT LIMITED TO, LOSS OF PROFITS, LOSS OF REVENUE, LOSS OF USE, OR LOSS OF DATA, EVEN IF ADVISED OF THE POSSIBILITY THEREOF OR, IF REASONABLY FORESEEABLE, INCURRED BY CUSTOMER OR END USERS, OR CLAIMED AGAINST CUSTOMER BY ANY OTHER PARTY (WHETHER ANY SUCH CLAIMS ARISE UNDER THEORY OF CONTRACT, TORT, OR OTHERWISE).
9.3 Liability Cap. To the extent permitted by applicable law, the aggregate liability of Supplier and its licensors, personnel, subcontractors, and suppliers arising out of or related to this Agreement shall not exceed the license fees paid by Customer hereunder in the twelve (12) months immediately preceding the event giving rise to the claim.
10. Contact
If you have any questions about these terms or the Licensed Software, contact Supplier at [contact@openfaas.com](mailto:contact@openfaas.com).
================================================
FILE: LICENSE
================================================
There are two editions of K3sup.
K3sup Pro
Copyright (c) 2025 Alex Ellis, OpenFaaS Ltd
License: Proprietary - K3sup Pro EULA.
K3sup CE
MIT License
Copyright (c) 2025 Alex Ellis
Exclusions: assets, images and logos.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Makefile
================================================
Version := $(shell git describe --tags --dirty)
# Version := "dev"
GitCommit := $(shell git rev-parse HEAD)
LDFLAGS := "-s -w -X github.com/alexellis/k3sup/cmd.Version=$(Version) -X github.com/alexellis/k3sup/cmd.GitCommit=$(GitCommit)"
export GO111MODULE=on
SOURCE_DIRS = main.go cmd pkg
.PHONY: all
all: gofmt test dist hash
.PHONY: test
test:
CGO_ENABLED=0 go test $(shell go list ./... | grep -v /vendor/|xargs echo) -cover
.PHONY: gofmt
gofmt:
@test -z $(shell gofmt -l $(SOURCE_DIRS) ./ | grep -v vendor/| tee /dev/stderr) || (echo "[WARN] Fix formatting issues with 'make gofmt'" && exit 1)
.PHONY: dist
dist:
mkdir -p bin/
rm -rf bin/k3sup*
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) -o bin/k3sup
GOARM=7 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -ldflags $(LDFLAGS) -o bin/k3sup-armhf
GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -ldflags $(LDFLAGS) -o bin/k3sup-arm64
CGO_ENABLED=0 GOOS=darwin go build -ldflags $(LDFLAGS) -o bin/k3sup-darwin
GOARCH=arm64 CGO_ENABLED=0 GOOS=darwin go build -ldflags $(LDFLAGS) -o bin/k3sup-darwin-arm64
GOOS=windows CGO_ENABLED=0 go build -ldflags $(LDFLAGS) -o bin/k3sup.exe
.PHONY: hash
hash:
rm -rf bin/*.sha256 && ./hack/hashgen.sh
================================================
FILE: README.md
================================================
# k3sup 🚀 (said 'ketchup')
<img src="docs/assets/k3sup.png" width="20%" alt="k3sup logo">
k3sup is a light-weight utility to get from zero to KUBECONFIG with [k3s](https://k3s.io/) on any local or remote VM. All you need is `ssh` access and the `k3sup` binary to get `kubectl` access immediately.
The tool is written in Go and is cross-compiled for Linux, Windows, MacOS and even on Raspberry Pi.
How do you say it? Ketchup, as in tomato.
**Introducing K3sup Pro 🎉**
Whilst the CE edition is ideal for experimentation, [`k3sup-pro`](#k3sup-pro) was built to satisfy long standing requests for an IaaC/GitOps experience.
`k3sup-pro` adds a `plan` and `apply` command to automate installations both small and large - running in parallel. The plan file can be customised and retained in Git for maintenance and updates.
[](https://opensource.org/licenses/MIT)
[](https://github.com/alexellis/k3sup/actions/workflows/build.yaml)
[]()
## Contents:
- [k3sup 🚀 (said 'ketchup')](#k3sup--said-ketchup)
- [Contents:](#contents)
- [What's this for? 💻](#whats-this-for-)
- [Use-cases](#use-cases)
- [Bootstrapping Kubernetes](#bootstrapping-kubernetes)
- [Download `k3sup` CE (tl;dr)](#download-k3sup-ce-tldr)
- [Demo of K3sup CE📼](#demo-of-k3sup-ce)
- [Usage ✅](#usage-)
- [Pre-requisites for k3sup servers and agents](#pre-requisites-for-k3sup-servers-and-agents)
- [K3sup Pro](#k3sup-pro)
- [Getting `k3sup-pro`](#getting-k3sup-pro)
- [Activating K3sup Pro](#activating-k3sup-pro)
- [K3sup `plan` / `apply` for automation and large installations](#k3sup-plan--apply-for-automation-and-large-installations)
- [Rapid uninstallation / reset with `k3sup-pro uninstall`](#rapid-uninstallation--reset-with-k3sup-pro-uninstall)
- [K3sup `pro exec` - run a command everywhere](#k3sup-pro-exec---run-a-command-everywhere)
- [K3sup `pro get-config` - work with an existing cluster](#k3sup-pro-get-config---work-with-an-existing-cluster)
- [K3sup Community Edition (CE)](#k3sup-community-edition-ce)
- [👑 Setup a Kubernetes *server* with `k3sup`](#-setup-a-kubernetes-server-with-k3sup)
- [Checking if a cluster is ready](#checking-if-a-cluster-is-ready)
- [Merging clusters into your KUBECONFIG](#merging-clusters-into-your-kubeconfig)
- [😸 Join some agents to your Kubernetes server](#-join-some-agents-to-your-kubernetes-server)
- [Use your hardware authentication / 2FA or SSH Agent](#use-your-hardware-authentication--2fa-or-ssh-agent)
- [Create a multi-master (HA) setup with external SQL](#create-a-multi-master-ha-setup-with-external-sql)
- [Create a multi-master (HA) setup with embedded etcd](#create-a-multi-master-ha-setup-with-embedded-etcd)
- [👨💻 Micro-tutorial for Raspberry Pi (2, 3, or 4) 🥧](#-micro-tutorial-for-raspberry-pi-2-3-or-4-)
- [Caveats on security](#caveats-on-security)
- [Contributing](#contributing)
- [Blog posts & tweets](#blog-posts--tweets)
- [Contributing via GitHub](#contributing-via-github)
- [License](#license)
- [📢 What are people saying about `k3sup`?](#-what-are-people-saying-about-k3sup)
- [Similar tools & glossary](#similar-tools--glossary)
- [Troubleshooting and support](#troubleshooting-and-support)
- [Maybe the problem is with K3s?](#maybe-the-problem-is-with-k3s)
- [Common issues](#common-issues)
- [Getting access to your KUBECONFIG](#getting-access-to-your-kubeconfig)
- [Smart cards and 2FA](#smart-cards-and-2fa)
- [Misc note on `iptables`](#misc-note-on-iptables)
## What's this for? 💻
This tool uses `ssh` to install `k3s` to a remote Linux host. You can also use it to join existing Linux hosts into a k3s cluster as `agents`. First, `k3s` is installed using the utility script from Rancher, along with a flag for your host's public IP so that TLS works properly. The `kubeconfig` file on the server is then fetched and updated so that you can connect from your laptop using `kubectl`.
You may wonder why a tool like this needs to exist when you can do this sort of thing with bash.
k3sup was developed to automate what can be a very manual and confusing process for many developers, who are already short on time. Once you've provisioned a VM with your favourite tooling, `k3sup` means you are only 60 seconds away from running `kubectl get pods` on your own computer. If you are a local computer, you can bypass SSH with `k3sup install --local`
**How does k3sup work?**
```
k3sup install
+---------------------+ +-----------------------------+
| | 1. SSH | |
| Your Laptop / +---------------->| Remote Server (VM/RPi) |
| Workstation | | |
| | 2. Install | +---------------------+ |
| +----------------+ | k3s -------->| | k3s (server/agent) | |
| | kubectl | | | +---------------------+ |
| +----------------+ | 3. Fetch | |
| | kubeconfig |<-+ kubeconfig | |
| +----------------+ | +-----------------------------+
| |
+---------------------+ k3sup join
+-------------------->+-----------+
| | Agent 1 |
+-------------------->+-----------+
| | Agent 2 |
+-------------------->+-----------+
| Agent n |
+-----------+
```
* Step 1: k3sup install → SSH into server, install k3s
* Step 2: kubeconfig → Fetched to your laptop automatically
* Step 3: k3sup join → Add agents to the cluster via SSH
* Step 4: kubectl → Ready to use from your laptop 🚀
> **Tip:** Create clusters on Mac, Linux + WSL2 with K3sup and [SlicerVM](https://slicervm.com)
### Use-cases
K3sup runs from your local machine, without ever having to log into a remote server.
* Bootstrap Kubernetes with k3s onto any VM with `k3sup install` - either manually, during CI or through `cloud-init`
* Get from zero to `kubectl` with `k3s` on bare-metal, Raspberry Pi (RPi), VMs, AWS EC2, Google Cloud, DigitalOcean, Civo, Linode, Scaleway, and others
* Build a Highly-Available (HA), multi-master (server) cluster
* Fetch the KUBECONFIG from an existing cluster with `k3sup-pro get-config`
* Join nodes into an existing `k3s` cluster with `k3sup join`
* Build a massive cluster for automation and scale-out testing using `k3sup plan` and a JSON file with IP addresses
### Bootstrapping Kubernetes

*Conceptual architecture, showing `k3sup` running locally against any VM such as AWS EC2 or a VPS such as DigitalOcean.*
### Download `k3sup` CE (tl;dr)
`k3sup` is distributed as a static Go binary. You can use the installer on MacOS and Linux, or visit the [Releases page](https://github.com/alexellis/k3sup/releases) to download the executable for Windows.
```sh
curl -sLS https://get.k3sup.dev | sh
sudo install k3sup /usr/local/bin/
k3sup --help
```
> A note for Windows users. Windows users can use `k3sup install` and `k3sup join` with a normal "Windows command prompt".
## Demo of K3sup CE📼
In the demo I install Kubernetes (`k3s`) onto two separate machines and get my `kubeconfig` downloaded to my laptop each time in around one minute.
1) Ubuntu 18.04 VM created on DigitalOcean with ssh key copied automatically
2) Raspberry Pi 4 with my ssh key copied over via `ssh-copy-id`
Watch the demo:
[](https://asciinema.org/a/262630)
## Usage ✅
The `k3sup` tool is a client application which you can run on your own computer. It uses SSH to connect to remote servers and creates a local KUBECONFIG file on your disk. Binaries are provided for MacOS, Windows, and Linux (including ARM).
### Pre-requisites for k3sup servers and agents
Some Linux hosts are configured to allow `sudo` to run without having to repeat your password. For those which are not already configured that way, you'll need to make the following changes if you wish to use `k3sup`:
```bash
# sudo visudo
# Then add to the bottom of the file
# replace "alex" with your username i.e. "ubuntu"
alex ALL=(ALL) NOPASSWD: ALL
```
In most circumstances, cloud images for Ubuntu and other distributions will not require this step.
As an alternative, if you only need a single server you can log in interactively and run `k3sup install --local` instead of using SSH.
## K3sup Pro
K3sup Pro is available for individuals via a [GitHub Sponsorship of 25+ USD / mo](https://github.com/sponsors/alexellis) and separately for commercial use. Review the [EULA](/EULA.md) before downloading or using the software.
> K3sup Pro is free with your [SlicerVM](https://slicervm.com) subscription. Slicer makes it quick and easy to spin up single or multi-node K3s clusters directly on your own computer, cloud, or homelab environments.
Support for all K3sup Pro users is provided by the Issue Tracker for the [K3sup CE repository](https://github.com/alexellis/k3sup-pro/).
* `activate` - obtain/refresh a license key. Commercial users just place your key at `~/.k3sup/LICENSE`
* `plan` - take one or more JSON files and generate a YAML plan for a HA installation of K3s
* `apply` - run the installation in parallel, optionally pre-downloading the K3s binary and copying it via SSH beforehand
* `exec` - run a command on all nodes in the cluster
* `get-config` - get a kubeconfig from an existing installation
* `uninstall` - uninstall k3s from all nodes in the cluster in parallel
Classic K3sup CE commands are also available within the single binary, for backwards compatibility and for quick testing.
* `install` - install K3s to a single node imperatively
* `join` - join a single node to an existing K3s server
The `--predownload` flag for `k3sup-pro apply` is the first step towards a fully airgapped solution, and reduces bandwidth whilst speeding up installation.
Walkthrough of `plan`, `apply`, `get-config` and `exec`:
[](https://asciinema.org/a/725554)
### K3sup Pro roadmap
The initial version of K3sup Pro is largely feature-complete, however there are some additional features planned for commercial users:
* Use K3sup Pro Plan/Apply via bastion hosts
* Airgapped installation via initial download of packages on a local machine
### Getting `k3sup-pro`
The `k3sup-pro` binary is packaged in a container image, rather than being downloaded via GitHub Releases.
The recommended option is to use K3sup CE to obtain K3sup Pro:
```bash
PRO=1 curl -sLS https://get.k3sup.dev | sudo -E sh
```
Or, if you already have the latest K3sup CE version, it can replace itself:
```bash
sudo k3sup get pro
```
For the `k3sup get pro` command, you can omit `sudo` by passing a `--path` variable to a writeable location by your user.
You can browse specific versions at [ghcr.io/openfaasltd/k3sup-pro](https://ghcr.io/openfaasltd/k3sup-pro) then pass the `--version` flag accordingly.
### Activating K3sup Pro
Run `k3sup-pro activate` to verify your identity using GitHub.com. You'll only need to do this on your laptop/workstation - machines which will host K3s do not need any additional steps.
Commercial users can place their license key at `$HOME/.k3sup/LICENSE` and do not need to run `k3sup-pro activate`.
### K3sup `plan` / `apply` for automation and large installations
The `k3sup-pro plan` command reads a set of JSON files containing your hosts, and will generate a YAML plan file that you can edit to customize the installation.
Example input file:
```json
[
{
"hostname": "k3s-server-1",
"ip": "192.168.129.138"
},
{
"hostname": "k3s-server-2",
"ip": "192.168.129.128"
},
{
"hostname": "k3s-server-3",
"ip": "192.168.129.131"
},
{
"hostname": "k3s-agent-1",
"ip": "192.168.129.130"
},
{
"hostname": "k3s-agent-2",
"ip": "192.168.129.127"
}
]
```
The following will create 1x primary server, with 2x additional servers within a HA etcd cluster, the last two nodes will be added as agents.
```bash
k3sup pro plan ./n100.json ./n200.json \
--user ubuntu \
--servers 3 \
--svclb=false \
--server-extra-args "--disable traefik" \
--agent-extra-args "--node-label worker=true"
```
Example plan.yaml file:
```yaml
version:
k3s_channel: stable
server_options:
user: ubuntu
ssh_port: 22
k3s_extra_args: --disable traefik
parallel: 5
traefik: true
agent_options:
k3s_extra_args: --node-label worker=true
hosts:
- name: k3s-1
role: server
host: 192.168.138.2
architecture: x86_64
- name: k3s-2
role: server
host: 192.168.138.3
architecture: x86_64
- name: k3s-3
role: server
host: 192.168.138.4
architecture: x86_64
- name: k3s-agent-1
role: agent
host: 192.168.137.2
architecture: x86_64
- name: k3s-agent-2
role: agent
host: 192.168.137.3
architecture: x86_64
- name: k3s-agent-3
role: agent
host: 192.168.137.4
architecture: x86_64
```
The YAML plan file can be edited and committed to Git for maintenance and future upgrades.
Then when you're ready to install, you can run `k3sup-pro apply` to install in parallel.
The `--predownload` flag will download the k3s binary to your local machine, then copy it over SSH to each host to speed up the installation.
The `--parallel` flag sets how many installation steps to run at the same time.
```bash
k3sup pro apply \
--predownload \
--parallel 10
```
You can also get hold of your kubeconfig with `k3sup-pro get-config` and then use `kubectl` to access your cluster.
Merge it into your main KUBECONFIG file:
```bash
k3sup pro get-config \
--local-path $HOME/.kube/config \
--context my-k3s \
--merge
```
Or set up a local file:
```bash
k3sup pro get-config \
--local-path ./kubeconfig
export KUBECONFIG=`pwd`/kubeconfig
```
Watch a demo with dozens of Firecracker VMs: [Testing Kubernetes at Scale with bare-metal](https://youtu.be/o4UxRw-Cc8c)
### Rapid uninstallation / reset with `k3sup-pro uninstall`
The `k3sup-pro uninstall` command will uninstall k3s from all nodes in the cluster.
If you have a plan YAML file, the username, SSH ports, and key files will all be read from the file, and the uninstallation will be performed in order and in parallel. Removing the agents first, then any additional servers, and finally the primary server.
```bash
k3sup pro uninstall
```
If you only have devices JSON files, you may also need a `--user` and / or `--ssh-key` flag.
```bash
k3sup pro uninstall \
--user ubuntu \
--ssh-key ~/.ssh/id_rsa
```
### K3sup `pro exec` - run a command everywhere
The `k3sup-pro exec` command allows you to run a command on all nodes in the cluster. You can specify `--servers` or `--agents` to run the command on only the servers or agents.
Run on all nodes:
```bash
k3sup pro exec \
"free -h"
```
Only on servers:
```bash
k3sup pro exec \
--servers \
"sudo journalctl -u k3s -n 100"
```
Only on agents:
```bash
k3sup pro exec \
--agents \
"sudo journalctl -u k3s-agent -n 100"
```
### K3sup `pro get-config` - work with an existing cluster
The `k3sup-pro get-config` command allows you to retrieve kubeconfig files from existing K3s installations without performing any installation steps. This is useful when you already have K3s running and just need to access the cluster configuration.
You can also use it if you initially created a local `./kubeconfig` file but now want to merge it under a meaningful context name to your main `$HOME/.kube/config` file.
Get kubeconfig from a remote server:
```bash
k3sup pro get-config \
--host 192.168.0.100 \
--user ubuntu \
--local-path ./kubeconfig
```
Get kubeconfig from a local installation:
```bash
k3sup pro get-config --local
```
Merge kubeconfig into your main KUBECONFIG file:
```bash
k3sup pro get-config \
--host 192.168.0.100 \
--user ubuntu \
--merge \
--local-path $HOME/.kube/config \
--context my-remote-cluster
```
Use a custom SSH key:
```bash
k3sup pro get-config \
--host 192.168.0.100 \
--user ubuntu \
--ssh-key $HOME/.ssh/my-key \
--local-path ./kubeconfig
```
If you do not have `k3sup-pro` yet, you can also use `k3sup install` with the `--skip-install` flag.
## K3sup Community Edition (CE)
The CE edition of K3sup is available to all users for free, and the code is licensed under the MIT license so you can also adapt it for your own use, or contribute back to the project.
The CE edition has been available since 2019 and has been used by many different people to learn about Kubernetes, and to build their own clusters using imperative bash commands.
### 👑 Setup a Kubernetes *server* with `k3sup`
You can setup a server and stop here, or go on to use the `join` command to add some "agents" aka `nodes` or `workers` into the cluster to expand its compute capacity.
Provision a new VM running a compatible operating system such as Ubuntu, Debian, Raspbian, or something else. Make sure that you opt-in to copy your registered SSH keys over to the new VM or host automatically.
> Note: You can copy ssh keys to a remote VM with `ssh-copy-id user@IP`.
Imagine the IP was `192.168.0.1` and the username was `ubuntu`, then you would run this:
* Run `k3sup`:
```sh
export IP=192.168.0.1
k3sup install --ip $IP --user ubuntu
# Or use a hostname and SSH key for EC2
export HOST="ec2-3-250-131-77.eu-west-1.compute.amazonaws.com"
k3sup install --host $HOST --user ubuntu \
--ssh-key $HOME/ec2-key.pem
```
Other options for `install`:
* `--cluster` - start this server in clustering mode using embedded etcd (embedded HA)
* `--skip-install` - if you already have k3s installed, you can just run this command to get the `kubeconfig`
* `--ssh-key` - specify a specific path for the SSH key for remote login
* `--local` - Perform a local install without using ssh
* `--local-path` - default is `./kubeconfig` - set the file where you want to save your cluster's `kubeconfig`. By default this file will be overwritten.
* `--merge` - Merge config into existing file instead of overwriting (e.g. to add config to the default kubectl config, use `--local-path ~/.kube/config --merge`).
* `--context` - default is `default` - set the name of the kubeconfig context.
* `--ssh-port` - default is `22`, but you can specify an alternative port i.e. `2222`
* `--no-extras` - disable "servicelb" and "traefik"
* `--k3s-extra-args` - Optional extra arguments to pass to k3s installer, wrapped in quotes, i.e. `--k3s-extra-args '--disable traefik'` or `--k3s-extra-args '--docker'`. For multiple args combine then within single quotes `--k3s-extra-args '--disable traefik --docker'`.
* `--k3s-version` - set the specific version of k3s, i.e. `v1.21.1`
* `--k3s-channel` - set a specific version of k3s based upon a channel i.e. `stable`
- `--ipsec` - Enforces the optional extra argument for k3s: `--flannel-backend` option: `ipsec`
* `--print-command` - Prints out the command, sent over SSH to the remote computer
* `--datastore` - used to pass a SQL connection-string to the `--datastore-endpoint` flag of k3s. You must use [the format required by k3s in the Rancher docs](https://rancher.com/docs/k3s/latest/en/installation/ha/).
See even more install options by running `k3sup install --help`.
* Now try the access:
```bash
export KUBECONFIG=`pwd`/kubeconfig
kubectl get node
```
Note that you should always use `pwd/` so that a full path is set, and you can change directory if you wish.
### Checking if a cluster is ready
There are various ways to confirm whether a cluster is ready to use.
K3sup runs the "kubectl get nodes" command using a KUBECONFIG file, and looks for the "Ready" status on each node, including agents/workers.
Install K3s directly on the node and then check if it's ready:
```bash
k3sup install \
--local \
--context localk3s
k3sup ready \
--context localk3s \
--kubeconfig ./kubeconfig
```
Check a remote server saved to a local file:
```bash
k3sup install \
--ip 192.168.0.101 \
--user pi
k3sup ready \
--context default \
--kubeconfig ./kubeconfig
```
Check a merged context in your default KUBECONFIG:
```bash
k3sup install \
--ip 192.168.0.101 \
--user pi \
--context pik3s \
--merge \
--local-path $HOME/.kube/config
# $HOME/.kube/config is a default for kubeconfig
k3sup ready --context pik3s
```
### Merging clusters into your KUBECONFIG
You can also merge the remote config into your main KUBECONFIG file `$HOME/.kube/config`, then use `kubectl config get-contexts` or `kubectx` to manage it.
The default "context" name for the remote k3s cluster is `default`, however you can override this as below.
For example:
```bash
k3sup install \
--ip $IP \
--user $USER \
--merge \
--local-path $HOME/.kube/config \
--context my-k3s
```
Here we set a context of `my-k3s` and also merge into our main local `KUBECONFIG` file, so we could run `kubectl config use-context my-k3s` or `kubectx my-k3s`.
### 😸 Join some agents to your Kubernetes server
Let's say that you have a server, and have already run the following:
```sh
export SERVER_IP=192.168.0.100
export USER=root
k3sup install --ip $SERVER_IP --user $USER
```
Next join one or more `agents` to the cluster:
```sh
export AGENT_IP=192.168.0.101
export SERVER_IP=192.168.0.100
export USER=root
k3sup join --ip $AGENT_IP --server-ip $SERVER_IP --user $USER
```
Please note that if you are using different usernames for SSH'ing to the agent and the server that you must provide the username for the server via the `--server-user` parameter.
That's all, so with the above command you can have a two-node cluster up and running, whether that's using VMs on-premises, using Raspberry Pis, 64-bit ARM or even cloud VMs on EC2.
### Use your hardware authentication / 2FA or SSH Agent
You may wish to use the `ssh-agent` utility if:
* Your SSH key is protected by a password, and you don't want to type it in for each k3sup command
* You use a hardware authentication device key like a [Yubico YubiKey](https://amzn.to/3ApXR82) to authenticate SSH sessions
Run the following to set `SSH_AUTH_SOCK`:
```
$ eval $(ssh-agent)
Agent pid 2641757
```
Optionally, if your key is encrypted, run: `ssh-add ~/.ssh/id_rsa`
Now run any `k3sup` command, and your SSH key will be requested from the ssh-agent instead of from the usual location.
You can also specify an SSH key with `--ssh-key` if you want to use a specific key-pair.
### Create a multi-master (HA) setup with external SQL
The easiest way to test out k3s' multi-master (HA) mode with external storage, is to set up a Mysql server using DigitalOcean's managed service.
* Get the connection string from your DigitalOcean dashboard, and adapt it
Before:
```
mysql://doadmin:80624d3936dfc8d2e80593@db-mysql-lon1-90578-do-user-6456202-0.a.db.ondigitalocean.com:25060/defaultdb?ssl-mode=REQUIRED
```
After:
```
mysql://doadmin:80624d3936dfc8d2e80593@tcp(db-mysql-lon1-90578-do-user-6456202-0.a.db.ondigitalocean.com:25060)/defaultdb
```
Note that we've removed `?ssl-mode=REQUIRED` and wrapped the host/port in `tcp()`.
```bash
export DATASTORE="mysql://doadmin:80624d3936dfc8d2e80593@tcp(db-mysql-lon1-90578-do-user-6456202-0.a.db.ondigitalocean.com:25060)/defaultdb
```
You can prefix this command with ` ` two spaces, to prevent it being cached in your bash history.
Generate a token used to encrypt data (If you already have a running node this can be retrieved by logging into a running node and looking in `/var/lib/rancher/k3s/server/token`)
```bash
# Best option for a token:
export TOKEN=$(openssl rand -base64 64)
# Fallback for no openssl, on a Linux host:
export TOKEN=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 64)
# Failing that, then try:
export TOKEN=$(head -c 64 /dev/urandom|shasum| cut -d - -f 1)
```
* Create three VMs
Imagine we have the following three VMs, two will be servers, and one will be an agent.
```bash
export SERVER1=104.248.135.109
export SERVER2=104.248.25.221
export AGENT1=104.248.137.25
```
* Install the first server
```bash
k3sup install --user root --ip $SERVER1 --datastore="${DATASTORE}" --token=${TOKEN}
```
* Install the second server
```bash
k3sup install --user root --ip $SERVER2 --datastore="${DATASTORE}" --token=${TOKEN}
```
* Join the first agent
You can join the agent to either server, the datastore is not required for this step.
```bash
k3sup join --user root --server-ip $SERVER1 --ip $AGENT1
```
Please note that if you are using different usernames for SSH'ing to the agent and the server that you must provide the username for the server via the `--server-user` parameter.
* Additional steps
If you run `kubectl get node`, you'll now see two masters/servers and one agent, however, we joined the agent to the first server. If the first server goes down, the agent will effectively also go offline.
```bash
kubectl get node
NAME STATUS ROLES AGE VERSION
k3sup-1 Ready master 73s v1.19.6+k3s1
k3sup-2 Ready master 2m31s v1.19.6+k3s1
k3sup-3 Ready <none> 14s v1.19.6+k3s1
```
There are two ways to prevent a dependency on the IP address of any one host. The first is to create a TCP load-balancer in the cloud of your choice, the second is for you to create a DNS round-robbin record, which contains all of the IPs of your servers.
In your DigitalOcean dashboard, go to the Networking menu and click "Load Balancer", create one in the same region as your Droplets and SQL server. Select your two Droplets, i.e. `104.248.34.61` and `142.93.175.203`, and use `TCP` with port `6443`.
If you want to run `k3sup join` against the IP of the LB, then you should also add `TCP` port `22`
Make sure that the health-check setting is also set to `TCP` and port `6443`. Wait to get your IP, mine was: `174.138.101.83`
Save the LB into an environment variable:
```bash
export LB=174.138.101.83
```
Now use `ssh` to log into both of your servers, and edit their config files at `/etc/systemd/system/k3s.service`, update the lines `--tls-san` and the following address, to that of your LB:
```
ExecStart=/usr/local/bin/k3s \
server \
'--tls-san' \
'104.248.135.109' \
```
Becomes:
```
ExecStart=/usr/local/bin/k3s \
server \
'--tls-san' \
'174.138.101.83' \
```
Now run:
```bash
sudo systemctl daemon-reload && \
sudo systemctl restart k3s-agent
```
And repeat these steps on the other server.
You can update the agent manually, via ssh and edit `/etc/systemd/system/k3s-agent.service.env` on the host, or use `k3sup join` again, but only if you added port `22` to your LB:
```bash
k3sup join --user root --server-ip $LB --ip $AGENT1
```
Finally, regenerate your KUBECONFIG file with the LB's IP, instead of one of the servers:
```bash
k3sup install --skip-install --ip $LB
```
Log into the first server, and stop k3s `sudo systemctl stop k3s`, then check that kubectl still functions as expected:
```bash
export KUBECONFIG=`pwd`/kubeconfig
kubectl get node -o wide
NAME STATUS ROLES AGE VERSION
k3sup-1 NotReady master 23m v1.19.6+k3s1
k3sup-2 Ready master 25m v1.19.6+k3s1
k3sup-3 Ready <none> 22m v1.19.6+k3s1
```
You've just simulated a failure of one of your masters/servers, and you can still access kubectl. Congratulations on building a resilient k3s cluster.
### Create a multi-master (HA) setup with embedded etcd
In k3s `v1.19.5+k3s1` a HA multi-master (multi-server in k3s terminology) configuration is available called "embedded etcd". A quorum of servers will be required, which means having an odd number of nodes and least three. [See more](https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/)
* Initialize the cluster with the first server
Note the `--cluster` flag
```sh
export SERVER_IP=192.168.0.100
export USER=root
k3sup install \
--ip $SERVER_IP \
--user $USER \
--cluster \
--k3s-version v1.19.1+k3s1
```
* Join each additional server
> Note the new `--server` flag
```sh
export USER=root
export SERVER_IP=192.168.0.100
export NEXT_SERVER_IP=192.168.0.101
k3sup join \
--ip $NEXT_SERVER_IP \
--user $USER \
--server-user $USER \
--server-ip $SERVER_IP \
--server \
--k3s-version v1.19.1+k3s1
```
Now check `kubectl get node`:
```sh
kubectl get node
NAME STATUS ROLES AGE VERSION
paprika-gregory Ready master 8m27s v1.19.2-k3s
cave-sensor Ready master 27m v1.19.2-k3s
```
If you used `--no-extras` on the initial installation you will also need to provide it on each join:
```sh
export USER=root
export SERVER_IP=192.168.0.100
export NEXT_SERVER_IP=192.168.0.101
k3sup join \
--ip $NEXT_SERVER_IP \
--user $USER \
--server-user $USER \
--server-ip $SERVER_IP \
--server \
--no-extras \
--k3s-version v1.19.1+k3s1
```
### 👨💻 Micro-tutorial for Raspberry Pi (2, 3, or 4) 🥧
In a few moments you will have Kubernetes up and running on your Raspberry Pi 2, 3 or 4. Stand by for the fastest possible install. At the end you will have a KUBECONFIG file on your local computer that you can use to access your cluster remotely.

*Conceptual architecture, showing `k3sup` running locally against bare-metal ARM devices.*
* [Download etcher.io](https://www.balena.io/etcher/) for your OS
* Flash an SD card using [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/)
* Enable SSH by creating an empty file named `ssh` in the boot partition
* Generate an ssh-key if you don't already have one with `ssh-keygen` (hit enter to all questions)
* Find the RPi IP with `ping -c raspberrypi.local`, then set `export SERVER_IP=""` with the IP
* Enable container features in the kernel, by editing `/boot/cmdline.txt` (or `/boot/firmware/cmdline.txt` on Ubuntu)
* Add the following to the end of the line: ` cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory`
* Copy over your ssh key with: `ssh-copy-id pi@raspberrypi.local`
* Run `k3sup install --ip $SERVER_IP --user pi`
* Point at the config file and get the status of the node:
```sh
export KUBECONFIG=`pwd`/kubeconfig
kubectl get node -o wide
```
You now have `kubectl` access from your laptop to your Raspberry Pi running k3s.
If you want to join some nodes, run `export IP=""` for each additional RPi, followed by:
* `k3sup join --ip $IP --server-ip $SERVER_IP --user pi`
> Remember all these commands are run from your computer, not the RPi.
Now where next? I would recommend my detailed tutorial where I spend time looking at how to flash the SD card, deploy k3s, deploy OpenFaaS (for some useful microservices), and then get incoming HTTP traffic.
Try it now: [Will it cluster? K3s on Raspbian](https://blog.alexellis.io/test-drive-k3s-on-raspberry-pi/)
## Caveats on security
If you are using public cloud, then make sure you see the notes from the Rancher team on setting up a Firewall or Security Group.
k3s docs: [k3s configuration / open ports](https://rancher.com/docs/k3s/latest/en/installation/installation-requirements/#networking)
## Contributing
### Blog posts & tweets
Blogs posts, tutorials, and Tweets about k3sup (`#k3sup`) are appreciated. Please send a PR to the README.md file to add yours.
### Contributing via GitHub
Before contributing code, please see the [CONTRIBUTING guide](https://github.com/alexellis/arkade/blob/master/CONTRIBUTING.md). Note that k3sup uses the same guide [arkade](https://arkade.dev)
Both Issues and PRs have their own templates. Please fill out the whole template.
All commits must be signed-off as part of the [Developer Certificate of Origin (DCO)](https://developercertificate.org)
### License
MIT
## 📢 What are people saying about `k3sup`?
* [Five years of Raspberry Pi clusters](https://www.raspberrypi.org/blog/five-years-of-raspberry-pi-clusters/) - raspberrypi.org
* [Multi-master HA Kubernetes in < 5 minutes](https://blog.alexellis.io/multi-master-ha-kubernetes-in-5-minutes/) by Alex Ellis
* [Kubernetes Homelab with Raspberry Pi and k3sup](https://blog.alexellis.io/raspberry-pi-homelab-with-k3sup/)
* [Building a Kubernetes cluster on Raspberry Pi running Ubuntu server](https://medium.com/icetek/building-a-kubernetes-cluster-on-raspberry-pi-running-ubuntu-server-8fc4edb30963) by Jakub Czapliński
* [Multi-node Kubernetes on Civo in 5 minutes flat with k3sup!](https://www.civo.com/learn/kubernetes-on-civo-in-5-minutes-flat) - Civo Learn guide
* [Zero to k3s Kubeconfig in seconds on AWS EC2 with k3sup](https://rancher.com/blog/2019/k3s-kubeconfig-in-seconds) by Saiyam Pathak
* [Create a 3-node k3s cluster with k3sup & DigitalOcean](https://blog.alexellis.io/create-a-3-node-k3s-cluster-with-k3sup-digitalocean/)
* [Cheap k3s cluster using Amazon Lightsail](https://eamonbauman.com/2020/05/09/cheap-k3s-cluster-using-amazon-lightsail/)
* [k3sup mentioned on Kubernetes Podcast episode 67](https://kubernetespodcast.com/episode/067-orka/) by Craig Box & Adam Glick
* [Scheduling Kubernetes workloads to Raspberry Pi using Inlets and Crossplane](https://github.com/crossplaneio/tbs/blob/master/episodes/9/assets/README.md) by [Daniel Mangum](https://github.com/hasheddan)
* Also checkout the live [demo](https://youtu.be/RVAFEAnirZA)
* Blog post by Ruan Bekker:
> Provision k3s to all the places with a awesome utility called "k3sup" by @alexellisuk. Definitely worth checking it out, its epic!
[Provision k3s on the fly with k3sup](https://sysadmins.co.za/provision-k3s-on-the-fly-with-k3sup/)
* [Dave Cadwallader (@geek_dave)](https://twitter.com/geek_dave/status/1162386683200851969?s=20):
> Alex - Thanks so much for all the effort you put into your tools and tutorials. My rpi homelab has been a valuable learning playground for CNCF tech thanks to you!
* [k3sup in KubeWeekly #181](https://kubeweekly.io/2019/08/22/kubeweekly-181/)
* [Will it cluster? K3s on Raspbian](https://blog.alexellis.io/test-drive-k3s-on-raspberry-pi/)
* [Kubernetes the Easy Way with k3sup – Cisco DevOps Series](https://blogs.cisco.com/developer/kubernetes-the-easy-way-devops-14)
* [Trying tiny k3s on Google Cloud with k3sup](https://starkandwayne.com/blog/trying-tiny-k3s-on-google-cloud-with-k3sup/) by Stark & Wayne
* [Setting up a Raspberry Pi Kubernetes Cluster with Blinkt! Strips that Show Number of Pods per Node](https://pleasereleaseme.net/setting-up-a-raspberry-pi-kubernetes-cluster-with-blinkt-strips-that-show-number-of-pods-per-node-using-k3sup/)
* [From Zero to Kubernetes Dashboard within Minutes with k3sup and Kontena Lens](https://medium.com/@laurinevala/from-zero-to-kubernetes-dashboard-within-minutes-with-k3sup-and-kontena-lens-84f881400b10) - by Lauri Nevala
* [BYOK - Build your Own Kubernetes Cluster with Raspberry Pis, k3s, and k3sup](https://speakerdeck.com/mikesir87/byok-build-your-own-kubernetes-cluster-with-raspberry-pis-k3s-and-k3sup) by Michael Irwin
* [Run Kubernetes On Your Machine with k3sup](https://itnext.io/run-kubernetes-on-your-machine-7ee463af21a2) by Luc Juggery
* [Trying out k3sup](https://blog.baeke.info/2019/10/25/trying-out-k3sup/) by Geert Baeke
* [Creating your first Kubernetes cluster with k3sup](https://dev.to/kalaspuffar/creating-your-first-kubernetes-cluster-3kp2) by Daniel Persson
* [My 2019 In Review - Hello Open Source](https://blog.heyal.co.uk/My-2019/) by Alistair Hey
* [Kubernetes 104: Create a 2-node k3s cluster with k3sup](https://ahmed-abdelsamad.blogspot.com/2019/09/kubernetes-104-create-2-node-k3s.html) by Ahmed Abelsamad
* [My home Kubernetes cluster driven by GitOps and k3sup](https://github.com/onedr0p/k3s-gitops) - by Devin Buhl
* [Raspberry Pi: From 0 to k3s cluster in 5 min with k3sup and Ansible](https://blog.cloudgsx.es/topic/10/raspberry-pi-from-0-to-k3s-cluster-in-5-min-with-k3sup-and-ansible) - by Pablo Caderno
* [Kubernetes: from Zero to Hero with Kompose, Minikube, k3sup and Helm](https://blog.mi.hdm-stuttgart.de/index.php/2020/02/29/image-editor-on-kubernetes-with-kompose-minikube-k3s-k3sup-and-helm-part-2/) by Leon Klingele, Alexander Merker & Florian Wintel
* [Deploying a highly-available K3s with k3sup](https://ma.ttias.be/deploying-highly-available-k3s-k3sup/) by Dmitriy Akulov
* [Multi-master HA Kubernetes using K3Sup on Windows10/Server 2019](https://github.com/TechGuyTN/K3Sup-Windows10/blob/d7ad4f642ae6ebf441b8137bd71111c9c2890add/README.md) by Aaron Holt
* [Ansible Role: k3sup](https://github.com/vandot/ansible-role-k3sup) by Ivan Vandot
* [HashiCorp Vault on K3s on RPi4](https://github.com/colin-mccarthy/k3s-pi-vault/tree/d5e616de9048da8b990dc7b99a6d2d96bd9e9cc5) by Colin McCarthy
* [Raspberry Pi Cluster Part 2: ToDo API running on Kubernetes with k3s](https://www.dinofizzotti.com/blog/2020-05-09-raspberry-pi-cluster-part-2-todo-api-running-on-kubernetes-with-k3s/) by Dino Fizzotti
* [Cloud Native Tools for Developers Webinar Recap](https://www.openfaas.com/blog/cloud-native-tools-webinar/) by Alex Ellis & Alistair Hey
* [Unobtrusive local development with kubernetes, k3s, traefik2](https://www.codementor.io/@slavko/unobtrusive-local-development-with-kubernetes-k3s-traefik2-15uq596oja) by Vyacheslav
* [Cómo desplegar un clúster de Kubernetes en 60 segundos con k3sup](https://www.cduser.com/como-desplegar-un-cluster-de-kubernetes-en-60-segundos-con-k3sup/) by Ignacio Van Droogenbroeck
* [Raspberry Kubernetes cluster for my homlab with k3sup](https://hybridhacker.com/homelab-raspberry-kubernetes-cluster-with-k3sup.html) by Nicola Ballotta
* [k3sup On MacOS Catalina](https://gizmo.codes/k3sup-on-macos-catalina/) by John Doyle
* [Provision k3s on Google Cloud with Terraform and k3sup — Nimble](https://medium.com/nimble/provision-k3s-on-google-cloud-with-terraform-and-k3sup-nimble-38fa3167b4c3) by Carlos Herrera
* [K3s: Edge Kubernetes](https://redmonk.com/jgovernor/2020/01/31/k3s-edge-kubernetes/) by James Governor
* [OpenStack sur LXD avec Juju et k3sup dans phoenixNAP](https://deep75.medium.com/openstack-sur-lxd-avec-juju-et-k3sup-dans-phoenixnap-e5867a487497)
* [Creating a k3s Cluster with k3sup & Multipass 💻☸️](https://dev.to/tomowatt/creating-a-k3s-cluster-with-k3sup-multipass-h26) by Tom Watt
* [How I've set up my highly-available Kubernetes cluster](https://jmac.ph/2021/01/25/how-ive-set-up-my-highly-available-kubernetes-cluster/) by JJ Macalinao
* [Creating a K3S Raspberry PI Cluster with K3Sup to fire up nightscout with MongoDB](https://h3rmanns.medium.com/creating-a-k3s-raspberry-pi-cluster-with-k3sup-to-fire-up-a-nightscout-backend-service-based-on-a-27c1f5727e5b)
* [Kubernetes Cluster with Rancher on Windows using K3s](https://adyanth.site/posts/kubernetes-cluster-on-windows/) by Adyanth H
* [k3s in LXC on Proxmox with k3sup by Todd Edwards](https://gist.github.com/triangletodd/02f595cd4c0dc9aac5f7763ca2264185)
Checkout the [Announcement tweet](https://twitter.com/alexellisuk/status/1162272786250735618?s=20)
## Similar tools & glossary
Glossary:
* Kubernetes: master/slave
* k3s: server/agent
Related tools:
* [k3s](https://github.com/rancher/k3s) - Kubernetes as installed by `k3sup`. k3s is a compliant, light-weight, multi-architecture distribution of Kubernetes. It can be used to run Kubernetes locally or remotely for development, or in edge locations.
* [k3d](https://github.com/rancher/k3d) - this tool runs a Docker container on your local laptop with k3s inside
* [kind](https://github.com/kubernetes-sigs/kind) - kind can run a Kubernetes cluster within a Docker container for local development. k3s is also suitable for this purpose through `k3d`. KinD is not suitable for running a remote cluster for development.
* [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/) - a tool to create fully-loaded, production-ready Kubernetes clusters with or without high-availability (HA). Tends to be heavier-weight and slower than k3s. It is aimed at cloud VMs or bare-metal computers which means it doesn't always work well with low-powered ARM devices.
* [k3v](https://github.com/ibuildthecloud/k3v) - "virtual kubernetes" - a very early PoC from the author of k3s aiming to slice up a single cluster for multiple tenants
* [k3sup-multipass](https://github.com/matti/k3sup-multipass) - a helper to launch single node k3s cluster with one command using a [multipass](https://multipass.run) VM and optionally proxy the ingress to localhost for easier development.
## Troubleshooting and support
### Maybe the problem is with K3s?
If you're having issues, it's likely that this is a problem with K3s, and not with k3sup. How do we know that? K3sup is a very mature project and has a few use-cases that it generally performs very well.
Rancher provides support for K3s [on their Slack](https://slack.rancher.io/) in the `#k3s` channel. This should be your first port of call. Your second port of call is to raise an issue with the K3s maintainers in the [K3s repo](https://github.com/k3s-io/k3s/issues)
Do you want to install a specific version of K3s? See `k3sup install --help` and the `--k3s-version` and `--k3s-channel` flags.
Is your system ready to run Kubernetes? K3s requires certain Kernel modules to be available, run `k3s check-config` and check the output. Alex tests K3sup with Raspberry Pi OS and Ubuntu LTS on a regular basis.
### Common issues
The most common problem is that you missed a step, fortunately it's relatively easy to get the logs from the K3s service and it should tell you what's wrong.
* For the Raspberry Pi you probably haven't updated `cmdline.txt` to enable cgroups for CPU and memory. Update it as per the instructions in this file.
* You ran `kubectl` on a node. Don't do this. k3sup copies the file to your local workstation. Don't log into agents or servers other than to check logs / upgrade the system.
* `sudo: a terminal is required to read the password` - setup password-less `sudo` on your hosts, see also:[Pre-requisites for k3sup agents and servers](#pre-requisites-for-k3sup-servers-and-agents)
* You want to install directly on a server, without using SSH. See also: `k3sup install --local` which doesn't use SSH, but executes the commands directly on a host.
* K3s server didn't start. Log in and run `sudo systemctl status k3s` or `sudo journalctl -u k3s` to see the logs for the service.
* The K3s agent didn't start. Log in and run `sudo systemctl status k3s-agent`
* You tried to remove and re-add a server in an etcd cluster and it failed. This is a known issue, see the [K3s issue tracker](https://github.com/k3s-io/k3s/issues).
* You tried to use an unsupported version of a database for HA. See [this list from Rancher](https://rancher.com/docs/k3s/latest/en/installation/datastore/)
* Your tried to join a node to the cluster and got an error "ssh: handshake failed". This is probably one of three possibilities:
- You did not run `ssh-copy-id`. Try to run it and check if you can log in to the server and the new node without a password prompt using regular `ssh`.
- You have an RSA public key. There is an [underlying issue in a Go library](https://github.com/golang/go/issues/39885) which is [referred here](https://github.com/alexellis/k3sup/issues/63). Please provide the additional parameter `--ssh-key ~/.ssh/id_rsa` (or wherever your private key lives) until the issue is resolved.
- You are using different usernames for SSH'ing to the server and the node to be added. In that case, playe provide the username for the server via the `--server-user` parameter.
* Your `.ssh/config` file isn't being used by K3sup. K3sup does not use the config file used by the `ssh` command-line, but instead uses CLI flags, run `k3sup install/join --help` to learn which are supported.
> Note: Passing `--no-deploy` to `--k3s-extra-args` was deprecated by the K3s installer in K3s 1.17. Use `--disable` instead or `--no-extras`.
### Getting access to your KUBECONFIG
You may have run into an issue where `sudo` access is required for `kubectl` access.
You should not run `kubectl` directly on hosts where K3s is installed. k3sup is designed to rewrite and/or merge your cluster's config to your local KUBECONFIG file.
You should only run `kubectl` on your laptop / client machine.
If you've lost your kubeconfig, you can use `k3sup get-config`. See also the various flags for merging and setting a context name.
### Smart cards and 2FA
> Warning: issues requesting support for smart cards / 2FA will be closed immediately. The feature has been proven to work, and is provided as-is.
You can use a smart card or 2FA security key such as a Yubikey. You must have your ssh-agent configured correctly, at that point k3sup will defer to the agent to make connections on MacOS and Linux. [Find out more](https://github.com/alexellis/k3sup/pull/312)
### Misc note on `iptables`
> Note added by Eduardo Minguez Perez
Currently there is an issue in k3s involving `iptables >= 1.8` that can affect the network communication. See the [k3s issue](https://github.com/rancher/k3s/issues/703) and the corresponding [kubernetes one](https://github.com/kubernetes/kubernetes/issues/71305) for more information and workarounds. The issue has been observed in Debian Buster but it can affect other distributions as well.
================================================
FILE: cmd/get-config.go
================================================
package cmd
import (
"fmt"
"log"
"net"
"github.com/alexellis/k3sup/pkg"
operator "github.com/alexellis/k3sup/pkg/operator"
"github.com/spf13/cobra"
)
// MakeGetConfig creates the get-config command
func MakeGetConfig() *cobra.Command {
var command = &cobra.Command{
Use: "get-config",
Short: "Get kubeconfig from an existing K3s installation",
Long: `Create a local kubeconfig for use with kubectl from your local machine.
` + pkg.SupportMessageShort + `
`,
Example: ` # Get the kubeconfig and save it to ./kubeconfig in the local
# directory under the default context
k3sup get-config --host HOST \
--local-path ./kubeconfig
# Merge kubeconfig into local file under custom context
k3sup get-config \
--host HOST \
--merge \
--local-path $HOME/.kube/kubeconfig \
--context k3s-prod-eu-1
# Get kubeconfig from local installation directly on a server
# where you ran "k3sup install --local"
k3sup get-config --local`,
SilenceUsage: true,
}
command.Flags().IP("ip", net.ParseIP("127.0.0.1"), "Public IP of node")
command.Flags().String("user", "root", "Username for SSH login")
command.Flags().String("host", "", "Public hostname of node")
command.Flags().String("ssh-key", "~/.ssh/id_rsa", "The ssh key to use for remote login")
command.Flags().Int("ssh-port", 22, "The port on which to connect for ssh")
command.Flags().Bool("sudo", true, "Use sudo for kubeconfig retrieval. e.g. set to false when using the root user and no sudo is available.")
command.Flags().String("local-path", "kubeconfig", "Local path to save the kubeconfig file")
command.Flags().String("context", "default", "Set the name of the kubeconfig context.")
command.Flags().Bool("merge", false, `Merge the config with existing kubeconfig if it already exists.
Provide the --local-path flag with --merge if a kubeconfig already exists in some other directory`)
command.Flags().Bool("print-command", false, "Print a command that you can use with SSH to manually recover from an error")
command.Flags().Bool("local", false, "Perform a local get-config without using ssh")
command.PreRunE = func(command *cobra.Command, args []string) error {
local, err := command.Flags().GetBool("local")
if err != nil {
return err
}
if !local {
_, err = command.Flags().GetString("host")
if err != nil {
return err
}
if _, err := command.Flags().GetIP("ip"); err != nil {
return err
}
if _, err := command.Flags().GetInt("ssh-port"); err != nil {
return err
}
}
return nil
}
command.RunE = func(command *cobra.Command, args []string) error {
localKubeconfig, _ := command.Flags().GetString("local-path")
useSudo, err := command.Flags().GetBool("sudo")
if err != nil {
return err
}
sudoPrefix := ""
if useSudo {
sudoPrefix = "sudo "
}
local, _ := command.Flags().GetBool("local")
ip, err := command.Flags().GetIP("ip")
if err != nil {
return err
}
host, err := command.Flags().GetString("host")
if err != nil {
return err
}
if len(host) == 0 {
host = ip.String()
}
log.Println(host)
printCommand, err := command.Flags().GetBool("print-command")
if err != nil {
return err
}
merge, err := command.Flags().GetBool("merge")
if err != nil {
return err
}
context, err := command.Flags().GetString("context")
if err != nil {
return err
}
getConfigcommand := fmt.Sprintf("%scat /etc/rancher/k3s/k3s.yaml\n", sudoPrefix)
if local {
operator := operator.ExecOperator{}
if err = obtainKubeconfig(operator, getConfigcommand, host, context, localKubeconfig, merge); err != nil {
return err
}
return nil
}
fmt.Println("Public IP: " + host)
port, _ := command.Flags().GetInt("ssh-port")
user, _ := command.Flags().GetString("user")
sshKey, _ := command.Flags().GetString("ssh-key")
sshKeyPath := expandPath(sshKey)
address := fmt.Sprintf("%s:%d", host, port)
sshOperator, sshOperatorDone, errored, err := connectOperator(user, address, sshKeyPath)
if errored {
return err
}
if sshOperatorDone != nil {
defer sshOperatorDone()
}
if printCommand {
fmt.Printf("ssh: %s\n", getConfigcommand)
}
if err = obtainKubeconfig(sshOperator, getConfigcommand, host, context, localKubeconfig, merge); err != nil {
return err
}
return nil
}
return command
}
================================================
FILE: cmd/get.go
================================================
package cmd
import (
"github.com/alexellis/k3sup/pkg"
"github.com/spf13/cobra"
)
// MakeGet creates the get parent command
func MakeGet() *cobra.Command {
var command = &cobra.Command{
Use: "get",
Short: "Helper for downloading K3sup Pro",
Long: `Helper for downloading K3sup Pro.
` + pkg.SupportMessageShort + `
`,
SilenceUsage: true,
}
return command
}
================================================
FILE: cmd/get_pro.go
================================================
// Copyright Alex Ellis, OpenFaaS Ltd 2025
// Inspired by update command in openfaas/faas-cli
package cmd
import (
"context"
"fmt"
"io"
"os"
"path"
"runtime"
"strings"
"github.com/alexellis/arkade/pkg/archive"
"github.com/alexellis/arkade/pkg/env"
goexecute "github.com/alexellis/go-execute/v2"
"github.com/google/go-containerregistry/pkg/crane"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/spf13/cobra"
)
// MakeGetPro creates the 'get pro' command
func MakeGetPro() *cobra.Command {
c := &cobra.Command{
Use: "pro",
Short: "Download the latest k3sup pro binary",
Long: `The latest release version of k3sup-pro will be downloaded from a remote
container registry.
This command will download and install k3sup-pro to /usr/local/bin by default.`,
Example: ` # Download to the default location
k3sup get pro
# Download a specific version of k3sup pro
k3sup get pro --version v0.10.0
# Download to a custom location
k3sup get pro --path /tmp/`,
RunE: runGetProE,
PreRunE: preRunGetProE,
}
c.Flags().Bool("verbose", false, "Enable verbose output")
c.Flags().String("path", "/usr/local/bin/", "Custom installation path")
c.Flags().String("version", "latest", "Specific version to download")
return c
}
func preRunGetProE(cmd *cobra.Command, args []string) error {
version, _ := cmd.Flags().GetString("version")
if len(version) == 0 {
return fmt.Errorf(`version must be specified, or use "latest"`)
}
return nil
}
func runGetProE(cmd *cobra.Command, args []string) error {
verbose, _ := cmd.Flags().GetBool("verbose")
customPath, _ := cmd.Flags().GetString("path")
version, _ := cmd.Flags().GetString("version")
// Use the provided path or default to /usr/local/bin/
var binaryPath string
if customPath != "/usr/local/bin/" {
binaryPath = customPath
if verbose {
fmt.Printf("Using custom binary path: %s\n", binaryPath)
}
} else {
binaryPath = "/usr/local/bin/"
if verbose {
fmt.Printf("Using default binary path: %s\n", binaryPath)
}
}
arch, operatingSystem := getClientArch()
downloadArch, downloadOS := getDownloadArch(arch, operatingSystem)
imageRef := fmt.Sprintf("ghcr.io/openfaasltd/k3sup-pro:%s", version)
fmt.Printf("Downloading: %s (%s/%s)\n", imageRef, downloadOS, downloadArch)
tmpTarDir, err := os.MkdirTemp(os.TempDir(), "k3sup-*")
if err != nil {
return fmt.Errorf("failed to create temp directory: %w", err)
}
defer os.RemoveAll(tmpTarDir)
tmpTar := path.Join(tmpTarDir, "k3sup-pro.tar")
f, err := os.Create(tmpTar)
if err != nil {
return fmt.Errorf("failed to open %s: %w", tmpTar, err)
}
defer f.Close()
img, err := crane.Pull(imageRef, crane.WithPlatform(&v1.Platform{Architecture: downloadArch, OS: downloadOS}))
if err != nil {
return fmt.Errorf("pulling %s: %w", imageRef, err)
}
if err := crane.Export(img, f); err != nil {
return fmt.Errorf("exporting %s: %w", imageRef, err)
}
if verbose {
fmt.Printf("Wrote OCI filesystem to: %s\n", tmpTar)
}
tarFile, err := os.Open(tmpTar)
if err != nil {
return fmt.Errorf("failed to open %s: %w", tmpTar, err)
}
defer tarFile.Close()
// Extract to temporary directory first
tmpExtractDir, err := os.MkdirTemp(os.TempDir(), "k3sup-extract-*")
if err != nil {
return fmt.Errorf("failed to create extract directory: %w", err)
}
defer os.RemoveAll(tmpExtractDir)
gzipped := false
if err := archive.Untar(tarFile, tmpExtractDir, gzipped, true); err != nil {
return fmt.Errorf("failed to untar %s: %w", tmpTar, err)
}
binaryName := "k3sup-pro"
if runtime.GOOS == "windows" {
binaryName = "k3sup-pro.exe"
}
newBinary := path.Join(tmpExtractDir, binaryName)
if err := os.Chmod(newBinary, 0755); err != nil {
return fmt.Errorf("failed to chmod %s: %w", newBinary, err)
}
// Verify the extracted binary works
if verbose {
fmt.Println("Verifying extracted binary..")
}
task := goexecute.ExecTask{
Command: newBinary,
Args: []string{"version"},
}
res, err := task.Execute(context.Background())
if err != nil {
return fmt.Errorf("failed to execute extracted binary: %w", err)
}
if res.ExitCode != 0 {
return fmt.Errorf("extracted binary test failed: %s", res.Stderr)
}
if verbose {
fmt.Printf("New binary version check:\n%s", res.Stdout)
}
// Install to target path
targetBinary := path.Join(binaryPath, binaryName)
// Ensure target directory exists
if err := os.MkdirAll(binaryPath, 0755); err != nil {
return fmt.Errorf("failed to create target directory %s: %w", binaryPath, err)
}
if err := copyFile(newBinary, targetBinary); err != nil {
return fmt.Errorf("failed to copy binary to %s: %w", targetBinary, err)
}
if err := os.Chmod(targetBinary, 0755); err != nil {
return fmt.Errorf("failed to chmod %s: %w", targetBinary, err)
}
fmt.Printf("Installed: %s.. OK.\n", targetBinary)
// Final version check
finalTask := goexecute.ExecTask{
Command: targetBinary,
Args: []string{"version"},
}
finalRes, err := finalTask.Execute(context.Background())
if err != nil {
return fmt.Errorf("failed to execute updated binary: %w", err)
}
if finalRes.ExitCode == 0 {
fmt.Println("Installation completed successfully!")
if !verbose {
fmt.Print(finalRes.Stdout)
}
}
return nil
}
func getClientArch() (arch string, os string) {
if runtime.GOOS == "windows" {
return runtime.GOARCH, runtime.GOOS
}
return env.GetClientArch()
}
func getDownloadArch(clientArch, clientOS string) (arch string, os string) {
downloadArch := strings.ToLower(clientArch)
downloadOS := strings.ToLower(clientOS)
if downloadArch == "x86_64" {
downloadArch = "amd64"
} else if downloadArch == "aarch64" {
downloadArch = "arm64"
}
return downloadArch, downloadOS
}
// copyFile copies a file from src to dst
func copyFile(src, dst string) error {
sf, err := os.Open(src)
if err != nil {
return err
}
defer sf.Close()
df, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0755)
if err != nil {
return err
}
defer df.Close()
_, err = io.Copy(df, sf)
return err
}
================================================
FILE: cmd/install.go
================================================
package cmd
import (
"bytes"
"fmt"
"log"
"net"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"github.com/alexellis/k3sup/pkg"
operator "github.com/alexellis/k3sup/pkg/operator"
"errors"
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent"
"golang.org/x/term"
)
var kubeconfig []byte
type k3sExecOptions struct {
Datastore string
Token string
ExtraArgs string
FlannelIPSec bool
NoExtras bool
}
// PinnedK3sChannel will track the stable channel of the K3s API,
// so for production use, you should pin to a specific version
// such as v1.19
// Channels API available at:
// https://update.k3s.io/v1-release/channels
const PinnedK3sChannel = "stable"
const getScript = "curl -sfL https://get.k3s.io"
// MakeInstall creates the install command
func MakeInstall() *cobra.Command {
var command = &cobra.Command{
Use: "install",
Short: "Install k3s on a server via SSH",
Long: `Install k3s on a server via SSH.
` + pkg.SupportMessageShort + `
`,
Example: ` # Simple installation of stable version, outputting a
# kubeconfig to the working directory
k3sup install --ip IP --user USER
# Merge kubeconfig into local file under custom context
k3sup install \
--host HOST \
--merge \
--local-path $HOME/.kube/kubeconfig \
--context k3s-prod-eu-1
# Only download kubeconfig
k3sup install --ip IP \
--user USER \
--skip-install
# Install a specific version on local machine without using SSH
k3sup install --local --k3s-version v1.25.1
# Install, passing extra args to K3s
k3sup install --local --k3s-extra-args="--data-dir /mnt/ssd/k3s"
# Start a cluster with embedded etcd
k3sup install --host HOST --cluster
# Install from a specific channel
k3sup install --host HOST --k3s-channel [latest|stable]
# Use a custom path to your SSH key
k3sup install --host HOST \
--ssh-key $HOME/ec2-key.pem`,
SilenceUsage: true,
}
command.Flags().IP("ip", net.ParseIP("127.0.0.1"), "Public IP of node")
command.Flags().String("user", "root", "Username for SSH login")
command.Flags().String("host", "", "Public hostname of node on which to install agent")
command.Flags().String("ssh-key", "~/.ssh/id_rsa", "The ssh key to use for remote login")
command.Flags().Int("ssh-port", 22, "The port on which to connect for ssh")
command.Flags().Bool("sudo", true, "Use sudo for installation. e.g. set to false when using the root user and no sudo is available.")
command.Flags().Bool("skip-install", false, "Skip the k3s installer")
command.Flags().String("local-path", "kubeconfig", "Local path to save the kubeconfig file")
command.Flags().String("context", "default", "Set the name of the kubeconfig context.")
command.Flags().Bool("no-extras", false, `Disable "servicelb" and "traefik"`)
command.Flags().Bool("ipsec", false, "Enforces and/or activates optional extra argument for k3s: flannel-backend option: ipsec")
command.Flags().Bool("merge", false, `Merge the config with existing kubeconfig if it already exists.
Provide the --local-path flag with --merge if a kubeconfig already exists in some other directory`)
command.Flags().Bool("local", false, "Perform a local install without using ssh")
command.Flags().Bool("cluster", false, "Form a cluster using embedded etcd (requires K8s >= 1.19)")
command.Flags().Bool("print-command", false, "Print a command that you can use with SSH to manually recover from an error")
command.Flags().String("datastore", "", "connection-string for the k3s datastore to enable HA - i.e. \"mysql://username:password@tcp(hostname:3306)/database-name\"")
command.Flags().String("token", "", "the token used to encrypt the datastore, must be the same token for all nodes")
command.Flags().String("k3s-version", "", "Set a version to install, overrides k3s-channel")
command.Flags().String("k3s-extra-args", "", "Additional arguments to pass to k3s installer, wrapped in quotes (e.g. --k3s-extra-args '--disable servicelb')")
command.Flags().String("k3s-channel", PinnedK3sChannel, "Release channel: stable, latest, or pinned v1.19")
command.Flags().String("tls-san", "", "Use an additional IP or hostname for the API server")
command.PreRunE = func(command *cobra.Command, args []string) error {
local, err := command.Flags().GetBool("local")
if err != nil {
return err
}
if !local {
_, err = command.Flags().GetString("host")
if err != nil {
return err
}
if _, err := command.Flags().GetIP("ip"); err != nil {
return err
}
if _, err := command.Flags().GetInt("ssh-port"); err != nil {
return err
}
}
return nil
}
command.RunE = func(command *cobra.Command, args []string) error {
fmt.Printf("Running: k3sup install\n")
localKubeconfig, _ := command.Flags().GetString("local-path")
skipInstall, err := command.Flags().GetBool("skip-install")
if err != nil {
return err
}
tlsSAN, _ := command.Flags().GetString("tls-san")
useSudo, err := command.Flags().GetBool("sudo")
if err != nil {
return err
}
sudoPrefix := ""
if useSudo {
sudoPrefix = "sudo "
}
k3sVersion, err := command.Flags().GetString("k3s-version")
if err != nil {
return err
}
k3sExtraArgs, err := command.Flags().GetString("k3s-extra-args")
if err != nil {
return err
}
k3sChannel, err := command.Flags().GetString("k3s-channel")
if err != nil {
return err
}
k3sNoExtras, err := command.Flags().GetBool("no-extras")
if err != nil {
return err
}
flannelIPSec, _ := command.Flags().GetBool("ipsec")
local, _ := command.Flags().GetBool("local")
ip, err := command.Flags().GetIP("ip")
if err != nil {
return err
}
host, err := command.Flags().GetString("host")
if err != nil {
return err
}
if len(host) == 0 {
host = ip.String()
}
log.Println(host)
cluster, _ := command.Flags().GetBool("cluster")
datastore, _ := command.Flags().GetString("datastore")
printCommand, err := command.Flags().GetBool("print-command")
if err != nil {
return err
}
merge, err := command.Flags().GetBool("merge")
if err != nil {
return err
}
context, err := command.Flags().GetString("context")
if err != nil {
return err
}
token, err := command.Flags().GetString("token")
if err != nil {
return err
}
if len(datastore) > 0 {
if strings.Index(datastore, "ssl-mode=REQUIRED") > -1 {
return fmt.Errorf("remove ssl-mode=REQUIRED from your datastore string, it is not supported by the k3s syntax")
}
if strings.Index(datastore, "mysql") > -1 && strings.Index(datastore, "tcp") == -1 {
return fmt.Errorf("you must specify the mysql host as tcp(host:port) or tcp(ip:port), see the k3s docs for more: https://rancher.com/docs/k3s/latest/en/installation/ha")
}
if token == "" {
return fmt.Errorf("you must provide the token when using an external datastore. Make sure to use the same token as other nodes")
}
}
installk3sExec := makeInstallExec(cluster, host, tlsSAN,
k3sExecOptions{
Datastore: datastore,
Token: token,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
if len(k3sVersion) == 0 && len(k3sChannel) == 0 {
return fmt.Errorf("give a value for --k3s-version or --k3s-channel")
}
installStr := createVersionStr(k3sVersion, k3sChannel)
installK3scommand := fmt.Sprintf("%s | %s %s sh -\n", getScript, installk3sExec, installStr)
getConfigcommand := fmt.Sprintf("%scat /etc/rancher/k3s/k3s.yaml\n", sudoPrefix)
if local {
operator := operator.ExecOperator{}
if !skipInstall {
fmt.Printf("Executing: %s\n", installK3scommand)
res, err := operator.Execute(installK3scommand)
if err != nil {
return err
}
if res.ExitCode != 0 {
if len(res.StdErr) > 0 {
fmt.Printf("stderr: %q", res.StdErr)
}
}
if len(res.StdOut) > 0 {
fmt.Printf("stdout: %q", res.StdOut)
}
} else {
fmt.Printf("Skipping local installation\n")
}
if err = obtainKubeconfig(operator, getConfigcommand, host, context, localKubeconfig, merge); err != nil {
return err
}
return nil
}
fmt.Println("Public IP: " + host)
port, _ := command.Flags().GetInt("ssh-port")
user, _ := command.Flags().GetString("user")
sshKey, _ := command.Flags().GetString("ssh-key")
sshKeyPath := expandPath(sshKey)
address := fmt.Sprintf("%s:%d", host, port)
sshOperator, sshOperatorDone, errored, err := connectOperator(user, address, sshKeyPath)
if errored {
return err
}
if sshOperatorDone != nil {
defer sshOperatorDone()
}
if !skipInstall {
if printCommand {
fmt.Printf("ssh: %s\n", installK3scommand)
}
res, err := sshOperator.Execute(installK3scommand)
if err != nil {
return fmt.Errorf("error received processing command: %s", err)
}
fmt.Printf("Result: %s %s\n", string(res.StdOut), string(res.StdErr))
}
if printCommand {
fmt.Printf("ssh: %s\n", getConfigcommand)
}
if err = obtainKubeconfig(sshOperator, getConfigcommand, host, context, localKubeconfig, merge); err != nil {
return err
}
return nil
}
return command
}
type DoneFunc func()
// connectOperator
//
// Try SSH agent without parsing key files, will succeed if the user
// has already added a key to the SSH Agent, or if using a configured
// smartcard.
//
// If the initial connection attempt fails fall through to the using
// the supplied/default private key file
// DoneFunc should be called by the caller to close the SSH connection when done
func connectOperator(user string, address string, sshKeyPath string) (*operator.SSHOperator, DoneFunc, bool, error) {
var sshOperator *operator.SSHOperator
var initialSSHErr error
var closeSSHAgentFunc func() error
doneFunc := func() {
if sshOperator != nil {
sshOperator.Close()
}
if closeSSHAgentFunc != nil {
closeSSHAgentFunc()
}
}
if runtime.GOOS != "windows" {
var sshAgentAuthMethod ssh.AuthMethod
sshAgentAuthMethod, initialSSHErr = sshAgentOnly()
if initialSSHErr == nil {
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{sshAgentAuthMethod},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, initialSSHErr = operator.NewSSHOperator(address, config)
}
} else {
initialSSHErr = errors.New("ssh-agent unsupported on windows")
}
if initialSSHErr != nil {
publicKeyFileAuth, closeSSHAgent, err := loadPublickey(sshKeyPath)
if err != nil {
return nil, nil, true, fmt.Errorf("unable to load the ssh key with path %q: %w", sshKeyPath, err)
}
defer closeSSHAgent()
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{publicKeyFileAuth},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, err = operator.NewSSHOperator(address, config)
if err != nil {
return nil, nil, true, fmt.Errorf("unable to connect to %s over ssh: %w", address, err)
}
}
return sshOperator, doneFunc, false, nil
}
func sshAgentOnly() (ssh.AuthMethod, error) {
sshAgent, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK"))
if err != nil {
return nil, err
}
return ssh.PublicKeysCallback(agent.NewClient(sshAgent).Signers), nil
}
func obtainKubeconfig(operator operator.CommandOperator, getConfigcommand, host, context, localKubeconfig string, merge bool) error {
res, err := operator.ExecuteStdio(getConfigcommand, false)
if err != nil {
return fmt.Errorf("error received processing command: %s", err)
}
absPath, _ := filepath.Abs(expandPath(localKubeconfig))
kubeconfig := rewriteKubeconfig(string(res.StdOut), host, context)
if merge {
// Create a merged kubeconfig
kubeconfig, err = mergeConfigs(absPath, context, []byte(kubeconfig))
if err != nil {
return err
}
}
// Create a new kubeconfig
if err := writeConfig(absPath, []byte(kubeconfig), context, false); err != nil {
return err
}
return nil
}
// Generates config files give the path to file: string and the data: []byte
func writeConfig(path string, data []byte, context string, suppressMessage bool) error {
absPath, _ := filepath.Abs(path)
if !suppressMessage {
fmt.Printf(`Saving file to: %s
# Test your cluster with:
export KUBECONFIG=%s
kubectl config use-context %s
kubectl get node -o wide
%s
`,
absPath,
absPath,
context,
pkg.SupportMessageShort)
}
if err := os.WriteFile(absPath, []byte(data), 0600); err != nil {
return err
}
return nil
}
func mergeConfigs(localKubeconfigPath, context string, k3sconfig []byte) ([]byte, error) {
// Create a temporary kubeconfig to store the config of the newly create k3s cluster
file, err := os.CreateTemp(os.TempDir(), "k3s-temp-*")
if err != nil {
return nil, fmt.Errorf("could not generate a temporary file to store the kubeconfig: %w", err)
}
defer func() {
// Remove the temporarily generated file, even if there is an error and the
// function returns early
if err = os.Remove(file.Name()); err != nil {
log.Printf("could not remove temporary kubeconfig file: %s %s", file.Name(), err)
}
}()
if err := writeConfig(file.Name(), []byte(k3sconfig), context, true); err != nil {
return nil, err
}
fmt.Printf("Merging config into file: %s\n", localKubeconfigPath)
// Pick between ; or : for path concatenation
var joinChar string
if runtime.GOOS == "windows" {
joinChar = ";"
} else {
joinChar = ":"
}
appendKubeConfigENV := fmt.Sprintf("KUBECONFIG=%s%s%s",
localKubeconfigPath,
joinChar,
file.Name())
// Merge the two kubeconfigs and read the output into 'data'
cmd := exec.Command("kubectl", "config", "view", "--merge", "--flatten")
cmd.Env = append(os.Environ(), appendKubeConfigENV)
data, err := cmd.Output()
if err != nil {
return nil, fmt.Errorf("could not merge kubeconfig: %w", err)
}
if err := file.Close(); err != nil {
return nil, fmt.Errorf("could not close temporary kubeconfig file: %s %w",
file.Name(), err)
}
return data, nil
}
func expandPath(path string) string {
res, _ := homedir.Expand(path)
return res
}
func sshAgent(publicKeyPath string) (ssh.AuthMethod, func() error) {
if sshAgentConn, err := net.Dial("unix", os.Getenv("SSH_AUTH_SOCK")); err == nil {
sshAgent := agent.NewClient(sshAgentConn)
keys, _ := sshAgent.List()
if len(keys) == 0 {
return nil, sshAgentConn.Close
}
pubkey, err := os.ReadFile(publicKeyPath)
if err != nil {
return nil, sshAgentConn.Close
}
authkey, _, _, _, err := ssh.ParseAuthorizedKey(pubkey)
if err != nil {
return nil, sshAgentConn.Close
}
parsedkey := authkey.Marshal()
for _, key := range keys {
if bytes.Equal(key.Blob, parsedkey) {
return ssh.PublicKeysCallback(sshAgent.Signers), sshAgentConn.Close
}
}
}
return nil, func() error { return nil }
}
func loadPublickey(path string) (ssh.AuthMethod, func() error, error) {
noopCloseFunc := func() error { return nil }
key, err := os.ReadFile(path)
if err != nil {
return nil, noopCloseFunc, fmt.Errorf("unable to read file: %s, %s", path, err)
}
signer, err := ssh.ParsePrivateKey(key)
if err != nil {
if _, ok := err.(*ssh.PassphraseMissingError); !ok {
return nil, noopCloseFunc, fmt.Errorf("unable to parse private key: %s", err.Error())
}
agent, close := sshAgent(path + ".pub")
if agent != nil {
return agent, close, nil
}
defer close()
fmt.Printf("Enter passphrase for '%s': ", path)
STDIN := int(os.Stdin.Fd())
bytePassword, _ := term.ReadPassword(STDIN)
// Ignore any error from reading stdin to retain existing behaviour for unit test in
// install_test.go
// if err != nil {
// return nil, noopCloseFunc, fmt.Errorf("reading password from stdin failed: %s", err.Error())
// }
fmt.Println()
signer, err = ssh.ParsePrivateKeyWithPassphrase(key, bytePassword)
if err != nil {
return nil, noopCloseFunc, fmt.Errorf("parse private key with passphrase failed: %s", err)
}
}
return ssh.PublicKeys(signer), noopCloseFunc, nil
}
// rewriteKubeconfig replaces the IP address of the server with the IP address
// it also changes the context from "default" to the value of the --context flag
func rewriteKubeconfig(kubeconfig string, host string, context string) []byte {
if context == "" {
context = "default"
}
kubeconfigReplacer := strings.NewReplacer(
"127.0.0.1", host,
"localhost", host,
"default", context,
)
return []byte(kubeconfigReplacer.Replace(kubeconfig))
}
func makeInstallExec(cluster bool, host, tlsSAN string, options k3sExecOptions) string {
extraArgs := []string{}
if len(options.Datastore) > 0 {
extraArgs = append(extraArgs, fmt.Sprintf("--datastore-endpoint %s", options.Datastore))
extraArgs = append(extraArgs, fmt.Sprintf("--token %s", options.Token))
}
if options.FlannelIPSec {
extraArgs = append(extraArgs, "--flannel-backend ipsec")
}
if options.NoExtras {
extraArgs = append(extraArgs, "--disable servicelb")
extraArgs = append(extraArgs, "--disable traefik")
}
extraArgs = append(extraArgs, options.ExtraArgs)
extraArgsCmdline := ""
for _, a := range extraArgs {
extraArgsCmdline += a + " "
}
installExec := "INSTALL_K3S_EXEC='server"
if cluster {
installExec += " --cluster-init"
}
san := host
if len(tlsSAN) > 0 {
san = tlsSAN
}
installExec += fmt.Sprintf(" --tls-san %s", san)
if trimmed := strings.TrimSpace(extraArgsCmdline); len(trimmed) > 0 {
installExec += fmt.Sprintf(" %s", trimmed)
}
installExec += "'"
return installExec
}
================================================
FILE: cmd/install_test.go
================================================
package cmd
import (
"errors"
"os"
"regexp"
"strings"
"testing"
"golang.org/x/crypto/ssh"
)
// To regenerate:
// openssl genrsa -des3 -out /tmp/id_rsa_encrypted 2048
const privateKey = `-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,4FA02C824DA7DA35
0MxJJqh8FGEciV4fkZzq7bCfKmPy5a3x9eJ+8sY+ssNGG8cLMdV2uDPMrarssjBK
QtaEFUMu2f2lxuXYvPzZtSQNkcUUj2kBJCxgdrs7mGLgqnLOYkbkWA3rUiiNYf2S
UofpsAO4gVWcQ4HBtnWW6skQp4fa0fdfg8elKlOrM0wcRX890attpyCCbfEAtn/v
6z31ezObnGQOFSZ9kM7icbAM8pPgjex3kno5kxzVfpyL+5pq36AyFoFBN1wzYzMf
gpwtr/m+Kw/KUWVGFKXLKgFSe9aF/dIXisdVCJze+2uQEBDXZo1OiJ3rflrTKwlB
t2NNLPdd23MOHK8B8dBWhitppBqloy68Thfw0cFq2E4qtUIl9SqtBhcQ118E0Z/7
UGVg6Ki+sgBO5fHcQUnDn7DGV8/Gawl+ZOhvGkD9C2Q/vK/SaKEg3X7ap4Oo2/em
NGVVnxCpgd3GfVHsZFHjRvt/YYQtBHdAhH8cU45WlRaLbUyKSyfq7TIAzDa04bl+
VMytKkfwYoPG8E3POABZ2lOgDWeBQeK3eP7EkxTkv3sSahWIwFE1HaBZmhoL27vH
necstfLEHqKkONvaXzqSbKk7e0GXKooSgZS2NJP7wJSX4e5CbOBrM4hf69CIG5bm
rPPYs9mhxsa+iP4X5EVxdr1IEUTzwqeLB+/e/C/+mbs37L7tv3yvKC8UG8gXr1jC
qzm+V3SSH9W5tgqDx97ljuDqLXgZl158W5NbYIwXB7FazU1DEJAOGSgu21w8XqlF
SmxKXJHAjLwGzkygNGZYRGllq8GppZxLeUZHmlL+F490BclIdxCaOir//Bqd+a8a
bs3Q7D57kuo003x9z0e044anmANdmEFSjfPG7ajHUfm7EqsQ4pZOYp4twllOJkY5
Yffoe94wdYbMGtrBKY9xeZPgecDZpjMv1g6pB5Gt6p4VLz/U2rstTkjqiHTZfIej
tphVIzOTpsfVNMG4As3WOapz+9MH2kzEKORAHpQpZenyvcAfhJJa404riZ3HJ++O
Nmc7ASSirGNty1BTJKKQtN/QDvVbM011jUpuQxbEwfUDAUlQU4g5YElfMw3l9tDo
jWM4jimYxGaeaTI2C6hjy7pLMWCywkOGrKVKuii8EI8vd4Mw9jTIMRQzBotzEBFn
qAy3PMlnGd/CDs/HPAWqPWEloU9bcY8oP954EEfNZoNz95u6VMJkqfM/ynu1yBEl
FjG6pf31NEqjYTeFmJROozLGLxdPTrchn/MYU60oG/eJfY+eZ02h8J58yC67aG/f
7tCUfB8UrQH1s16BY2j9EM6KPbX3Hh8VXiKb7/UzIPtD9aD5HKzl7K3fIbi+aQcX
ySQXENXiPpieDZj7kKp9VskNjpLyXyR1BN7Tf3eIZ6N1gK1d6esZMhXhPR5S4LT9
F8ZD5KeHVWB6hOaodWr/bhfEVb8E67/OcnLQM8iKdBfqkoPDInVIXGkt8FXQfiB0
I+rSXfppnf7bhQK3HLeU27Ca6zxQYZ7TI6bXTRBjozFakKkQ+8xcfCVzZ/0/oZgu
kfFJfrUjElq6Bx9oPPxc2vD40gqnYL57A+Y+X+A0kL4fO7pfh2VxOw==
-----END RSA PRIVATE KEY-----
`
func Test_loadPublickeyEncrypted(t *testing.T) {
want := &ssh.PassphraseMissingError{}
tmpfile, err := os.CreateTemp("", "key")
if err != nil {
t.Error(err)
}
fileName := tmpfile.Name()
defer os.Remove(fileName)
if _, err := tmpfile.Write([]byte(privateKey)); err != nil {
t.Fatalf("unable to write test file %s, %s", fileName, err)
}
tmpfile.Close()
_, _, err = loadPublickey(fileName)
if errors.Is(err, want) {
t.Fatalf("want: %q, but got: %q", want, err.Error())
}
}
const kubeconfigExample = `
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://localhost:6443
name: default
contexts:
- context:
cluster: default
user: default
name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
user:
password: 5ceb3a3e93621d265fd147929f3ace84
username: admin
`
func Test_RewriteKubeconfig(t *testing.T) {
var ip = "192.168.0.25"
var context = "context-test"
// Test master ip rewrite
kubeconfig = rewriteKubeconfig(kubeconfigExample, ip, context)
re := regexp.MustCompile(`server:\s?https://(.*):\d+`)
group := re.FindSubmatch(kubeconfig)
if len(group) == 0 || string(group[1]) != ip {
t.Fatalf("unexpected error, got: %q, want: %q.", string(group[1]), ip)
}
kubeconfigExampleIPLocal := strings.Replace(kubeconfigExample, "localhost", "127.0.0.1", -1)
kubeconfig = rewriteKubeconfig(kubeconfigExampleIPLocal, ip, context)
group = re.FindSubmatch(kubeconfig)
if len(group) == 0 || string(group[1]) != ip {
t.Fatalf("unexpected error, got: %q, want: %q.", string(group[1]), ip)
}
// Test context
re = regexp.MustCompile(`default`)
expectedContextsToReplace := re.FindAllStringIndex(kubeconfigExample, -1)
kubeconfig = rewriteKubeconfig(kubeconfigExample, ip, "")
match := re.FindAllIndex(kubeconfig, -1)
if len(match) != len(expectedContextsToReplace) {
t.Fatalf("unexpected error, got: %q, want: %q.", len(match), len(expectedContextsToReplace))
}
kubeconfig = rewriteKubeconfig(kubeconfigExample, ip, context)
re = regexp.MustCompile(`context-test`)
match = re.FindAllIndex(kubeconfig, -1)
if len(match) != len(expectedContextsToReplace) {
t.Fatalf("unexpected error, got: %q, want: %q.", len(match), len(expectedContextsToReplace))
}
}
func Test_makeInstallExec(t *testing.T) {
cluster := false
datastore := ""
flannelIPSec := false
k3sNoExtras := false
k3sExtraArgs := ""
ip := "raspberrypi.local"
tlsSAN := ""
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --tls-san raspberrypi.local'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
func Test_makeInstallExec_Cluster(t *testing.T) {
cluster := true
datastore := ""
flannelIPSec := false
k3sNoExtras := false
k3sExtraArgs := ""
ip := "127.0.0.1"
tlsSAN := ""
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --cluster-init --tls-san 127.0.0.1'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
func Test_makeInstallExec_SAN(t *testing.T) {
cluster := false
datastore := ""
flannelIPSec := false
k3sNoExtras := false
k3sExtraArgs := ""
ip := "127.0.0.1"
tlsSAN := "192.168.0.1"
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --tls-san 192.168.0.1'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
func Test_makeInstallExec_IPSec(t *testing.T) {
cluster := false
datastore := ""
flannelIPSec := true
k3sNoExtras := false
k3sExtraArgs := ""
ip := "127.0.0.1"
tlsSAN := ""
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --tls-san 127.0.0.1 --flannel-backend ipsec'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
func Test_makeInstallExec_Datastore(t *testing.T) {
cluster := false
datastore := "mysql://doadmin:show-password@tcp(db-mysql-lon1-40939-do-user-2197152-0.b.db.ondigitalocean.com:25060)/defaultdb"
flannelIPSec := false
k3sNoExtras := false
k3sExtraArgs := ""
token := "this-token"
ip := "127.0.0.1"
tlsSAN := "192.168.0.1"
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
Token: token,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --tls-san 192.168.0.1 --datastore-endpoint mysql://doadmin:show-password@tcp(db-mysql-lon1-40939-do-user-2197152-0.b.db.ondigitalocean.com:25060)/defaultdb --token this-token'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
func Test_makeInstallExec_Datastore_NoExtras(t *testing.T) {
cluster := false
datastore := "mysql://doadmin:show-password@tcp(db-mysql-lon1-40939-do-user-2197152-0.b.db.ondigitalocean.com:25060)/defaultdb"
flannelIPSec := false
k3sNoExtras := true
token := "this-token"
k3sExtraArgs := ""
ip := "raspberrypi.local"
tlsSAN := "192.168.0.1"
got := makeInstallExec(cluster, ip, tlsSAN,
k3sExecOptions{
Datastore: datastore,
Token: token,
FlannelIPSec: flannelIPSec,
NoExtras: k3sNoExtras,
ExtraArgs: k3sExtraArgs,
})
want := "INSTALL_K3S_EXEC='server --tls-san 192.168.0.1 --datastore-endpoint mysql://doadmin:show-password@tcp(db-mysql-lon1-40939-do-user-2197152-0.b.db.ondigitalocean.com:25060)/defaultdb --token this-token --disable servicelb --disable traefik'"
if got != want {
t.Errorf("want: %q, got: %q", want, got)
}
}
================================================
FILE: cmd/join.go
================================================
package cmd
import (
"fmt"
"net"
"os"
"path"
"runtime"
"strings"
"errors"
"github.com/alexellis/k3sup/pkg"
operator "github.com/alexellis/k3sup/pkg/operator"
"github.com/spf13/cobra"
"golang.org/x/crypto/ssh"
)
// MakeJoin creates the join command
func MakeJoin() *cobra.Command {
var command = &cobra.Command{
Use: "join",
Short: "Install the k3s agent on a remote host and join it to an existing server",
Long: `Install the k3s agent on a remote host and join it to an existing server
` + pkg.SupportMessageShort + `
`,
Example: ` # Install K3s joining a cluster as an agent
k3sup join \
--user AGENT_USER \
--ip AGENT_IP \
--server-ip IP \
--server-user SERVER_USER
# Install K3s joining a cluster as another server
k3sup join \
--user AGENT_USER \
--ip AGENT_IP \
--server \
--server-ip IP \
--server-user SERVER_USER
# Join whilst specifying a channel for the k3sup version
k3sup join --user pi \
--server-host HOST \
--host HOST \
--k3s-channel latest`,
SilenceUsage: true,
}
command.Flags().IP("ip", net.ParseIP("127.0.0.1"), "Public IP of node on which to install agent")
command.Flags().IP("server-ip", net.ParseIP("127.0.0.1"), "Public IP of an existing k3s server")
command.Flags().String("host", "", "Public hostname of node on which to install agent")
command.Flags().String("server-host", "", "Public hostname of an existing k3s server")
command.Flags().String("server-url", "", "If different from server-ip or server-host, the URL of the server to join")
command.Flags().String("user", "root", "Username for SSH login")
command.Flags().String("server-user", "root", "Server username for SSH login (Default to --user)")
command.Flags().String("ssh-key", "~/.ssh/id_rsa", "The ssh key to use for remote login")
command.Flags().Int("ssh-port", 22, "The port on which to connect for ssh")
command.Flags().Int("server-ssh-port", 22, "The port on which to connect to server for ssh (Default to --ssh-port)")
command.Flags().Bool("skip-install", false, "Skip the k3s installer")
command.Flags().Bool("sudo", true, "Use sudo for installation. e.g. set to false when using the root user and no sudo is available.")
command.Flags().Bool("server", false, "Join the cluster as a server rather than as an agent for the embedded etcd mode")
command.Flags().Bool("no-extras", false, `Disable "servicelb" and "traefik", when using --server flag`)
command.Flags().Bool("print-command", false, "Print a command that you can use with SSH to manually recover from an error")
command.Flags().String("node-token-path", "", "file containing --node-token")
command.Flags().String("node-token", "", "prefetched token used by nodes to join the cluster")
command.Flags().String("k3s-extra-args", "", "Additional arguments to pass to k3s installer, wrapped in quotes (e.g. --k3s-extra-args '--node-taint key=value:NoExecute')")
command.Flags().String("k3s-version", "", "Set a version to install, overrides k3s-channel")
command.Flags().String("k3s-channel", PinnedK3sChannel, "Release channel: stable, latest, or i.e. v1.19")
command.Flags().String("tls-san", "", "Use an additional IP or hostname for the API server, when using --server flag")
command.Flags().String("server-data-dir", "/var/lib/rancher/k3s/", "Override the path used to fetch the node-token from the server")
command.RunE = func(command *cobra.Command, args []string) error {
fmt.Printf("Running: k3sup join\n")
ip, err := command.Flags().GetIP("ip")
if err != nil {
return err
}
var nodeToken string
if command.Flags().Changed("node-token") {
nodeToken, _ = command.Flags().GetString("node-token")
} else if command.Flags().Changed("node-token-path") {
nodeTokenPath, _ := command.Flags().GetString("node-token-path")
if len(nodeTokenPath) > 0 {
data, err := os.ReadFile(nodeTokenPath)
if err != nil {
return err
}
nodeToken = strings.TrimSpace(string(data))
}
}
host, err := command.Flags().GetString("host")
if err != nil {
return err
}
if len(host) == 0 {
host = ip.String()
}
dataDir, err := command.Flags().GetString("server-data-dir")
if err != nil {
return err
}
if len(dataDir) == 0 {
return fmt.Errorf("--server-data-dir must be set")
}
if !strings.HasPrefix(dataDir, "/") {
return fmt.Errorf("--server-data-dir must begin with /")
}
serverIP, err := command.Flags().GetIP("server-ip")
if err != nil {
return err
}
serverHost, err := command.Flags().GetString("server-host")
if err != nil {
return err
}
if len(serverHost) == 0 {
serverHost = serverIP.String()
}
serverURL, err := command.Flags().GetString("server-url")
if err != nil {
return err
}
fmt.Printf("Joining %s => %s\n", host, serverHost)
if len(serverURL) > 0 {
fmt.Printf("Server join URL: %s\n", serverURL)
}
user, _ := command.Flags().GetString("user")
serverUser := user
if command.Flags().Changed("server-user") {
serverUser, _ = command.Flags().GetString("server-user")
}
sshKey, _ := command.Flags().GetString("ssh-key")
server, err := command.Flags().GetBool("server")
if err != nil {
return err
}
port, _ := command.Flags().GetInt("ssh-port")
serverPort := port
if command.Flags().Changed("server-ssh-port") {
serverPort, _ = command.Flags().GetInt("server-ssh-port")
}
k3sVersion, err := command.Flags().GetString("k3s-version")
if err != nil {
return err
}
k3sExtraArgs, err := command.Flags().GetString("k3s-extra-args")
if err != nil {
return err
}
k3sChannel, err := command.Flags().GetString("k3s-channel")
if err != nil {
return err
}
if len(k3sVersion) == 0 && len(k3sChannel) == 0 {
return fmt.Errorf("give a value for --k3s-version or --k3s-channel")
}
printCommand, err := command.Flags().GetBool("print-command")
if err != nil {
return err
}
useSudo, err := command.Flags().GetBool("sudo")
if err != nil {
return err
}
sudoPrefix := ""
if useSudo {
sudoPrefix = "sudo "
}
sshKeyPath := expandPath(sshKey)
if len(nodeToken) == 0 {
address := fmt.Sprintf("%s:%d", serverHost, serverPort)
sshOperator, sshOperatorDone, errored, err := connectOperator(serverUser, address, sshKeyPath)
if errored {
return err
}
if sshOperatorDone != nil {
defer sshOperatorDone()
}
getTokenCommand := fmt.Sprintf("%scat %s\n", sudoPrefix, path.Join(dataDir, "/server/node-token"))
if printCommand {
fmt.Printf("ssh: %s\n", getTokenCommand)
}
streamToStdio := false
res, err := sshOperator.ExecuteStdio(getTokenCommand, streamToStdio)
if err != nil {
return fmt.Errorf("unable to get join-token from server: %w", err)
}
if len(res.StdErr) > 0 {
fmt.Printf("Error or warning getting node-token: %s\n", res.StdErr)
} else {
fmt.Printf("Received node-token from %s.. ok.\n", serverHost)
}
// Explicit close of the SSH connection as early as possible
// which complements the defer
if sshOperatorDone != nil {
sshOperatorDone()
}
nodeToken = strings.TrimSpace(string(res.StdOut))
}
if server {
tlsSan, _ := command.Flags().GetString("tls-san")
noExtras, _ := command.Flags().GetBool("no-extras")
err = setupAdditionalServer(serverHost, host, port, user, sshKeyPath, nodeToken, k3sExtraArgs, k3sVersion, k3sChannel, tlsSan, printCommand, serverURL, noExtras)
} else {
err = setupAgent(serverHost, host, port, user, sshKeyPath, nodeToken, k3sExtraArgs, k3sVersion, k3sChannel, printCommand, serverURL)
}
if err == nil {
fmt.Printf("\n%s\n", pkg.SupportMessageShort)
}
return err
}
command.PreRunE = func(command *cobra.Command, args []string) error {
_, err := command.Flags().GetIP("ip")
if err != nil {
return err
}
_, err = command.Flags().GetIP("server-ip")
if err != nil {
return err
}
_, err = command.Flags().GetString("host")
if err != nil {
return err
}
_, err = command.Flags().GetString("server-host")
if err != nil {
return err
}
_, err = command.Flags().GetInt("ssh-port")
if err != nil {
return err
}
tlsSan, err := command.Flags().GetString("tls-san")
if err != nil {
return err
}
noExtras, err := command.Flags().GetBool("no-extras")
if err != nil {
return err
}
if len(tlsSan) > 0 || noExtras {
server, err := command.Flags().GetBool("server")
if err != nil {
return err
}
if !server {
if noExtras {
return fmt.Errorf("--no-extras can only be used with --server")
}
return fmt.Errorf("--tls-san can only be used with --server")
}
}
return nil
}
return command
}
func setupAdditionalServer(serverHost, host string, port int, user, sshKeyPath, joinToken, k3sExtraArgs, k3sVersion, k3sChannel, tlsSAN string, printCommand bool, serverURL string, noExtras bool) error {
address := fmt.Sprintf("%s:%d", host, port)
var sshOperator *operator.SSHOperator
var initialSSHErr error
if runtime.GOOS != "windows" {
var sshAgentAuthMethod ssh.AuthMethod
sshAgentAuthMethod, initialSSHErr = sshAgentOnly()
if initialSSHErr == nil {
// Try SSH agent without parsing key files, will succeed if the user
// has already added a key to the SSH Agent, or if using a configured
// smartcard
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{sshAgentAuthMethod},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, initialSSHErr = operator.NewSSHOperator(address, config)
}
} else {
initialSSHErr = errors.New("ssh-agent unsupported on windows")
}
// If the initial connection attempt fails fall through to the using
// the supplied/default private key file
if initialSSHErr != nil {
publicKeyFileAuth, closeSSHAgent, err := loadPublickey(sshKeyPath)
if err != nil {
return fmt.Errorf("unable to load the ssh key with path %q: %w", sshKeyPath, err)
}
defer closeSSHAgent()
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{
publicKeyFileAuth,
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, err = operator.NewSSHOperator(address, config)
if err != nil {
return fmt.Errorf("unable to connect to %s over ssh as %s: %w", address, user, err)
}
}
installStr := createVersionStr(k3sVersion, k3sChannel)
serverAgent := true
defer sshOperator.Close()
if noExtras {
k3sExtraArgs += " --disable servicelb"
k3sExtraArgs += " --disable traefik"
}
installk3sExec := makeJoinExec(
serverHost,
strings.TrimSpace(joinToken),
installStr,
k3sExtraArgs,
serverAgent,
serverURL,
tlsSAN,
)
installAgentServerCommand := fmt.Sprintf("%s | %s", getScript, installk3sExec)
if printCommand {
fmt.Printf("ssh: %s\n", installAgentServerCommand)
}
res, err := sshOperator.Execute(installAgentServerCommand)
if err != nil {
return fmt.Errorf("unable to setup agent: %w", err)
}
if len(res.StdErr) > 0 {
fmt.Printf("Logs: %s", res.StdErr)
}
joinRes := string(res.StdOut)
fmt.Printf("Output: %s", string(joinRes))
return nil
}
func setupAgent(serverHost, host string, port int, user, sshKeyPath, joinToken, k3sExtraArgs, k3sVersion, k3sChannel string, printCommand bool, serverURL string) error {
address := fmt.Sprintf("%s:%d", host, port)
var sshOperator *operator.SSHOperator
var initialSSHErr error
if runtime.GOOS != "windows" {
var sshAgentAuthMethod ssh.AuthMethod
sshAgentAuthMethod, initialSSHErr = sshAgentOnly()
if initialSSHErr == nil {
// Try SSH agent without parsing key files, will succeed if the user
// has already added a key to the SSH Agent, or if using a configured
// smartcard
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{sshAgentAuthMethod},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, initialSSHErr = operator.NewSSHOperator(address, config)
}
} else {
initialSSHErr = errors.New("ssh-agent unsupported on windows")
}
// If the initial connection attempt fails fall through to the using
// the supplied/default private key file
if initialSSHErr != nil {
publicKeyFileAuth, closeSSHAgent, err := loadPublickey(sshKeyPath)
if err != nil {
return fmt.Errorf("unable to load the ssh key with path %q: %w", sshKeyPath, err)
}
defer closeSSHAgent()
config := &ssh.ClientConfig{
User: user,
Auth: []ssh.AuthMethod{
publicKeyFileAuth,
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}
sshOperator, err = operator.NewSSHOperator(address, config)
if err != nil {
return fmt.Errorf("unable to connect to %s over ssh: %w", address, err)
}
}
defer sshOperator.Close()
installStr := createVersionStr(k3sVersion, k3sChannel)
serverAgent := false
// Agents don't expose an API server so don't need a TLS SAN
tlsSAN := ""
installK3sExec := makeJoinExec(
serverHost,
strings.TrimSpace(joinToken),
installStr,
k3sExtraArgs,
serverAgent,
serverURL,
tlsSAN,
)
installAgentCommand := fmt.Sprintf("%s | %s", getScript, installK3sExec)
if printCommand {
fmt.Printf("ssh: %s\n", installAgentCommand)
}
res, err := sshOperator.Execute(installAgentCommand)
if err != nil {
return fmt.Errorf("unable to setup agent: %w", err)
}
if len(res.StdErr) > 0 {
fmt.Printf("Logs: %s", res.StdErr)
}
joinRes := string(res.StdOut)
fmt.Printf("Output: %s", string(joinRes))
return nil
}
func createVersionStr(k3sVersion, k3sChannel string) string {
installStr := ""
if len(k3sVersion) > 0 {
installStr = fmt.Sprintf("INSTALL_K3S_VERSION='%s'", k3sVersion)
} else {
installStr = fmt.Sprintf("INSTALL_K3S_CHANNEL='%s'", k3sChannel)
}
return installStr
}
func makeJoinExec(serverIP, joinToken, installStr, k3sExtraArgs string, serverAgent bool, serverURL, tlsSan string) string {
installEnvVar := []string{}
remoteURL := fmt.Sprintf("https://%s:6443", serverIP)
if len(serverURL) > 0 {
remoteURL = serverURL
}
installEnvVar = append(installEnvVar, fmt.Sprintf("K3S_URL='%s'", remoteURL))
installEnvVar = append(installEnvVar, fmt.Sprintf("K3S_TOKEN='%s'", joinToken))
installEnvVar = append(installEnvVar, installStr)
if serverAgent {
tlsSANValue := ""
if len(tlsSan) > 0 {
tlsSANValue = fmt.Sprintf(" --tls-san %s", tlsSan)
}
installEnvVar = append(installEnvVar, fmt.Sprintf("INSTALL_K3S_EXEC='server --server %s%s'", remoteURL, tlsSANValue))
}
joinExec := strings.Join(installEnvVar, " ")
joinExec += " sh -s -"
if len(k3sExtraArgs) > 0 {
// AE: this doesn't seem to be used
// installEnvVar = append(installEnvVar, k3sExtraArgs)
joinExec += fmt.Sprintf(" %s", k3sExtraArgs)
}
return joinExec
}
================================================
FILE: cmd/join_test.go
================================================
package cmd
import (
"testing"
)
type test struct {
title string
serverIP string
joinToken string
installStr string
k3sExtraArgs string
serverAgent bool
installk3sExec string
tlsSAN string
}
func Test_makeJoinServerExec(t *testing.T) {
tests := []test{
{
title: "Join Server without k3sExtraArgs",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 INSTALL_K3S_EXEC='server --server https://172.27.251.164:6443' sh -s -",
k3sExtraArgs: "",
serverAgent: true,
},
{
title: "Join Server with K3sExtraArgs",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 INSTALL_K3S_EXEC='server --server https://172.27.251.164:6443' sh -s - --node-taint key=value:NoExecute",
k3sExtraArgs: "--node-taint key=value:NoExecute",
serverAgent: true,
},
{
title: "Join Server with K3sExtraArgs and TLS SAN",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 INSTALL_K3S_EXEC='server --server https://172.27.251.164:6443 --tls-san 127.0.0.1' sh -s - --node-taint key=value:NoExecute",
k3sExtraArgs: "--node-taint key=value:NoExecute",
serverAgent: true,
tlsSAN: "127.0.0.1",
},
{
title: "Join agent with K3sExtraArgs",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 sh -s - --node-ip=192.0.3.4 --node-external-ip=85.159.215.50",
k3sExtraArgs: "--node-ip=192.0.3.4 --node-external-ip=85.159.215.50",
serverAgent: false,
tlsSAN: "127.0.0.1",
},
}
for _, tc := range tests {
t.Run(tc.title, func(t *testing.T) {
got := makeJoinExec(tc.serverIP, tc.joinToken, tc.installStr, tc.k3sExtraArgs, tc.serverAgent, "", tc.tlsSAN)
if got != tc.installk3sExec {
t.Errorf("want:\n%s\n, got:\n%s\n", tc.installk3sExec, got)
}
})
}
}
func Test_makeJoinAgentExec(t *testing.T) {
tests := []test{
{
title: "Join Agent without K3sExtraArgs",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
k3sExtraArgs: "",
serverAgent: false,
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 sh -s -",
},
{
title: "Join Agent with K3sExtraArgs",
serverIP: "172.27.251.164",
joinToken: "K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d",
installStr: "INSTALL_K3S_VERSION=1.18",
installk3sExec: "K3S_URL='https://172.27.251.164:6443' K3S_TOKEN='K10c8bc21f68fef3f56d431a08df2e894481ab0a61a3c84cbd639b56449ad15523c::server:9d30861e1ba54177b8e4dd1426076e5d' INSTALL_K3S_VERSION=1.18 sh -s - --node-taint key=value:NoExecute",
k3sExtraArgs: "--node-taint key=value:NoExecute",
serverAgent: false,
},
}
for _, tc := range tests {
t.Run(tc.title, func(t *testing.T) {
got := makeJoinExec(tc.serverIP, tc.joinToken, tc.installStr, tc.k3sExtraArgs, tc.serverAgent, "", "")
if got != tc.installk3sExec {
t.Errorf("want: %s, got: %s", tc.installk3sExec, got)
}
})
}
}
================================================
FILE: cmd/node-token.go
================================================
package cmd
import (
"fmt"
"net"
"os"
"path"
"strings"
"github.com/alexellis/k3sup/pkg"
ssh "github.com/alexellis/k3sup/pkg/operator"
"github.com/spf13/cobra"
)
// MakeNodeToken creates the node-token command
func MakeNodeToken() *cobra.Command {
var command = &cobra.Command{
Use: "node-token",
Short: "Retrieve the node token from a server",
Long: `Retrieve the node token from a server required for a
server or agent to join the cluster.
` + pkg.SupportMessageShort + `
`,
Example: ` # Get the node token from the server and pipe it to a file
k3sup node-token --ip IP --user USER > token.txt
`,
SilenceUsage: true,
}
command.Flags().IP("ip", net.ParseIP("127.0.0.1"), "Public IP of node")
command.Flags().String("user", "root", "Username for SSH login")
command.Flags().String("host", "", "Public hostname of node on which to install agent")
command.Flags().Bool("local", false, "Use local machine instead of ssh client")
command.Flags().String("ssh-key", "~/.ssh/id_rsa", "The ssh key to use for remote login")
command.Flags().Int("ssh-port", 22, "The port on which to connect for ssh")
command.Flags().Bool("sudo", true, "Use sudo for installation. e.g. set to false when using the root user and no sudo is available.")
command.Flags().Bool("print-command", false, "Print the command to be executed")
command.Flags().String("server-data-dir", "/var/lib/rancher/k3s/", "Override the path used to fetch the node-token from the server")
command.PreRunE = func(command *cobra.Command, args []string) error {
local, err := command.Flags().GetBool("local")
if err != nil {
return err
}
if !local {
_, err = command.Flags().GetString("host")
if err != nil {
return err
}
if _, err := command.Flags().GetIP("ip"); err != nil {
return err
}
if _, err := command.Flags().GetInt("ssh-port"); err != nil {
return err
}
}
return nil
}
command.RunE = func(command *cobra.Command, args []string) error {
fmt.Fprintf(os.Stderr, "Fetching: /etc/rancher/k3s/k3s.yaml\n")
useSudo, err := command.Flags().GetBool("sudo")
if err != nil {
return err
}
sudoPrefix := ""
if useSudo {
sudoPrefix = "sudo "
}
local, _ := command.Flags().GetBool("local")
ip, err := command.Flags().GetIP("ip")
if err != nil {
return err
}
host, err := command.Flags().GetString("host")
if err != nil {
return err
}
if len(host) == 0 {
host = ip.String()
}
port, _ := command.Flags().GetInt("ssh-port")
user, _ := command.Flags().GetString("user")
sshKey, _ := command.Flags().GetString("ssh-key")
dataDir, _ := command.Flags().GetString("server-data-dir")
sshKeyPath := expandPath(sshKey)
address := fmt.Sprintf("%s:%d", host, port)
if !local {
fmt.Fprintf(os.Stderr, "Remote: %s\n", address)
}
printCommand := false
getTokenCommand := fmt.Sprintf("%scat %s\n", sudoPrefix, path.Join(dataDir, "/server/node-token"))
if printCommand {
fmt.Printf("ssh: %s\n", getTokenCommand)
}
var operator ssh.CommandOperator
if local {
operator = ssh.ExecOperator{}
} else {
sshOperator, sshOperatorDone, errored, err := connectOperator(user, address, sshKeyPath)
if errored {
return err
}
operator = sshOperator
if sshOperatorDone != nil {
defer sshOperatorDone()
}
}
nodeToken, err := obtainNodeToken(operator, getTokenCommand, host)
if err != nil {
return err
}
if len(nodeToken) == 0 {
return fmt.Errorf("no node token found")
}
fmt.Println(nodeToken)
return nil
}
return command
}
func obtainNodeToken(operator ssh.CommandOperator, command, host string) (string, error) {
res, err := operator.ExecuteStdio(command, false)
if err != nil {
return "", fmt.Errorf("error received processing command: %s", err)
}
return strings.TrimSpace(string(res.StdOut)), nil
}
================================================
FILE: cmd/plan.go
================================================
package cmd
import (
"encoding/json"
"fmt"
"os"
"github.com/alexellis/k3sup/pkg"
"github.com/spf13/cobra"
)
func MakePlan() *cobra.Command {
var command = &cobra.Command{
Use: "plan",
Short: "Plan an installation of K3s.",
Long: `Generate a bash script or plan of installation commands for K3s for a
Highly Available (HA) Kubernetes cluster.
Examples JSON input file:
[{"hostname": "node-1", "ip": "192.168.128.102"},
{"hostname": "node-2", "ip": "192.168.128.103"},
{"hostname": "node-3", "ip": "192.168.128.104"}]
` + pkg.SupportMessageShort + `
`,
Example: ` # Generate an installation script where the first
# 3 available hosts are dedicated as servers, with a custom user.
# The remaining hosts are added as agents.
k3sup plan hosts.json --servers 3 --user ubuntu
# Override the TLS SAN, for HA with 5 servers specified
k3sup plan hosts.json --servers 5 --tls-san $SAN_IP
`,
SilenceUsage: true,
}
command.Flags().Int("servers", 3, "Number of servers to use from the devices file")
command.Flags().String("local-path", "kubeconfig", "Where to save the kubeconfig file")
command.Flags().String("context", "default", "Name of the kubeconfig context to use")
command.Flags().String("user", "root", "Username for SSH login")
command.Flags().String("ssh-key", "", "Path to the private key for SSH login")
command.Flags().String("tls-san", "", "SAN for TLS certificates, can be a comma-separated list")
command.Flags().String("server-k3s-extra-args", "", "Extra arguments to be passed into the k3s server")
command.Flags().String("agent-k3s-extra-args", "", "Extra arguments to be passed into the k3s agent")
// Background
command.Flags().Bool("background", false, "Run the installation in the background for all agents/nodes after the first server is up")
command.Flags().Int("limit", 0, "Maximum number of nodes to use from the devices file, 0 to use all devices")
command.Flags().Bool("merge", true, `Merge the config with existing kubeconfig if it already exists.
Provide the --local-path flag with --merge if a kubeconfig already exists in some other directory`)
command.RunE = func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("give a path to a JSON file containing a list of devices")
}
nodeLimit, _ := cmd.Flags().GetInt("limit")
name := args[0]
data, err := os.ReadFile(name)
if err != nil {
return err
}
background, _ := cmd.Flags().GetBool("background")
merge, _ := cmd.Flags().GetBool("merge")
var hosts []Host
if err = json.Unmarshal(data, &hosts); err != nil {
return err
}
serverK3sExtraArgs, _ := cmd.Flags().GetString("server-k3s-extra-args")
agentK3sExtraArgs, _ := cmd.Flags().GetString("agent-k3s-extra-args")
servers, _ := cmd.Flags().GetInt("servers")
kubeconfig, _ := cmd.Flags().GetString("local-path")
contextName, _ := cmd.Flags().GetString("context")
user, _ := cmd.Flags().GetString("user")
tlsSan, _ := cmd.Flags().GetString("tls-san")
tlsSanStr := ""
if len(tlsSan) > 0 {
tlsSanStr = fmt.Sprintf(` \
--tls-san %s`, tlsSan)
}
sshKey, _ := cmd.Flags().GetString("ssh-key")
sshKeySt := ""
if len(sshKey) > 0 {
sshKeySt = fmt.Sprintf(` \
--ssh-key %s`, sshKey)
}
mergeStr := ""
if merge {
if _, err := os.Stat(kubeconfig); err == nil {
mergeStr = " \n--merge"
}
}
bgStr := ""
if background {
bgStr = " &"
}
serversAdded := 0
var primaryServer Host
script := "#!/bin/sh\n\n"
serverExtraArgsSt := ""
if len(serverK3sExtraArgs) > 0 {
serverExtraArgsSt = fmt.Sprintf(` \
--k3s-extra-args "%s"`, serverK3sExtraArgs)
}
agentExtraArgsSt := ""
if len(agentK3sExtraArgs) > 0 {
agentExtraArgsSt = fmt.Sprintf(` \
--k3s-extra-args "%s"`, agentK3sExtraArgs)
}
for i, host := range hosts {
if serversAdded == 0 {
script += `echo "Setting up primary server 1"
`
script += fmt.Sprintf(`k3sup install --host %s \
--user %s \
--cluster \
--local-path %s \
--context %s%s%s%s%s
`,
host.IP,
user,
kubeconfig,
contextName,
tlsSanStr,
serverExtraArgsSt,
sshKeySt,
mergeStr)
script += fmt.Sprintf(`
echo "Fetching the server's node-token into memory"
export NODE_TOKEN=$(k3sup node-token --host %s --user %s%s)
`, host.IP, user, sshKeySt)
serversAdded = 1
primaryServer = host
} else if serversAdded < servers {
script += fmt.Sprintf("\necho \"Setting up additional server: %d\"\n", serversAdded+1)
script += fmt.Sprintf(`k3sup join \
--host %s \
--server-host %s \
--server \
--node-token "$NODE_TOKEN" \
--user %s%s%s%s%s
`, host.IP, primaryServer.IP, user, tlsSanStr, serverExtraArgsSt, sshKeySt, bgStr)
serversAdded++
} else {
script += fmt.Sprintf("\necho \"Setting up worker: %d\"\n", (i+1)-serversAdded)
script += fmt.Sprintf(`k3sup join \
--host %s \
--server-host %s \
--node-token "$NODE_TOKEN" \
--user %s%s%s%s
`, host.IP, primaryServer.IP, user, agentExtraArgsSt, sshKeySt, bgStr)
}
if nodeLimit > 0 && i+1 >= nodeLimit {
break
}
}
fmt.Printf("%s\n", script)
return nil
}
return command
}
type Host struct {
Hostname string `json:"hostname"`
IP string `json:"ip"`
}
================================================
FILE: cmd/pro.go
================================================
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func MakePro() *cobra.Command {
var command = &cobra.Command{
Use: "pro",
Short: "Learn about K3sup Pro",
Long: `K3sup Pro is built for professionals, teams, and homelabs:
- IaaC/GitOps workflow with plan and apply commands
- Parallel installation across many nodes
- Rolling upgrades and day-2 operations
- Uninstall, exec, and get-config across your fleet
- Pre-download K3s binaries for efficient installations across many nodes
- Integrates directly with https://slicervm.com
Learn more at https://github.com/alexellis/k3sup#k3sup-pro`,
SilenceUsage: true,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(cmd.Long)
},
}
return command
}
================================================
FILE: cmd/ready.go
================================================
package cmd
import (
"fmt"
"os"
"strings"
"time"
execute "github.com/alexellis/go-execute/v2"
"github.com/alexellis/k3sup/pkg"
"github.com/spf13/cobra"
)
func MakeReady() *cobra.Command {
var command = &cobra.Command{
Use: "ready",
Short: "Check if a cluster is ready using kubectl.",
Long: `Check if the K3s cluster is ready using kubectl to query the nodes.
` + pkg.SupportMessageShort + `
`,
Example: ` # Check from a local file, with the context "default"
k3sup ready \
--context default \
--kubeconfig ./kubeconfig
# Check a merged kubeconfig with a custom context
k3sup ready \
--context e2e \
--kubeconfig $HOME/.kube/config
`,
SilenceUsage: true,
}
command.Flags().Int("attempts", 25, "Number of attempts to check for readiness")
command.Flags().Duration("pause", time.Second*2, "Pause between checking cluster for readiness")
command.Flags().String("kubeconfig", "$HOME/.kube/config", "Path to the kubeconfig file")
command.Flags().String("context", "default", "Name of the kubeconfig context to use")
command.Flags().Bool("quiet", false, "Suppress output from each attempt")
command.RunE = func(cmd *cobra.Command, args []string) error {
attempts, _ := cmd.Flags().GetInt("attempts")
pause, _ := cmd.Flags().GetDuration("pause")
kubeconfig, _ := cmd.Flags().GetString("kubeconfig")
contextName, _ := cmd.Flags().GetString("context")
quiet, _ := cmd.Flags().GetBool("quiet")
if len(kubeconfig) == 0 {
return fmt.Errorf("kubeconfig cannot be empty")
}
if len(contextName) == 0 {
return fmt.Errorf("context cannot be empty")
}
kubeconfig = os.ExpandEnv(kubeconfig)
// Inspired by Kind: https://github.com/kubernetes-sigs/kind/blob/main/pkg/cluster/internal/create/actions/waitforready/waitforready.go
for i := 0; i < attempts; i++ {
if !quiet {
fmt.Printf("Checking for nodes to be ready: %d/%d \n", i+1, attempts)
}
task := execute.ExecTask{
Command: "kubectl",
Args: []string{
"get",
"nodes",
"--kubeconfig=" + kubeconfig,
"--context=" + contextName,
"-o=jsonpath='{.items..status.conditions[-1:].status}'",
},
StreamStdio: false,
}
res, err := task.Execute(cmd.Context())
if err != nil {
return err
}
if strings.Contains(res.Stderr, "context was not found") {
return fmt.Errorf("context %s not found in %s", contextName, kubeconfig)
}
if res.ExitCode == 0 {
parts := strings.Split(strings.TrimSpace(res.Stdout), " ")
ready := true
for _, part := range parts {
trimmed := strings.TrimSpace(part)
trimmed = strings.Trim(trimmed, "'")
// Note: The command is returning a single quoted string
if len(trimmed) > 0 && trimmed != "True" {
ready = false
break
}
}
if ready {
if !quiet {
fmt.Printf("All node(s) are ready\n")
}
break
}
}
time.Sleep(pause)
}
// Wait until the default service account is created. This was causing a failure during CI.
for i := 0; i < attempts; i++ {
if !quiet {
fmt.Printf("Looking for default service account: %d/%d \n", i+1, attempts)
}
task := execute.ExecTask{
Command: "kubectl",
Args: []string{
"get",
"serviceaccount",
"default",
"--kubeconfig=" + kubeconfig,
"--context=" + contextName,
},
StreamStdio: false,
}
res, err := task.Execute(cmd.Context())
if err != nil {
return err
}
if res.ExitCode == 0 {
if !quiet {
fmt.Printf("Default service account is ready\n")
}
break
}
time.Sleep(pause)
}
return nil
}
return command
}
================================================
FILE: cmd/update.go
================================================
package cmd
import (
"fmt"
"github.com/alexellis/k3sup/pkg"
"github.com/spf13/cobra"
)
func MakeUpdate() *cobra.Command {
var command = &cobra.Command{
Use: "update",
Short: "Print update instructions",
Long: `Print instructions for updating your version of k3sup.
` + pkg.SupportMessageShort + `
`,
Example: ` k3sup update`,
SilenceUsage: false,
}
command.Run = func(cmd *cobra.Command, args []string) {
fmt.Println(k3supUpdate)
}
return command
}
const k3supUpdate = `You can update k3sup with the following:
# Use arkade, for a quick installation:
arkade get k3sup
# Remove cached versions of tools
rm -rf $HOME/.k3sup
# For Linux/MacOS:
curl -SLfs https://get.k3sup.dev | sudo sh
# For Windows (using Git Bash)
curl -SLfs https://get.k3sup.dev | sh
# Or download from GitHub: https://github.com/alexellis/k3sup/releases
` + pkg.SupportMessageShort
================================================
FILE: cmd/version.go
================================================
package cmd
import (
"fmt"
"github.com/alexellis/k3sup/pkg"
"github.com/morikuni/aec"
"github.com/spf13/cobra"
)
var (
Version string
GitCommit string
)
func PrintK3supASCIIArt() {
k3supLogo := aec.GreenF.Apply(k3supFigletStr)
fmt.Print(k3supLogo)
}
func MakeVersion() *cobra.Command {
var command = &cobra.Command{
Use: "version",
Short: "Print the version",
Example: ` k3sup version
` + pkg.SupportMessageShort + `
`,
SilenceUsage: false,
}
command.Run = func(cmd *cobra.Command, args []string) {
PrintK3supASCIIArt()
if len(Version) == 0 {
fmt.Println("Version: dev")
} else {
fmt.Println("Version:", Version)
}
fmt.Println("Git Commit:", GitCommit)
}
return command
}
const k3supFigletStr = ` _ _____ ____ _____
| | _|___ / ___ _ _ _ __ / ___| ____|
| |/ / |_ \/ __| | | | '_ \ | | | _|
| < ___) \__ \ |_| | |_) | | |___| |___
|_|\_\____/|___/\__,_| .__/ \____|_____|
|_|
bootstrap K3s over SSH in < 60s 🚀
`
================================================
FILE: docs/assets/README.md
================================================
The assets in this directory are not licensed under the MIT license. Please contact support@openfaas.com if you would like to use them.
================================================
FILE: get.sh
================================================
#!/bin/bash
# Copyright OpenFaaS Author(s) 2019
#########################
# Repo specific content #
#########################
export VERIFY_CHECKSUM=0
export ALIAS=""
export OWNER=alexellis
export REPO=k3sup
export BINLOCATION="/usr/local/bin"
export SUCCESS_CMD="$BINLOCATION/$REPO version"
GET_PRO=false
if [ "$PRO" = "true" ]; then
GET_PRO=true
fi
if [ "$PRO" = "1" ]; then
GET_PRO=true
fi
if [ "$GET_PRO" = "true" ]; then
echo "PRO=true"
echo ""
echo "Plan: download K3sup CE then upgrade to K3sup Pro"
echo ""
fi
###############################
# Content common across repos #
###############################
version=$(curl -sI https://github.com/$OWNER/$REPO/releases/latest | grep -i "location:" | awk -F"/" '{ printf "%s", $NF }' | tr -d '\r')
if [ ! $version ]; then
echo "Failed while attempting to install $REPO. Please manually install:"
echo ""
echo "1. Open your web browser and go to https://github.com/$OWNER/$REPO/releases"
echo "2. Download the latest release for your platform. Call it '$REPO'."
echo "3. chmod +x ./$REPO"
echo "4. mv ./$REPO $BINLOCATION"
if [ -n "$ALIAS_NAME" ]; then
echo "5. ln -sf $BINLOCATION/$REPO $BINLOCATION/$ALIAS_NAME"
fi
exit 1
fi
hasCli() {
hasCurl=$(which curl)
if [ "$?" = "1" ]; then
echo "You need curl to use this script."
exit 1
fi
}
checkHash(){
sha_cmd="sha256sum"
if [ ! -x "$(command -v $sha_cmd)" ]; then
sha_cmd="shasum -a 256"
fi
if [ -x "$(command -v $sha_cmd)" ]; then
targetFileDir=${targetFile%/*}
(cd $targetFileDir && curl -sSL $url.sha256|$sha_cmd -c >/dev/null)
if [ "$?" != "0" ]; then
rm $targetFile
echo "Binary checksum didn't match. Exiting"
exit 1
fi
fi
}
getPackage() {
uname=$(uname)
userid=$(id -u)
suffix=""
case $uname in
"Darwin")
arch=$(uname -m)
echo $arch
case $arch in
"x86_64")
suffix="-darwin"
;;
esac
case $arch in
"arm64")
suffix="-darwin-arm64"
;;
esac
;;
"MINGW"*)
suffix=".exe"
BINLOCATION="$HOME/bin"
mkdir -p $BINLOCATION
;;
"Linux")
arch=$(uname -m)
echo $arch
case $arch in
"aarch64")
suffix="-arm64"
;;
esac
case $arch in
"armv6l" | "armv7l")
suffix="-armhf"
;;
esac
;;
esac
targetFile="/tmp/$REPO$suffix"
if [ "$userid" != "0" ]; then
targetFile="$(pwd)/$REPO$suffix"
fi
if [ -e "$targetFile" ]; then
rm "$targetFile"
fi
url=https://github.com/$OWNER/$REPO/releases/download/$version/$REPO$suffix
echo "Downloading package $url as $targetFile"
curl -sSL $url --output "$targetFile"
if [ "$?" = "0" ]; then
if [ "$VERIFY_CHECKSUM" = "1" ]; then
checkHash
fi
chmod +x "$targetFile"
echo "Download complete."
if [ ! -w "$BINLOCATION" ]; then
echo
echo "============================================================"
echo " The script was run as a user who is unable to write"
echo " to $BINLOCATION. To complete the installation the"
echo " following commands may need to be run manually."
echo "============================================================"
echo
echo " sudo cp $REPO$suffix $BINLOCATION/$REPO"
if [ -n "$ALIAS_NAME" ]; then
echo " sudo ln -sf $BINLOCATION/$REPO $BINLOCATION/$ALIAS_NAME"
fi
echo
else
echo
echo "Running with sufficient permissions to attempt to move $REPO to $BINLOCATION"
if [ ! -w "$BINLOCATION/$REPO" ] && [ -f "$BINLOCATION/$REPO" ]; then
echo
echo "================================================================"
echo " $BINLOCATION/$REPO already exists and is not writeable"
echo " by the current user. Please adjust the binary ownership"
echo " or run sh/bash with sudo."
echo "================================================================"
echo
exit 1
fi
mv $targetFile $BINLOCATION/$REPO
if [ "$?" = "0" ]; then
echo "New version of $REPO installed to $BINLOCATION"
fi
if [ -e "$targetFile" ]; then
rm "$targetFile"
fi
if [ -n "$ALIAS_NAME" ]; then
if [ ! -L $BINLOCATION/$ALIAS_NAME ]; then
ln -s $BINLOCATION/$REPO $BINLOCATION/$ALIAS_NAME
echo "Creating alias '$ALIAS_NAME' for '$REPO'."
fi
fi
${SUCCESS_CMD}
fi
fi
}
thanks() {
echo
echo "================================================================"
echo " Tip: Create clusters on Mac, Linux + WSL2 with K3sup"
echo ""
echo " https://slicervm.com"
echo "================================================================"
echo
}
hasCli
getPackage
if [ "$GET_PRO" = "false" ]; then
thanks
else
echo "Upgrading to K3sup Pro"
$BINLOCATION/$REPO get pro
fi
================================================
FILE: go.mod
================================================
module github.com/alexellis/k3sup
go 1.25.6
require (
github.com/alexellis/arkade v0.0.0-20260304131458-e29d4142a4d5
github.com/alexellis/go-execute/v2 v2.2.1
github.com/google/go-containerregistry v0.21.2
github.com/mitchellh/go-homedir v1.1.0
github.com/morikuni/aec v1.1.0
github.com/spf13/cobra v1.10.2
golang.org/x/crypto v0.48.0
golang.org/x/term v0.40.0
)
require (
github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect
github.com/docker/cli v29.2.1+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.5 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.18.4 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/vbatts/tar-split v0.12.2 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.41.0 // indirect
)
================================================
FILE: go.sum
================================================
github.com/alexellis/arkade v0.0.0-20250818095951-5f1a8a0d86df h1:2G+jZF9Wn1o8abf70sIKWWeOvhEoBDgzJ0bxWtECHno=
github.com/alexellis/arkade v0.0.0-20250818095951-5f1a8a0d86df/go.mod h1:dDqIrbXxrj6BDvQIehG14v1ZqBZQJ5PIVffa+pYXM8M=
github.com/alexellis/arkade v0.0.0-20260304131458-e29d4142a4d5 h1:cY1I3s7+xf6uy5Zrw5QHNuJ5pse1uszX76exlchoSQI=
github.com/alexellis/arkade v0.0.0-20260304131458-e29d4142a4d5/go.mod h1:LyWSdkHrM/UJADQTNy8h2IEIi6GN8ouhUL/XDuzcRI0=
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/containerd/stargz-snapshotter/estargz v0.17.0 h1:+TyQIsR/zSFI1Rm31EQBwpAA1ovYgIKHy7kctL3sLcE=
github.com/containerd/stargz-snapshotter/estargz v0.17.0/go.mod h1:s06tWAiJcXQo9/8AReBCIo/QxcXFZ2n4qfsRnpl71SM=
github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw=
github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/docker/cli v28.3.3+incompatible h1:fp9ZHAr1WWPGdIWBM1b3zLtgCF+83gRdVMTJsUeiyAo=
github.com/docker/cli v28.3.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v29.2.1+incompatible h1:n3Jt0QVCN65eiVBoUTZQM9mcQICCJt3akW4pKAbKdJg=
github.com/docker/cli v29.2.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
github.com/docker/docker-credential-helpers v0.9.5 h1:EFNN8DHvaiK8zVqFA2DT6BjXE0GzfLOZ38ggPTKePkY=
github.com/docker/docker-credential-helpers v0.9.5/go.mod h1:v1S+hepowrQXITkEfw6o4+BMbGot02wiKpzWhGUZK6c=
github.com/google/go-containerregistry v0.20.6 h1:cvWX87UxxLgaH76b4hIvya6Dzz9qHB31qAwjAohdSTU=
github.com/google/go-containerregistry v0.20.6/go.mod h1:T0x8MuoAoKX/873bkeSfLD2FAkwCDf9/HZgsFJ02E2Y=
github.com/google/go-containerregistry v0.21.2 h1:vYaMU4nU55JJGFC9JR/s8NZcTjbE9DBBbvusTW9NeS0=
github.com/google/go-containerregistry v0.21.2/go.mod h1:ctO5aCaewH4AK1AumSF5DPW+0+R+d2FmylMJdp5G7p0=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/morikuni/aec v1.1.0 h1:vBBl0pUnvi/Je71dsRrhMBtreIqNMYErSAbEeb8jrXQ=
github.com/morikuni/aec v1.1.0/go.mod h1:xDRgiq/iw5l+zkao76YTKzKttOp2cwPEne25HDkJnBw=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4=
github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=
golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: hack/hashgen.sh
================================================
#!/bin/sh
for f in bin/k3sup*; do shasum -a 256 $f > $f.sha256; done
================================================
FILE: hack/platform-tag.sh
================================================
#!/bin/sh
getPackage() {
suffix=""
arch=$(uname -m)
case $arch in
"aarch64")
suffix="-arm64"
;;
esac
case $arch in
"armv6l" | "armv7l")
suffix="-armhf"
;;
esac
}
getPackage
echo ${suffix}
================================================
FILE: main.go
================================================
package main
import (
"os"
"github.com/alexellis/k3sup/cmd"
"github.com/alexellis/k3sup/pkg"
"github.com/spf13/cobra"
)
func main() {
cmdInstall := cmd.MakeInstall()
cmdVersion := cmd.MakeVersion()
cmdJoin := cmd.MakeJoin()
cmdUpdate := cmd.MakeUpdate()
cmdReady := cmd.MakeReady()
cmdPlan := cmd.MakePlan()
cmdNodeToken := cmd.MakeNodeToken()
cmdGetConfig := cmd.MakeGetConfig()
cmdGet := cmd.MakeGet()
cmdGetPro := cmd.MakeGetPro()
cmdPro := cmd.MakePro()
printk3supASCIIArt := cmd.PrintK3supASCIIArt
var rootCmd = &cobra.Command{
Use: "k3sup",
Run: func(cmd *cobra.Command, args []string) {
printk3supASCIIArt()
cmd.Help()
},
Long: pkg.SupportMessageShort,
}
rootCmd.AddCommand(cmdInstall)
rootCmd.AddCommand(cmdVersion)
rootCmd.AddCommand(cmdJoin)
rootCmd.AddCommand(cmdUpdate)
rootCmd.AddCommand(cmdReady)
rootCmd.AddCommand(cmdPlan)
rootCmd.AddCommand(cmdNodeToken)
rootCmd.AddCommand(cmdGetConfig)
cmdGet.AddCommand(cmdGetPro)
rootCmd.AddCommand(cmdGet)
rootCmd.AddCommand(cmdPro)
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}
================================================
FILE: pkg/operator/exec_operator.go
================================================
package ssh
import (
"context"
goexecute "github.com/alexellis/go-execute/v2"
)
// ExecOperator executes commands on the local machine directly
type ExecOperator struct {
}
func (ex ExecOperator) ExecuteStdio(command string, stream bool) (CommandRes, error) {
task := goexecute.ExecTask{
Command: command,
Shell: true,
StreamStdio: stream,
}
res, err := task.Execute(context.Background())
if err != nil {
return CommandRes{}, err
}
return CommandRes{
StdErr: []byte(res.Stderr),
StdOut: []byte(res.Stdout),
ExitCode: res.ExitCode,
}, nil
}
func (ex ExecOperator) Execute(command string) (CommandRes, error) {
return ex.ExecuteStdio(command, true)
}
================================================
FILE: pkg/operator/operator.go
================================================
package ssh
// CommandOperator executes a command on a machine to install k3sup
type CommandOperator interface {
Execute(command string) (CommandRes, error)
ExecuteStdio(command string, stream bool) (CommandRes, error)
}
// CommandRes contains the STDIO output from running a command
type CommandRes struct {
StdOut []byte
StdErr []byte
ExitCode int
}
================================================
FILE: pkg/operator/ssh_operator.go
================================================
package ssh
import (
"bytes"
"io"
"os"
"sync"
"golang.org/x/crypto/ssh"
)
// SSHOperator executes commands on a remote machine over an SSH session
type SSHOperator struct {
conn *ssh.Client
}
func NewSSHOperator(address string, config *ssh.ClientConfig) (*SSHOperator, error) {
conn, err := ssh.Dial("tcp", address, config)
if err != nil {
return nil, err
}
operator := SSHOperator{
conn: conn,
}
return &operator, nil
}
func (s SSHOperator) ExecuteStdio(command string, stream bool) (CommandRes, error) {
sess, err := s.conn.NewSession()
if err != nil {
return CommandRes{}, err
}
defer sess.Close()
sessStdOut, err := sess.StdoutPipe()
if err != nil {
return CommandRes{}, err
}
output := bytes.Buffer{}
wg := sync.WaitGroup{}
var stdOutWriter io.Writer
if stream {
stdOutWriter = io.MultiWriter(os.Stdout, &output)
} else {
stdOutWriter = &output
}
wg.Add(1)
go func() {
io.Copy(stdOutWriter, sessStdOut)
wg.Done()
}()
sessStderr, err := sess.StderrPipe()
if err != nil {
return CommandRes{}, err
}
errorOutput := bytes.Buffer{}
var stdErrWriter io.Writer
if stream {
stdErrWriter = io.MultiWriter(os.Stderr, &errorOutput)
} else {
stdErrWriter = &errorOutput
}
wg.Add(1)
go func() {
io.Copy(stdErrWriter, sessStderr)
wg.Done()
}()
err = sess.Run(command)
if err != nil {
return CommandRes{}, err
}
wg.Wait()
return CommandRes{
StdErr: errorOutput.Bytes(),
StdOut: output.Bytes(),
}, nil
}
func (s SSHOperator) Execute(command string) (CommandRes, error) {
return s.ExecuteStdio(command, true)
}
func (s SSHOperator) Close() error {
return s.conn.Close()
}
================================================
FILE: pkg/thanks.go
================================================
package pkg
// SupportMessageShort is a tip shown to users after commands.
const SupportMessageShort = `Tip: Create clusters on Mac, Linux + WSL2 with K3sup and https://slicervm.com`
================================================
FILE: vendor/github.com/alexellis/arkade/LICENSE
================================================
MIT License
Copyright (c) 2019 Alex Ellis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: vendor/github.com/alexellis/arkade/pkg/archive/untar.go
================================================
package archive
import (
"archive/tar"
gzipc "compress/gzip"
"fmt"
"io"
"log"
"os"
"path"
"path/filepath"
"strings"
"time"
)
// Untar reads the (gzip-compressed) tar file from r and writes it into dir.
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// AE: Edited on 2019-10-11 to remove support for nested folders when un-taring
// so that all files are placed in the same target directory
func Untar(r io.Reader, dir string, gzip bool, quiet bool) error {
return untar(r, dir, gzip, quiet)
}
func untar(r io.Reader, dir string, gzip bool, quiet bool) (err error) {
t0 := time.Now()
nFiles := 0
madeDir := map[string]bool{}
defer func() {
td := time.Since(t0)
if err == nil {
if !quiet {
log.Printf("extracted tarball into %s: %d files, %d dirs (%v)", dir, nFiles, len(madeDir), td)
}
} else {
log.Printf("error extracting tarball into %s after %d files, %d dirs, %v: %v", dir, nFiles, len(madeDir), td, err)
}
}()
if gzip {
r, err = gzipc.NewReader(r)
if err != nil {
return fmt.Errorf("requires gzip-compressed body: %v", err)
}
}
tr := tar.NewReader(r)
loggedChtimesError := false
for {
f, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
log.Printf("tar reading error: %v", err)
return fmt.Errorf("tar error: %v", err)
}
if !validRelPath(f.Name) {
return fmt.Errorf("tar contained invalid name error %q", f.Name)
}
baseFile := filepath.Base(f.Name)
abs := path.Join(dir, baseFile)
if !quiet {
fmt.Printf("Extracting: %s to\t%s\n", f.Name, abs)
}
fi := f.FileInfo()
mode := fi.Mode()
switch {
case mode.IsDir():
break
case mode.IsRegular():
wf, err := os.OpenFile(abs, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode.Perm())
if err != nil {
return err
}
n, err := io.Copy(wf, tr)
if closeErr := wf.Close(); closeErr != nil && err == nil {
err = closeErr
}
if err != nil {
return fmt.Errorf("error writing to %s: %v", abs, err)
}
if n != f.Size {
return fmt.Errorf("only wrote %d bytes to %s; expected %d", n, abs, f.Size)
}
modTime := f.ModTime
if modTime.After(t0) {
// Clamp modtimes at system time. See
// golang.org/issue/19062 when clock on
// buildlet was behind the gitmirror server
// doing the git-archive.
modTime = t0
}
if !modTime.IsZero() {
if err := os.Chtimes(abs, modTime, modTime); err != nil && !loggedChtimesError {
// benign error. Gerrit doesn't even set the
// modtime in these, and we don't end up relying
// on it anywhere (the gomote push command relies
// on digests only), so this is a little pointless
// for now.
log.Printf("error changing modtime: %v (further Chtimes errors suppressed)", err)
loggedChtimesError = true // once is enough
}
}
nFiles++
default:
}
}
return nil
}
func validRelPath(p string) bool {
if p == "" || strings.Contains(p, `\`) || strings.HasPrefix(p, "/") || strings.Contains(p, "../") {
return false
}
return true
}
================================================
FILE: vendor/github.com/alexellis/arkade/pkg/archive/untar_nested.go
================================================
package archive
import (
"archive/tar"
"compress/gzip"
"fmt"
"io"
"log"
"os"
"path/filepath"
"time"
)
// UntarNested reads the gzip-compressed tar file from r and writes it into dir.
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
func UntarNested(r io.Reader, dir string, gzipped, quiet bool) error {
return untarNested(r, dir, gzipped, quiet)
}
func untarNested(r io.Reader, dir string, gzipped, quiet bool) (err error) {
t0 := time.Now()
nFiles := 0
madeDir := map[string]bool{}
defer func() {
td := time.Since(t0)
if err == nil {
if !quiet {
log.Printf("extracted tarball into %s: %d files, %d dirs (%v)", dir, nFiles, len(madeDir), td)
}
} else {
log.Printf("error extracting tarball into %s after %d files, %d dirs, %v: %v", dir, nFiles, len(madeDir), td, err)
}
}()
reader := r
if gzipped {
zr, err := gzip.NewReader(r)
if err != nil {
return fmt.Errorf("requires gzip-compressed body: %v", err)
}
reader = zr
}
tr := tar.NewReader(reader)
loggedChtimesError := false
for {
f, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
log.Printf("tar reading error: %v", err)
return fmt.Errorf("tar error: %v", err)
}
if !validRelPath(f.Name) {
return fmt.Errorf("tar contained invalid name error %q", f.Name)
}
rel := filepath.FromSlash(f.Name)
abs := filepath.Join(dir, rel)
fi := f.FileInfo()
mode := fi.Mode()
if !quiet {
fmt.Printf("Extracting: %s\n", abs)
}
switch {
case mode.IsRegular():
// Make the directory. This is redundant because it should
// already be made by a directory entry in the tar
// beforehand. Thus, don't check for errors; the next
// write will fail with the same error.
dir := filepath.Dir(abs)
if !madeDir[dir] {
if err := os.MkdirAll(filepath.Dir(abs), 0755); err != nil {
return err
}
madeDir[dir] = true
}
wf, err := os.OpenFile(abs, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode.Perm())
if err != nil {
return err
}
n, err := io.Copy(wf, tr)
if closeErr := wf.Close(); closeErr != nil && err == nil {
err = closeErr
}
if err != nil {
return fmt.Errorf("error writing to %s: %v", abs, err)
}
if n != f.Size {
return fmt.Errorf("only wrote %d bytes to %s; expected %d", n, abs, f.Size)
}
modTime := f.ModTime
if modTime.After(t0) {
// Clamp modtimes at system time. See
// golang.org/issue/19062 when clock on
// buildlet was behind the gitmirror server
// doing the git-archive.
modTime = t0
}
if !modTime.IsZero() {
if err := os.Chtimes(abs, modTime, modTime); err != nil && !loggedChtimesError {
// benign error. Gerrit doesn't even set the
// modtime in these, and we don't end up relying
// on it anywhere (the gomote push command relies
// on digests only), so this is a little pointless
// for now.
log.Printf("error changing modtime: %v (further Chtimes errors suppressed)", err)
loggedChtimesError = true // once is enough
}
}
nFiles++
case mode.IsDir():
if err := os.MkdirAll(abs, 0755); err != nil {
return err
}
madeDir[abs] = true
// Introduced via
// https://github.com/alexellis/arkade/pull/675/files
case os.ModeSymlink != 0:
if err := os.Symlink(f.Linkname, abs); err != nil {
return err
}
default:
return fmt.Errorf("tar file entry %s contained unsupported file type %v", f.Name, mode)
}
}
return nil
}
================================================
FILE: vendor/github.com/alexellis/arkade/pkg/archive/unzip.go
================================================
// Copyright (c) arkade author(s) 2022. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package archive
import (
"archive/zip"
"fmt"
"io"
"log"
"os"
"path"
"path/filepath"
"time"
)
// Unzip reads the compressed zip file from reader and writes it into dir.
// Unzip works similar to Untar where support for nested folders is removed
// so that all files are placed in the same target directory
func Unzip(reader io.ReaderAt, size int64, dir string, quiet bool) error {
zipReader, err := zip.NewReader(reader, size)
if err != nil {
return fmt.Errorf("error creating zip reader: %s", err)
}
return unzip(*zipReader, dir, quiet)
}
func unzip(r zip.Reader, dir string, quiet bool) (err error) {
if err != nil {
return err
}
t0 := time.Now()
nFiles := 0
madeDir := map[string]bool{}
defer func() {
td := time.Since(t0)
if err == nil {
if !quiet {
log.Printf("extracted zip into %s: %d files, %d dirs (%v)", dir, nFiles, len(madeDir), td)
}
} else {
log.Printf("error extracting zip into %s after %d files, %d dirs, %v: %v", dir, nFiles, len(madeDir), td, err)
}
}()
// Closure to address file descriptors issue with all the deferred .Close() methods
extractAndWriteFile := func(f *zip.File) error {
rc, err := f.Open()
if err != nil {
return err
}
defer func() {
if err := rc.Close(); err != nil {
panic(err)
}
}()
baseFile := filepath.Base(f.Name)
abs := path.Join(dir, baseFile)
if !quiet {
fmt.Printf("Extracting: %s\n", abs)
}
fi := f.FileInfo()
mode := fi.Mode()
switch {
case mode.IsDir():
break
case mode.IsRegular():
f, err := os.OpenFile(abs, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, f.Mode())
if err != nil {
return err
}
defer func() {
if err := f.Close(); err != nil {
panic(err)
}
}()
_, err = io.Copy(f, rc)
if err != nil {
return err
}
default:
}
nFiles++
return nil
}
for _, f := range r.File {
err := extractAndWriteFile(f)
if err != nil {
return err
}
}
return nil
}
================================================
FILE: vendor/github.com/alexellis/arkade/pkg/env/env.go
================================================
// Copyright (c) arkade author(s) 2022. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package env
import (
"context"
"log"
"os"
"path"
"runtime"
"strings"
execute "github.com/alexellis/go-execute/v2"
)
// GetClientArch returns the architecture and OS of the client machine
// on Windows, that's a direct passthrough from runtime.GOARCH and runtime.GOOS
// On Linux and Darwin, it uses `uname -m` and `uname -s` to get more specific values
func GetClientArch() (arch string, os string) {
if runtime.GOOS == "windows" {
return runtime.GOARCH, runtime.GOOS
}
return getClientArchFromUname()
}
func getClientArchFromUname() (arch string, os string) {
task := execute.ExecTask{
Command: "uname",
Args: []string{"-m"},
StreamStdio: false}
res, err := task.Execute(context.Background())
if err != nil {
log.Println(err)
}
archResult := strings.TrimSpace(res.Stdout)
taskOS := execute.ExecTask{Command: "uname",
Args: []string{"-s"},
StreamStdio: false}
resOS, errOS := taskOS.Execute(context.Background())
if errOS != nil {
log.Println(errOS)
}
osResult := strings.TrimSpace(resOS.Stdout)
return archResult, osResult
}
func LocalBinary(name, subdir string) string {
home := os.Getenv("HOME")
val := path.Join(home, ".arkade/bin/")
if len(subdir) > 0 {
val = path.Join(val, subdir)
}
return path.Join(val, name)
}
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/.DEREK.yml
================================================
redirect: https://raw.githubusercontent.com/openfaas/faas/master/.DEREK.yml
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/.gitignore
================================================
/go-execute
main.go
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/LICENSE
================================================
MIT License
Copyright (c) 2023 Alex Ellis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/Makefile
================================================
all:
go test -v ./...
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/README.md
================================================
## go-execute
A wrapper for Go's command execution packages.
`go get github.com/alexellis/go-execute/v2`
## Docs
See docs at pkg.go.dev: [github.com/alexellis/go-execute](https://pkg.go.dev/github.com/alexellis/go-execute)
## go-execute users
[Used by dozens of projects as identified by GitHub](https://github.com/alexellis/go-execute/network/dependents), notably:
* [alexellis/arkade](https://github.com/alexellis/arkade)
* [openfaas/faas-cli](https://github.com/openfaas/faas-cli)
* [inlets/inletsctl](https://github.com/inlets/inletsctl)
* [inlets/cloud-provision](https://github.com/inlets/cloud-provision)
* [alexellis/k3sup](https://github.com/alexellis/k3sup)
* [openfaas/connector-sdk](https://github.com/openfaas/connector-sdk)
* [openfaas-incubator/ofc-bootstrap](https://github.com/openfaas-incubator/ofc-bootstrap)
Community examples:
* [dokku/lambda-builder](https://github.com/dokku/lambda-builder)
* [027xiguapi/pear-rec](https://github.com/027xiguapi/pear-rec)
* [cnrancher/autok3s](https://github.com/cnrancher/autok3s)
* [ainsleydev/hupi](https://github.com/ainsleydev/hupi)
* [andiwork/andictl](https://github.com/andiwork/andictl)
* [tonit/rekind](https://github.com/tonit/rekind)
* [lucasrod16/ec2-k3s](https://github.com/lucasrod16/ec2-k3s)
* [seaweedfs/seaweed-up](https://github.com/seaweedfs/seaweed-up)
* [jsiebens/inlets-on-fly](https://github.com/jsiebens/inlets-on-fly)
* [jsiebens/hashi-up](https://github.com/jsiebens/hashi-up)
* [edgego/ecm](https://github.com/edgego/ecm)
* [ministryofjustice/cloud-platform-terraform-upgrade](https://github.com/ministryofjustice/cloud-platform-terraform-upgrade)
* [mattcanty/go-ffmpeg-transcode](https://github.com/mattcanty/go-ffmpeg-transcode)
* [Popoola-Opeyemi/meeseeks](https://github.com/Popoola-Opeyemi/meeseeks)
* [aidun/minicloud](https://github.com/aidun/minicloud)
Feel free to add a link to your own projects in a PR.
## Main options
* `DisableStdioBuffer` - Discard Stdio, rather than buffering into memory
* `StreamStdio` - Stream stderr and stdout to the console, useful for debugging and testing
* `Shell` - Use bash as a shell to execute the command, rather than exec a binary directly
* `StdOutWriter` - an additional writer for stdout, useful for mutating or filtering the output
* `StdErrWriter` - an additional writer for stderr, useful for mutating or filtering the output
* `PrintCommand` - print the command to stdout before executing it
## Example of exec without streaming to STDIO
This example captures the values from stdout and stderr without relaying to the console. This means the values can be inspected and used for automation.
```golang
package main
import (
"fmt"
execute "github.com/alexellis/go-execute/v2"
"context"
)
func main() {
cmd := execute.ExecTask{
Command: "docker",
Args: []string{"version"},
StreamStdio: false,
}
res, err := cmd.Execute(context.Background())
if err != nil {
panic(err)
}
if res.ExitCode != 0 {
panic("Non-zero exit code: " + res.Stderr)
}
fmt.Printf("stdout: %s, stderr: %s, exit-code: %d\n", res.Stdout, res.Stderr, res.ExitCode)
}
```
## Example with "shell" and exit-code 0
```golang
package main
import (
"fmt"
execute "github.com/alexellis/go-execute/v2"
"context"
)
func main() {
ls := execute.ExecTask{
Command: "ls",
Args: []string{"-l"},
Shell: true,
}
res, err := ls.Execute(context.Background())
if err != nil {
panic(err)
}
fmt.Printf("stdout: %q, stderr: %q, exit-code: %d\n", res.Stdout, res.Stderr, res.ExitCode)
}
```
## Example with "shell" and exit-code 1
```golang
package main
import (
"fmt"
"context"
execute "github.com/alexellis/go-execute/v2"
)
func main() {
ls := execute.ExecTask{
Command: "exit 1",
Shell: true,
}
res, err := ls.Execute(context.Background())
if err != nil {
panic(err)
}
fmt.Printf("stdout: %q, stderr: %q, exit-code: %d\n", res.Stdout, res.Stderr, res.ExitCode)
}
```
## Contributing
Commits must be signed off with `git commit -s`
License: MIT
================================================
FILE: vendor/github.com/alexellis/go-execute/v2/exec.go
================================================
package execute
import (
"bytes"
"context"
"fmt"
"io"
"os"
"os/exec"
"strings"
)
type ExecTask struct {
// Command is the command to execute. This can be the path to an executable
// or the executable with arguments. The arguments are detected by looking for
// a space.
//
// Any arguments must be given via Args
Command string
// Args are the arguments to pass to the command. These are ignored if the
// Command contains arguments.
Args []string
// Shell run the command in a bash shell.
// Note that the system must have `bash` installed in the PATH or in /bin/bash
Shell bool
// Env is a list of environment variables to add to the current environment,
// these are used to override any existing environment variables.
Env []string
// Cwd is the working directory for the command
Cwd string
// Stdin connect a reader to stdin for the command
// being executed.
Stdin io.Reader
// PrintCommand prints the command before executing
PrintCommand bool
// StreamStdio prints stdout and stderr directly to os.Stdout/err as
// the command runs.
StreamStdio bool
// DisableStdioBuffer prevents any output from being saved in the
// TaskResult, which is useful for when the result is very large, or
// when you want to stream the output to another writer exclusively.
DisableStdioBuffer bool
// StdoutWriter when set will receive a copy of stdout from the command
StdOutWriter io.Writer
// StderrWriter when set will receive a copy of stderr from the command
StdErrWriter io.Writer
}
type ExecResult struct {
Stdout string
Stderr string
ExitCode int
Cancelled bool
}
func (et ExecTask) Execute(ctx context.Context) (ExecResult, error) {
argsSt := ""
if len(et.Args) > 0 {
argsSt = strings.Join(et.Args, " ")
}
if et.PrintCommand {
fmt.Println("exec: ", et.Command, argsSt)
}
// don't try to run if the context is already cancelled
if ctx.Err() != nil {
return ExecResult{
// the exec package returns -1 for cancelled commands
ExitCode: -1,
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}
var command string
var commandArgs []string
if et.Shell {
// On a NixOS system, /bin/bash doesn't exist at /bin/bash
// the default behavior of exec.Command is to look for the
// executable in PATH.
command = "bash"
// There is a chance that PATH is not populate or propagated, therefore
// when bash cannot be resolved, set it to /bin/bash instead.
if _, err := exec.LookPath(command); err != nil {
command = "/bin/bash"
}
if len(et.Args) == 0 {
// use Split and Join to remove any extra whitespace?
startArgs := strings.Split(et.Command, " ")
script := strings.Join(startArgs, " ")
commandArgs = append([]string{"-c"}, script)
} else {
script := strings.Join(et.Args, " ")
commandArgs = append([]string{"-c"}, fmt.Sprintf("%s %s", et.Command, script))
}
} else {
command = et.Command
commandArgs = et.Args
// AE: This had to be removed to fix: #117 where Windows users
// have spaces in their paths, which are misinterpreted as
// arguments for the command.
// if strings.Contains(et.Command, " ") {
// parts := strings.Split(et.Command, " ")
// command = parts[0]
// commandArgs = parts[1:]
// }
}
cmd := exec.CommandContext(ctx, command, commandArgs...)
cmd.Dir = et.Cwd
if len(et.Env) > 0 {
overrides := map[string]bool{}
for _, env := range et.Env {
key := strings.Split(env, "=")[0]
overrides[key] = true
cmd.Env = append(cmd.Env, env)
}
for _, env := range os.Environ() {
key := strings.Split(env, "=")[0]
if _, ok := overrides[key]; !ok {
cmd.Env = append(cmd.Env, env)
}
}
}
if et.Stdin != nil {
cmd.Stdin = et.Stdin
}
stdoutBuff := bytes.Buffer{}
stderrBuff := bytes.Buffer{}
var stdoutWriters []io.Writer
var stderrWriters []io.Writer
if !et.DisableStdioBuffer {
stdoutWriters = append(stdoutWriters, &stdoutBuff)
stderrWriters = append(stderrWriters, &stderrBuff)
}
if et.StreamStdio {
stdoutWriters = append(stdoutWriters, os.Stdout)
stderrWriters = append(stderrWriters, os.Stderr)
}
if et.StdOutWriter != nil {
stdoutWriters = append(stdoutWriters, et.StdOutWriter)
}
if et.StdErrWriter != nil {
stderrWriters = append(stderrWriters, et.StdErrWriter)
}
cmd.Stdout = io.MultiWriter(stdoutWriters...)
cmd.Stderr = io.MultiWriter(stderrWriters...)
startErr := cmd.Start()
if startErr != nil {
return ExecResult{}, startErr
}
exitCode := 0
execErr := cmd.Wait()
if execErr != nil {
if exitError, ok := execErr.(*exec.ExitError); ok {
exitCode = exitError.ExitCode()
}
}
return ExecResult{
Stdout: stdoutBuff.String(),
Stderr: stderrBuff.String(),
ExitCode: exitCode,
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}
================================================
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
================================================
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/build.go
================================================
/*
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.
*/
/*
Copyright 2019 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/
package estargz
import (
"archive/tar"
"bytes"
"compress/gzip"
"context"
"errors"
"fmt"
"io"
"os"
"path"
"runtime"
"strings"
"sync"
"sync/atomic"
"github.com/containerd/stargz-snapshotter/estargz/errorutil"
"github.com/klauspost/compress/zstd"
digest "github.com/opencontainers/go-digest"
"golang.org/x/sync/errgroup"
)
type GzipHelperFunc func(io.Reader) (io.ReadCloser, error)
type options struct {
chunkSize int
compressionLevel int
prioritizedFiles []string
missedPrioritizedFiles *[]string
compression Compression
ctx context.Context
minChunkSize int
gzipHelperFunc GzipHelperFunc
}
type Option func(o *options) error
// WithChunkSize option specifies the chunk size of eStargz blob to build.
func WithChunkSize(chunkSize int) Option {
return func(o *options) error {
o.chunkSize = chunkSize
return nil
}
}
// WithCompressionLevel option specifies the gzip compression level.
// The default is gzip.BestCompression.
// This option will be ignored if WithCompression option is used.
// See also: https://godoc.org/compress/gzip#pkg-constants
func WithCompressionLevel(level int) Option {
return func(o *options) error {
o.compressionLevel = level
return nil
}
}
// WithPrioritizedFiles option specifies the list of prioritized files.
// These files must be complete paths that are absolute or relative to "/"
// For example, all of "foo/bar", "/foo/bar", "./foo/bar" and "../foo/bar"
// are treated as "/foo/bar".
func WithPrioritizedFiles(files []string) Option {
return func(o *options) error {
o.prioritizedFiles = files
return nil
}
}
// WithAllowPrioritizeNotFound makes Build continue the execution even if some
// of prioritized files specified by WithPrioritizedFiles option aren't found
// in the input tar. Instead, this records all missed file names to the passed
// slice.
func WithAllowPrioritizeNotFound(missedFiles *[]string) Option {
return func(
gitextract_pskgmy49/
├── .DEREK.yml
├── .github/
│ ├── CODEOWNERS
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── report-an-issue.md
│ │ └── request-a-feature.md
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── build.yaml
│ └── publish.yaml
├── .gitignore
├── EULA.md
├── LICENSE
├── Makefile
├── README.md
├── cmd/
│ ├── get-config.go
│ ├── get.go
│ ├── get_pro.go
│ ├── install.go
│ ├── install_test.go
│ ├── join.go
│ ├── join_test.go
│ ├── node-token.go
│ ├── plan.go
│ ├── pro.go
│ ├── ready.go
│ ├── update.go
│ └── version.go
├── docs/
│ └── assets/
│ └── README.md
├── get.sh
├── go.mod
├── go.sum
├── hack/
│ ├── hashgen.sh
│ └── platform-tag.sh
├── main.go
├── pkg/
│ ├── operator/
│ │ ├── exec_operator.go
│ │ ├── operator.go
│ │ └── ssh_operator.go
│ └── thanks.go
└── vendor/
├── github.com/
│ ├── alexellis/
│ │ ├── arkade/
│ │ │ ├── LICENSE
│ │ │ └── pkg/
│ │ │ ├── archive/
│ │ │ │ ├── untar.go
│ │ │ │ ├── untar_nested.go
│ │ │ │ └── unzip.go
│ │ │ └── env/
│ │ │ └── env.go
│ │ └── go-execute/
│ │ └── v2/
│ │ ├── .DEREK.yml
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ └── exec.go
│ ├── containerd/
│ │ └── stargz-snapshotter/
│ │ └── estargz/
│ │ ├── LICENSE
│ │ ├── build.go
│ │ ├── errorutil/
│ │ │ └── errors.go
│ │ ├── estargz.go
│ │ ├── gzip.go
│ │ ├── testutil.go
│ │ └── types.go
│ ├── docker/
│ │ ├── cli/
│ │ │ ├── AUTHORS
│ │ │ ├── LICENSE
│ │ │ ├── NOTICE
│ │ │ └── cli/
│ │ │ └── config/
│ │ │ ├── config.go
│ │ │ ├── configfile/
│ │ │ │ ├── file.go
│ │ │ │ ├── file_unix.go
│ │ │ │ └── file_windows.go
│ │ │ ├── credentials/
│ │ │ │ ├── credentials.go
│ │ │ │ ├── default_store.go
│ │ │ │ ├── default_store_darwin.go
│ │ │ │ ├── default_store_linux.go
│ │ │ │ ├── default_store_unsupported.go
│ │ │ │ ├── default_store_windows.go
│ │ │ │ ├── file_store.go
│ │ │ │ └── native_store.go
│ │ │ ├── memorystore/
│ │ │ │ └── store.go
│ │ │ └── types/
│ │ │ └── authconfig.go
│ │ ├── distribution/
│ │ │ ├── LICENSE
│ │ │ └── registry/
│ │ │ └── client/
│ │ │ └── auth/
│ │ │ └── challenge/
│ │ │ ├── addr.go
│ │ │ └── authchallenge.go
│ │ └── docker-credential-helpers/
│ │ ├── LICENSE
│ │ ├── client/
│ │ │ ├── client.go
│ │ │ └── command.go
│ │ └── credentials/
│ │ ├── credentials.go
│ │ ├── error.go
│ │ ├── helper.go
│ │ └── version.go
│ ├── google/
│ │ └── go-containerregistry/
│ │ ├── LICENSE
│ │ ├── internal/
│ │ │ ├── and/
│ │ │ │ └── and_closer.go
│ │ │ ├── compression/
│ │ │ │ └── compression.go
│ │ │ ├── estargz/
│ │ │ │ └── estargz.go
│ │ │ ├── gzip/
│ │ │ │ └── zip.go
│ │ │ ├── redact/
│ │ │ │ └── redact.go
│ │ │ ├── retry/
│ │ │ │ ├── retry.go
│ │ │ │ └── wait/
│ │ │ │ └── kubernetes_apimachinery_wait.go
│ │ │ ├── verify/
│ │ │ │ └── verify.go
│ │ │ ├── windows/
│ │ │ │ └── windows.go
│ │ │ └── zstd/
│ │ │ └── zstd.go
│ │ └── pkg/
│ │ ├── authn/
│ │ │ ├── README.md
│ │ │ ├── anon.go
│ │ │ ├── auth.go
│ │ │ ├── authn.go
│ │ │ ├── basic.go
│ │ │ ├── bearer.go
│ │ │ ├── doc.go
│ │ │ ├── keychain.go
│ │ │ └── multikeychain.go
│ │ ├── compression/
│ │ │ └── compression.go
│ │ ├── crane/
│ │ │ ├── append.go
│ │ │ ├── catalog.go
│ │ │ ├── config.go
│ │ │ ├── copy.go
│ │ │ ├── delete.go
│ │ │ ├── digest.go
│ │ │ ├── doc.go
│ │ │ ├── export.go
│ │ │ ├── filemap.go
│ │ │ ├── get.go
│ │ │ ├── list.go
│ │ │ ├── manifest.go
│ │ │ ├── options.go
│ │ │ ├── pull.go
│ │ │ ├── push.go
│ │ │ └── tag.go
│ │ ├── legacy/
│ │ │ ├── config.go
│ │ │ ├── doc.go
│ │ │ └── tarball/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ └── write.go
│ │ ├── logs/
│ │ │ └── logs.go
│ │ ├── name/
│ │ │ ├── README.md
│ │ │ ├── check.go
│ │ │ ├── digest.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── options.go
│ │ │ ├── ref.go
│ │ │ ├── registry.go
│ │ │ ├── repository.go
│ │ │ └── tag.go
│ │ └── v1/
│ │ ├── config.go
│ │ ├── doc.go
│ │ ├── empty/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ └── index.go
│ │ ├── hash.go
│ │ ├── image.go
│ │ ├── index.go
│ │ ├── layer.go
│ │ ├── layout/
│ │ │ ├── README.md
│ │ │ ├── blob.go
│ │ │ ├── doc.go
│ │ │ ├── gc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── layoutpath.go
│ │ │ ├── options.go
│ │ │ ├── read.go
│ │ │ └── write.go
│ │ ├── manifest.go
│ │ ├── match/
│ │ │ └── match.go
│ │ ├── mutate/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── mutate.go
│ │ │ └── rebase.go
│ │ ├── partial/
│ │ │ ├── README.md
│ │ │ ├── compressed.go
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── uncompressed.go
│ │ │ └── with.go
│ │ ├── platform.go
│ │ ├── progress.go
│ │ ├── remote/
│ │ │ ├── README.md
│ │ │ ├── catalog.go
│ │ │ ├── check.go
│ │ │ ├── delete.go
│ │ │ ├── descriptor.go
│ │ │ ├── doc.go
│ │ │ ├── fetcher.go
│ │ │ ├── image.go
│ │ │ ├── index.go
│ │ │ ├── layer.go
│ │ │ ├── list.go
│ │ │ ├── mount.go
│ │ │ ├── multi_write.go
│ │ │ ├── options.go
│ │ │ ├── progress.go
│ │ │ ├── puller.go
│ │ │ ├── pusher.go
│ │ │ ├── referrers.go
│ │ │ ├── schema1.go
│ │ │ ├── transport/
│ │ │ │ ├── README.md
│ │ │ │ ├── basic.go
│ │ │ │ ├── bearer.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── error.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── ping.go
│ │ │ │ ├── retry.go
│ │ │ │ ├── schemer.go
│ │ │ │ ├── scope.go
│ │ │ │ ├── transport.go
│ │ │ │ └── useragent.go
│ │ │ └── write.go
│ │ ├── stream/
│ │ │ ├── README.md
│ │ │ └── layer.go
│ │ ├── tarball/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── image.go
│ │ │ ├── layer.go
│ │ │ └── write.go
│ │ ├── types/
│ │ │ └── types.go
│ │ └── zz_deepcopy_generated.go
│ ├── inconshreveable/
│ │ └── mousetrap/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── trap_others.go
│ │ └── trap_windows.go
│ ├── klauspost/
│ │ └── compress/
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .goreleaser.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── SECURITY.md
│ │ ├── compressible.go
│ │ ├── fse/
│ │ │ ├── README.md
│ │ │ ├── bitreader.go
│ │ │ ├── bitwriter.go
│ │ │ ├── bytereader.go
│ │ │ ├── compress.go
│ │ │ ├── decompress.go
│ │ │ └── fse.go
│ │ ├── gen.sh
│ │ ├── huff0/
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── bitreader.go
│ │ │ ├── bitwriter.go
│ │ │ ├── compress.go
│ │ │ ├── decompress.go
│ │ │ ├── decompress_amd64.go
│ │ │ ├── decompress_amd64.s
│ │ │ ├── decompress_generic.go
│ │ │ └── huff0.go
│ │ ├── internal/
│ │ │ ├── cpuinfo/
│ │ │ │ ├── cpuinfo.go
│ │ │ │ ├── cpuinfo_amd64.go
│ │ │ │ └── cpuinfo_amd64.s
│ │ │ ├── le/
│ │ │ │ ├── le.go
│ │ │ │ ├── unsafe_disabled.go
│ │ │ │ └── unsafe_enabled.go
│ │ │ └── snapref/
│ │ │ ├── LICENSE
│ │ │ ├── decode.go
│ │ │ ├── decode_other.go
│ │ │ ├── encode.go
│ │ │ ├── encode_other.go
│ │ │ └── snappy.go
│ │ ├── s2sx.mod
│ │ ├── s2sx.sum
│ │ └── zstd/
│ │ ├── README.md
│ │ ├── bitreader.go
│ │ ├── bitwriter.go
│ │ ├── blockdec.go
│ │ ├── blockenc.go
│ │ ├── blocktype_string.go
│ │ ├── bytebuf.go
│ │ ├── bytereader.go
│ │ ├── decodeheader.go
│ │ ├── decoder.go
│ │ ├── decoder_options.go
│ │ ├── dict.go
│ │ ├── enc_base.go
│ │ ├── enc_best.go
│ │ ├── enc_better.go
│ │ ├── enc_dfast.go
│ │ ├── enc_fast.go
│ │ ├── encoder.go
│ │ ├── encoder_options.go
│ │ ├── framedec.go
│ │ ├── frameenc.go
│ │ ├── fse_decoder.go
│ │ ├── fse_decoder_amd64.go
│ │ ├── fse_decoder_amd64.s
│ │ ├── fse_decoder_generic.go
│ │ ├── fse_encoder.go
│ │ ├── fse_predefined.go
│ │ ├── hash.go
│ │ ├── history.go
│ │ ├── internal/
│ │ │ └── xxhash/
│ │ │ ├── README.md
│ │ │ ├── xxhash.go
│ │ │ ├── xxhash_amd64.s
│ │ │ ├── xxhash_arm64.s
│ │ │ ├── xxhash_asm.go
│ │ │ ├── xxhash_other.go
│ │ │ └── xxhash_safe.go
│ │ ├── matchlen_amd64.go
│ │ ├── matchlen_amd64.s
│ │ ├── matchlen_generic.go
│ │ ├── seqdec.go
│ │ ├── seqdec_amd64.go
│ │ ├── seqdec_amd64.s
│ │ ├── seqdec_generic.go
│ │ ├── seqenc.go
│ │ ├── simple_go124.go
│ │ ├── snappy.go
│ │ ├── zip.go
│ │ └── zstd.go
│ ├── mitchellh/
│ │ └── go-homedir/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── homedir.go
│ ├── morikuni/
│ │ └── aec/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── aec.go
│ │ ├── ansi.go
│ │ ├── builder.go
│ │ └── sgr.go
│ ├── opencontainers/
│ │ ├── go-digest/
│ │ │ ├── .mailmap
│ │ │ ├── .pullapprove.yml
│ │ │ ├── .travis.yml
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── LICENSE.docs
│ │ │ ├── MAINTAINERS
│ │ │ ├── README.md
│ │ │ ├── algorithm.go
│ │ │ ├── digest.go
│ │ │ ├── digester.go
│ │ │ ├── doc.go
│ │ │ └── verifiers.go
│ │ └── image-spec/
│ │ ├── LICENSE
│ │ └── specs-go/
│ │ ├── v1/
│ │ │ ├── annotations.go
│ │ │ ├── config.go
│ │ │ ├── descriptor.go
│ │ │ ├── index.go
│ │ │ ├── layout.go
│ │ │ ├── manifest.go
│ │ │ └── mediatype.go
│ │ ├── version.go
│ │ └── versioned.go
│ ├── spf13/
│ │ ├── cobra/
│ │ │ ├── .gitignore
│ │ │ ├── .golangci.yml
│ │ │ ├── .mailmap
│ │ │ ├── CONDUCT.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── MAINTAINERS
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── SECURITY.md
│ │ │ ├── active_help.go
│ │ │ ├── args.go
│ │ │ ├── bash_completions.go
│ │ │ ├── bash_completionsV2.go
│ │ │ ├── cobra.go
│ │ │ ├── command.go
│ │ │ ├── command_notwin.go
│ │ │ ├── command_win.go
│ │ │ ├── completions.go
│ │ │ ├── fish_completions.go
│ │ │ ├── flag_groups.go
│ │ │ ├── powershell_completions.go
│ │ │ ├── shell_completions.go
│ │ │ └── zsh_completions.go
│ │ └── pflag/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── .golangci.yaml
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bool.go
│ │ ├── bool_func.go
│ │ ├── bool_slice.go
│ │ ├── bytes.go
│ │ ├── count.go
│ │ ├── duration.go
│ │ ├── duration_slice.go
│ │ ├── errors.go
│ │ ├── flag.go
│ │ ├── float32.go
│ │ ├── float32_slice.go
│ │ ├── float64.go
│ │ ├── float64_slice.go
│ │ ├── func.go
│ │ ├── golangflag.go
│ │ ├── int.go
│ │ ├── int16.go
│ │ ├── int32.go
│ │ ├── int32_slice.go
│ │ ├── int64.go
│ │ ├── int64_slice.go
│ │ ├── int8.go
│ │ ├── int_slice.go
│ │ ├── ip.go
│ │ ├── ip_slice.go
│ │ ├── ipmask.go
│ │ ├── ipnet.go
│ │ ├── ipnet_slice.go
│ │ ├── string.go
│ │ ├── string_array.go
│ │ ├── string_slice.go
│ │ ├── string_to_int.go
│ │ ├── string_to_int64.go
│ │ ├── string_to_string.go
│ │ ├── text.go
│ │ ├── time.go
│ │ ├── uint.go
│ │ ├── uint16.go
│ │ ├── uint32.go
│ │ ├── uint64.go
│ │ ├── uint8.go
│ │ └── uint_slice.go
│ └── vbatts/
│ └── tar-split/
│ ├── LICENSE
│ └── archive/
│ └── tar/
│ ├── common.go
│ ├── format.go
│ ├── reader.go
│ ├── stat_actime1.go
│ ├── stat_actime2.go
│ ├── stat_unix.go
│ ├── strconv.go
│ └── writer.go
└── golang.org/
└── x/
├── crypto/
│ ├── LICENSE
│ ├── PATENTS
│ ├── blowfish/
│ │ ├── block.go
│ │ ├── cipher.go
│ │ └── const.go
│ ├── chacha20/
│ │ ├── chacha_arm64.go
│ │ ├── chacha_arm64.s
│ │ ├── chacha_generic.go
│ │ ├── chacha_noasm.go
│ │ ├── chacha_ppc64x.go
│ │ ├── chacha_ppc64x.s
│ │ ├── chacha_s390x.go
│ │ ├── chacha_s390x.s
│ │ └── xor.go
│ ├── curve25519/
│ │ └── curve25519.go
│ ├── internal/
│ │ ├── alias/
│ │ │ ├── alias.go
│ │ │ └── alias_purego.go
│ │ └── poly1305/
│ │ ├── mac_noasm.go
│ │ ├── poly1305.go
│ │ ├── sum_amd64.s
│ │ ├── sum_asm.go
│ │ ├── sum_generic.go
│ │ ├── sum_loong64.s
│ │ ├── sum_ppc64x.s
│ │ ├── sum_s390x.go
│ │ └── sum_s390x.s
│ └── ssh/
│ ├── agent/
│ │ ├── client.go
│ │ ├── forward.go
│ │ ├── keyring.go
│ │ └── server.go
│ ├── buffer.go
│ ├── certs.go
│ ├── channel.go
│ ├── cipher.go
│ ├── client.go
│ ├── client_auth.go
│ ├── common.go
│ ├── connection.go
│ ├── doc.go
│ ├── handshake.go
│ ├── internal/
│ │ └── bcrypt_pbkdf/
│ │ └── bcrypt_pbkdf.go
│ ├── kex.go
│ ├── keys.go
│ ├── mac.go
│ ├── messages.go
│ ├── mlkem.go
│ ├── mux.go
│ ├── server.go
│ ├── session.go
│ ├── ssh_gss.go
│ ├── streamlocal.go
│ ├── tcpip.go
│ └── transport.go
├── sync/
│ ├── LICENSE
│ ├── PATENTS
│ └── errgroup/
│ └── errgroup.go
├── sys/
│ ├── LICENSE
│ ├── PATENTS
│ ├── cpu/
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_darwin_x86_gc.s
│ │ ├── byteorder.go
│ │ ├── cpu.go
│ │ ├── cpu_aix.go
│ │ ├── cpu_arm.go
│ │ ├── cpu_arm64.go
│ │ ├── cpu_arm64.s
│ │ ├── cpu_darwin_x86.go
│ │ ├── cpu_gc_arm64.go
│ │ ├── cpu_gc_s390x.go
│ │ ├── cpu_gc_x86.go
│ │ ├── cpu_gc_x86.s
│ │ ├── cpu_gccgo_arm64.go
│ │ ├── cpu_gccgo_s390x.go
│ │ ├── cpu_gccgo_x86.c
│ │ ├── cpu_gccgo_x86.go
│ │ ├── cpu_linux.go
│ │ ├── cpu_linux_arm.go
│ │ ├── cpu_linux_arm64.go
│ │ ├── cpu_linux_loong64.go
│ │ ├── cpu_linux_mips64x.go
│ │ ├── cpu_linux_noinit.go
│ │ ├── cpu_linux_ppc64x.go
│ │ ├── cpu_linux_riscv64.go
│ │ ├── cpu_linux_s390x.go
│ │ ├── cpu_loong64.go
│ │ ├── cpu_loong64.s
│ │ ├── cpu_mips64x.go
│ │ ├── cpu_mipsx.go
│ │ ├── cpu_netbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.s
│ │ ├── cpu_other_arm.go
│ │ ├── cpu_other_arm64.go
│ │ ├── cpu_other_mips64x.go
│ │ ├── cpu_other_ppc64x.go
│ │ ├── cpu_other_riscv64.go
│ │ ├── cpu_other_x86.go
│ │ ├── cpu_ppc64x.go
│ │ ├── cpu_riscv64.go
│ │ ├── cpu_s390x.go
│ │ ├── cpu_s390x.s
│ │ ├── cpu_wasm.go
│ │ ├── cpu_windows_arm64.go
│ │ ├── cpu_x86.go
│ │ ├── cpu_zos.go
│ │ ├── cpu_zos_s390x.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── hwcap_linux.go
│ │ ├── parse.go
│ │ ├── proc_cpuinfo_linux.go
│ │ ├── runtime_auxv.go
│ │ ├── runtime_auxv_go121.go
│ │ ├── syscall_aix_gccgo.go
│ │ ├── syscall_aix_ppc64_gc.go
│ │ └── syscall_darwin_x86_gc.go
│ ├── plan9/
│ │ ├── asm.s
│ │ ├── asm_plan9_386.s
│ │ ├── asm_plan9_amd64.s
│ │ ├── asm_plan9_arm.s
│ │ ├── const_plan9.go
│ │ ├── dir_plan9.go
│ │ ├── env_plan9.go
│ │ ├── errors_plan9.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mksysnum_plan9.sh
│ │ ├── pwd_plan9.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_plan9.go
│ │ ├── zsyscall_plan9_386.go
│ │ ├── zsyscall_plan9_amd64.go
│ │ ├── zsyscall_plan9_arm.go
│ │ └── zsysnum_plan9.go
│ ├── unix/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_bsd_386.s
│ │ ├── asm_bsd_amd64.s
│ │ ├── asm_bsd_arm.s
│ │ ├── asm_bsd_arm64.s
│ │ ├── asm_bsd_ppc64.s
│ │ ├── asm_bsd_riscv64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_loong64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_riscv64.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_openbsd_mips64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── asm_zos_s390x.s
│ │ ├── auxv.go
│ │ ├── auxv_unsupported.go
│ │ ├── bluetooth_linux.go
│ │ ├── bpxsvc_zos.go
│ │ ├── bpxsvc_zos.s
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dev_zos.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ifreq_linux.go
│ │ ├── ioctl_linux.go
│ │ ├── ioctl_signed.go
│ │ ├── ioctl_unsigned.go
│ │ ├── ioctl_zos.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mmap_nomremap.go
│ │ ├── mremap.go
│ │ ├── pagesize_unix.go
│ │ ├── pledge_openbsd.go
│ │ ├── ptrace_darwin.go
│ │ ├── ptrace_ios.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── readdirent_getdents.go
│ │ ├── readdirent_getdirentries.go
│ │ ├── sockcmsg_dragonfly.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── sockcmsg_unix_other.go
│ │ ├── sockcmsg_zos.go
│ │ ├── symaddr_zos_s390x.s
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_freebsd_riscv64.go
│ │ ├── syscall_hurd.go
│ │ ├── syscall_hurd_386.go
│ │ ├── syscall_illumos.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_alarm.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gc_arm.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_loong64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_openbsd_libc.go
│ │ ├── syscall_openbsd_mips64.go
│ │ ├── syscall_openbsd_ppc64.go
│ │ ├── syscall_openbsd_riscv64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── syscall_zos_s390x.go
│ │ ├── sysvshm_linux.go
│ │ ├── sysvshm_unix.go
│ │ ├── sysvshm_unix_other.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── vgetrandom_linux.go
│ │ ├── vgetrandom_unsupported.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_freebsd_riscv64.go
│ │ ├── zerrors_linux.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_loong64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_openbsd_mips64.go
│ │ ├── zerrors_openbsd_ppc64.go
│ │ ├── zerrors_openbsd_riscv64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zerrors_zos_s390x.go
│ │ ├── zptrace_armnn_linux.go
│ │ ├── zptrace_linux_arm64.go
│ │ ├── zptrace_mipsnn_linux.go
│ │ ├── zptrace_mipsnnle_linux.go
│ │ ├── zptrace_x86_linux.go
│ │ ├── zsymaddr_zos_s390x.s
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_freebsd_riscv64.go
│ │ ├── zsyscall_illumos_amd64.go
│ │ ├── zsyscall_linux.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_loong64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_386.s
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_amd64.s
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm.s
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_openbsd_arm64.s
│ │ ├── zsyscall_openbsd_mips64.go
│ │ ├── zsyscall_openbsd_mips64.s
│ │ ├── zsyscall_openbsd_ppc64.go
│ │ ├── zsyscall_openbsd_ppc64.s
│ │ ├── zsyscall_openbsd_riscv64.go
│ │ ├── zsyscall_openbsd_riscv64.s
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsyscall_zos_s390x.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysctl_openbsd_mips64.go
│ │ ├── zsysctl_openbsd_ppc64.go
│ │ ├── zsysctl_openbsd_riscv64.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_freebsd_riscv64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_loong64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── zsysnum_openbsd_mips64.go
│ │ ├── zsysnum_openbsd_ppc64.go
│ │ ├── zsysnum_openbsd_riscv64.go
│ │ ├── zsysnum_zos_s390x.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_freebsd_riscv64.go
│ │ ├── ztypes_linux.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_loong64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ ├── ztypes_openbsd_mips64.go
│ │ ├── ztypes_openbsd_ppc64.go
│ │ ├── ztypes_openbsd_riscv64.go
│ │ ├── ztypes_solaris_amd64.go
│ │ └── ztypes_zos_s390x.go
│ └── windows/
│ ├── aliases.go
│ ├── dll_windows.go
│ ├── env_windows.go
│ ├── eventlog.go
│ ├── exec_windows.go
│ ├── memory_windows.go
│ ├── mkerrors.bash
│ ├── mkknownfolderids.bash
│ ├── mksyscall.go
│ ├── race.go
│ ├── race0.go
│ ├── security_windows.go
│ ├── service.go
│ ├── setupapi_windows.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_windows.go
│ ├── types_windows.go
│ ├── types_windows_386.go
│ ├── types_windows_amd64.go
│ ├── types_windows_arm.go
│ ├── types_windows_arm64.go
│ ├── zerrors_windows.go
│ ├── zknownfolderids_windows.go
│ └── zsyscall_windows.go
└── term/
├── CONTRIBUTING.md
├── LICENSE
├── PATENTS
├── README.md
├── codereview.cfg
├── term.go
├── term_plan9.go
├── term_unix.go
├── term_unix_bsd.go
├── term_unix_other.go
├── term_unsupported.go
├── term_windows.go
└── terminal.go
Showing preview only (8,606K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (101911 symbols across 721 files)
FILE: cmd/get-config.go
function MakeGetConfig (line 15) | func MakeGetConfig() *cobra.Command {
FILE: cmd/get.go
function MakeGet (line 9) | func MakeGet() *cobra.Command {
FILE: cmd/get_pro.go
function MakeGetPro (line 24) | func MakeGetPro() *cobra.Command {
function preRunGetProE (line 51) | func preRunGetProE(cmd *cobra.Command, args []string) error {
function runGetProE (line 61) | func runGetProE(cmd *cobra.Command, args []string) error {
function getClientArch (line 201) | func getClientArch() (arch string, os string) {
function getDownloadArch (line 209) | func getDownloadArch(clientArch, clientOS string) (arch string, os strin...
function copyFile (line 223) | func copyFile(src, dst string) error {
FILE: cmd/install.go
type k3sExecOptions (line 28) | type k3sExecOptions struct
constant PinnedK3sChannel (line 41) | PinnedK3sChannel = "stable"
constant getScript (line 43) | getScript = "curl -sfL https://get.k3s.io"
function MakeInstall (line 46) | func MakeInstall() *cobra.Command {
type DoneFunc (line 332) | type DoneFunc
function connectOperator (line 343) | func connectOperator(user string, address string, sshKeyPath string) (*o...
function sshAgentOnly (line 397) | func sshAgentOnly() (ssh.AuthMethod, error) {
function obtainKubeconfig (line 405) | func obtainKubeconfig(operator operator.CommandOperator, getConfigcomman...
function writeConfig (line 432) | func writeConfig(path string, data []byte, context string, suppressMessa...
function mergeConfigs (line 457) | func mergeConfigs(localKubeconfigPath, context string, k3sconfig []byte)...
function expandPath (line 507) | func expandPath(path string) string {
function sshAgent (line 512) | func sshAgent(publicKeyPath string) (ssh.AuthMethod, func() error) {
function loadPublickey (line 541) | func loadPublickey(path string) (ssh.AuthMethod, func() error, error) {
function rewriteKubeconfig (line 586) | func rewriteKubeconfig(kubeconfig string, host string, context string) [...
function makeInstallExec (line 600) | func makeInstallExec(cluster bool, host, tlsSAN string, options k3sExecO...
FILE: cmd/install_test.go
constant privateKey (line 15) | privateKey = `-----BEGIN RSA PRIVATE KEY-----
function Test_loadPublickeyEncrypted (line 47) | func Test_loadPublickeyEncrypted(t *testing.T) {
constant kubeconfigExample (line 68) | kubeconfigExample = `
function Test_RewriteKubeconfig (line 90) | func Test_RewriteKubeconfig(t *testing.T) {
function Test_makeInstallExec (line 133) | func Test_makeInstallExec(t *testing.T) {
function Test_makeInstallExec_Cluster (line 154) | func Test_makeInstallExec_Cluster(t *testing.T) {
function Test_makeInstallExec_SAN (line 175) | func Test_makeInstallExec_SAN(t *testing.T) {
function Test_makeInstallExec_IPSec (line 196) | func Test_makeInstallExec_IPSec(t *testing.T) {
function Test_makeInstallExec_Datastore (line 217) | func Test_makeInstallExec_Datastore(t *testing.T) {
function Test_makeInstallExec_Datastore_NoExtras (line 240) | func Test_makeInstallExec_Datastore_NoExtras(t *testing.T) {
FILE: cmd/join.go
function MakeJoin (line 20) | func MakeJoin() *cobra.Command {
function setupAdditionalServer (line 314) | func setupAdditionalServer(serverHost, host string, port int, user, sshK...
function setupAgent (line 405) | func setupAgent(serverHost, host string, port int, user, sshKeyPath, joi...
function createVersionStr (line 495) | func createVersionStr(k3sVersion, k3sChannel string) string {
function makeJoinExec (line 505) | func makeJoinExec(serverIP, joinToken, installStr, k3sExtraArgs string, ...
FILE: cmd/join_test.go
type test (line 7) | type test struct
function Test_makeJoinServerExec (line 18) | func Test_makeJoinServerExec(t *testing.T) {
function Test_makeJoinAgentExec (line 73) | func Test_makeJoinAgentExec(t *testing.T) {
FILE: cmd/node-token.go
function MakeNodeToken (line 17) | func MakeNodeToken() *cobra.Command {
function obtainNodeToken (line 147) | func obtainNodeToken(operator ssh.CommandOperator, command, host string)...
FILE: cmd/plan.go
function MakePlan (line 12) | func MakePlan() *cobra.Command {
type Host (line 192) | type Host struct
FILE: cmd/pro.go
function MakePro (line 9) | func MakePro() *cobra.Command {
FILE: cmd/ready.go
function MakeReady (line 14) | func MakeReady() *cobra.Command {
FILE: cmd/update.go
function MakeUpdate (line 10) | func MakeUpdate() *cobra.Command {
constant k3supUpdate (line 27) | k3supUpdate = `You can update k3sup with the following:
FILE: cmd/version.go
function PrintK3supASCIIArt (line 16) | func PrintK3supASCIIArt() {
function MakeVersion (line 22) | func MakeVersion() *cobra.Command {
constant k3supFigletStr (line 44) | k3supFigletStr = ` _ _____ ____ _____
FILE: main.go
function main (line 11) | func main() {
FILE: pkg/operator/exec_operator.go
type ExecOperator (line 10) | type ExecOperator struct
method ExecuteStdio (line 13) | func (ex ExecOperator) ExecuteStdio(command string, stream bool) (Comm...
method Execute (line 32) | func (ex ExecOperator) Execute(command string) (CommandRes, error) {
FILE: pkg/operator/operator.go
type CommandOperator (line 4) | type CommandOperator interface
type CommandRes (line 10) | type CommandRes struct
FILE: pkg/operator/ssh_operator.go
type SSHOperator (line 13) | type SSHOperator struct
method ExecuteStdio (line 30) | func (s SSHOperator) ExecuteStdio(command string, stream bool) (Comman...
method Execute (line 92) | func (s SSHOperator) Execute(command string) (CommandRes, error) {
method Close (line 96) | func (s SSHOperator) Close() error {
function NewSSHOperator (line 17) | func NewSSHOperator(address string, config *ssh.ClientConfig) (*SSHOpera...
FILE: pkg/thanks.go
constant SupportMessageShort (line 4) | SupportMessageShort = `Tip: Create clusters on Mac, Linux + WSL2 with K3...
FILE: vendor/github.com/alexellis/arkade/pkg/archive/untar.go
function Untar (line 23) | func Untar(r io.Reader, dir string, gzip bool, quiet bool) error {
function untar (line 27) | func untar(r io.Reader, dir string, gzip bool, quiet bool) (err error) {
function validRelPath (line 120) | func validRelPath(p string) bool {
FILE: vendor/github.com/alexellis/arkade/pkg/archive/untar_nested.go
function UntarNested (line 18) | func UntarNested(r io.Reader, dir string, gzipped, quiet bool) error {
function untarNested (line 22) | func untarNested(r io.Reader, dir string, gzipped, quiet bool) (err erro...
FILE: vendor/github.com/alexellis/arkade/pkg/archive/unzip.go
function Unzip (line 19) | func Unzip(reader io.ReaderAt, size int64, dir string, quiet bool) error {
function unzip (line 28) | func unzip(r zip.Reader, dir string, quiet bool) (err error) {
FILE: vendor/github.com/alexellis/arkade/pkg/env/env.go
function GetClientArch (line 20) | func GetClientArch() (arch string, os string) {
function getClientArchFromUname (line 28) | func getClientArchFromUname() (arch string, os string) {
function LocalBinary (line 53) | func LocalBinary(name, subdir string) string {
FILE: vendor/github.com/alexellis/go-execute/v2/exec.go
type ExecTask (line 13) | type ExecTask struct
method Execute (line 66) | func (et ExecTask) Execute(ctx context.Context) (ExecResult, error) {
type ExecResult (line 59) | type ExecResult struct
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/build.go
type GzipHelperFunc (line 46) | type GzipHelperFunc
type options (line 48) | type options struct
type Option (line 59) | type Option
function WithChunkSize (line 62) | func WithChunkSize(chunkSize int) Option {
function WithCompressionLevel (line 73) | func WithCompressionLevel(level int) Option {
function WithPrioritizedFiles (line 84) | func WithPrioritizedFiles(files []string) Option {
function WithAllowPrioritizeNotFound (line 95) | func WithAllowPrioritizeNotFound(missedFiles *[]string) Option {
function WithCompression (line 107) | func WithCompression(compression Compression) Option {
function WithContext (line 115) | func WithContext(ctx context.Context) Option {
function WithMinChunkSize (line 127) | func WithMinChunkSize(minChunkSize int) Option {
function WithGzipHelperFunc (line 139) | func WithGzipHelperFunc(gzipHelperFunc GzipHelperFunc) Option {
type Blob (line 147) | type Blob struct
method DiffID (line 157) | func (b *Blob) DiffID() digest.Digest {
method TOCDigest (line 162) | func (b *Blob) TOCDigest() digest.Digest {
method UncompressedSize (line 168) | func (b *Blob) UncompressedSize() (int64, error) {
function Build (line 184) | func Build(tarBlob *io.SectionReader, opt ...Option) (_ *Blob, rErr erro...
function closeWithCombine (line 327) | func closeWithCombine(ws ...*Writer) (tocAndFooterR io.Reader, tocDgst d...
function tocAndFooter (line 365) | func tocAndFooter(compressor Compressor, toc *JTOC, offset int64) (io.Re...
function divideEntries (line 376) | func divideEntries(entries []*entry, minPartsNum int) (set [][]*entry) {
function sortEntries (line 403) | func sortEntries(in io.ReaderAt, prioritized []string, missedPrioritized...
function readerFromEntries (line 449) | func readerFromEntries(entries ...*entry) io.Reader {
function importTar (line 469) | func importTar(in io.ReaderAt) (*tarFile, error) {
function moveRec (line 506) | func moveRec(name string, in *tarFile, out *tarFile, picked map[string]s...
type entry (line 546) | type entry struct
type tarFile (line 551) | type tarFile struct
method add (line 556) | func (f *tarFile) add(e *entry) {
method remove (line 564) | func (f *tarFile) remove(name string) {
method get (line 579) | func (f *tarFile) get(name string) (e *entry, ok bool) {
method dump (line 587) | func (f *tarFile) dump(skip map[string]struct{}) []*entry {
type readCloser (line 601) | type readCloser struct
method Close (line 606) | func (rc readCloser) Close() error {
function fileSectionReader (line 610) | func fileSectionReader(file *os.File) (*io.SectionReader, error) {
function newTempFiles (line 618) | func newTempFiles() *tempFiles {
type tempFiles (line 622) | type tempFiles struct
method TempFile (line 628) | func (tf *tempFiles) TempFile(dir, pattern string) (*os.File, error) {
method CleanupAll (line 639) | func (tf *tempFiles) CleanupAll() (err error) {
method cleanupAll (line 646) | func (tf *tempFiles) cleanupAll() error {
function newCountReadSeeker (line 662) | func newCountReadSeeker(r io.ReaderAt) (*countReadSeeker, error) {
type countReadSeeker (line 667) | type countReadSeeker struct
method Read (line 674) | func (cr *countReadSeeker) Read(p []byte) (int, error) {
method Seek (line 685) | func (cr *countReadSeeker) Seek(offset int64, whence int) (int64, erro...
method currentPos (line 706) | func (cr *countReadSeeker) currentPos() int64 {
function decompressBlob (line 713) | func decompressBlob(org *io.SectionReader, tmp *tempFiles, gzipHelperFun...
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go
function Aggregate (line 26) | func Aggregate(errs []error) error {
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go
type Reader (line 47) | type Reader struct
method initFields (line 203) | func (r *Reader) initFields() error {
method getSource (line 322) | func (r *Reader) getSource(ent *TOCEntry) (_ *TOCEntry, err error) {
method getOrCreateDir (line 341) | func (r *Reader) getOrCreateDir(d string) *TOCEntry {
method TOCDigest (line 359) | func (r *Reader) TOCDigest() digest.Digest {
method VerifyTOC (line 367) | func (r *Reader) VerifyTOC(tocDigest digest.Digest) (TOCEntryVerifier,...
method Verifiers (line 377) | func (r *Reader) Verifiers() (TOCEntryVerifier, error) {
method ChunkEntryForOffset (line 461) | func (r *Reader) ChunkEntryForOffset(name string, offset int64) (e *TO...
method Lookup (line 488) | func (r *Reader) Lookup(path string) (e *TOCEntry, ok bool) {
method OpenFile (line 507) | func (r *Reader) OpenFile(name string) (*io.SectionReader, error) {
method newFileReader (line 515) | func (r *Reader) newFileReader(name string) (*fileReader, error) {
method OpenFileWithPreReader (line 540) | func (r *Reader) OpenFileWithPreReader(name string, preRead func(*TOCE...
method getChunks (line 549) | func (r *Reader) getChunks(ent *TOCEntry) []*TOCEntry {
type openOpts (line 63) | type openOpts struct
type OpenOption (line 70) | type OpenOption
function WithTOCOffset (line 73) | func WithTOCOffset(tocOffset int64) OpenOption {
function WithDecompressors (line 82) | func WithDecompressors(decompressors ...Decompressor) OpenOption {
function WithTelemetry (line 90) | func WithTelemetry(telemetry *Telemetry) OpenOption {
type MeasureLatencyHook (line 98) | type MeasureLatencyHook
type Telemetry (line 102) | type Telemetry struct
function Open (line 112) | func Open(sr *io.SectionReader, opt ...OpenOption) (*Reader, error) {
function OpenFooter (line 177) | func OpenFooter(sr *io.SectionReader) (tocOffset int64, footerSize int64...
function parentDir (line 336) | func parentDir(p string) string {
type verifier (line 441) | type verifier struct
method Verifier (line 447) | func (v *verifier) Verifier(ce *TOCEntry) (digest.Verifier, error) {
type fileReader (line 556) | type fileReader struct
method ReadAt (line 563) | func (fr *fileReader) ReadAt(p []byte, off int64) (n int, err error) {
type Writer (line 662) | type Writer struct
method chunkSize (line 707) | func (w *Writer) chunkSize() int {
method Close (line 770) | func (w *Writer) Close() (digest.Digest, error) {
method closeGz (line 792) | func (w *Writer) closeGz() error {
method flushGz (line 805) | func (w *Writer) flushGz() error {
method nameIfChanged (line 821) | func (w *Writer) nameIfChanged(mp *map[int]string, id int, name string...
method condOpenGz (line 835) | func (w *Writer) condOpenGz() (err error) {
method AppendTar (line 850) | func (w *Writer) AppendTar(r io.Reader) error {
method AppendTarLossLess (line 867) | func (w *Writer) AppendTarLossLess(r io.Reader) error {
method appendTar (line 871) | func (w *Writer) appendTar(r io.Reader, lossless bool) error {
method needsOpenGz (line 1059) | func (w *Writer) needsOpenGz(ent *TOCEntry) bool {
method DiffID (line 1072) | func (w *Writer) DiffID() string {
type currentCompressionWriter (line 695) | type currentCompressionWriter struct
method Write (line 697) | func (ccw currentCompressionWriter) Write(p []byte) (int, error) {
function Unpack (line 716) | func Unpack(sr *io.SectionReader, c Decompressor) (io.ReadCloser, error) {
function NewWriter (line 739) | func NewWriter(w io.Writer) *Writer {
function NewWriterLevel (line 747) | func NewWriterLevel(w io.Writer, compressionLevel int) *Writer {
function NewWriterWithCompressor (line 755) | func NewWriterWithCompressor(w io.Writer, c Compressor) *Writer {
function maxFooterSize (line 1076) | func maxFooterSize(blobSize int64, decompressors ...Decompressor) (res i...
function parseTOC (line 1085) | func parseTOC(d Decompressor, sr *io.SectionReader, tocOff, tocSize int6...
function formatModtime (line 1148) | func formatModtime(t time.Time) string {
function cleanEntryName (line 1155) | func cleanEntryName(name string) string {
type countWriter (line 1162) | type countWriter struct
method Write (line 1167) | func (cw *countWriter) Write(p []byte) (n int, err error) {
type countWriteFlusher (line 1173) | type countWriteFlusher struct
method register (line 1178) | func (wc *countWriteFlusher) register(w io.WriteCloser) io.WriteCloser {
method Write (line 1183) | func (wc *countWriteFlusher) Write(p []byte) (n int, err error) {
method Flush (line 1189) | func (wc *countWriteFlusher) Flush() error {
method Close (line 1198) | func (wc *countWriteFlusher) Close() error {
function isGzip (line 1206) | func isGzip(br *bufio.Reader) bool {
function positive (line 1216) | func positive(n int64) int64 {
type countReader (line 1223) | type countReader struct
method Read (line 1228) | func (cr *countReader) Read(p []byte) (n int, err error) {
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go
type gzipCompression (line 39) | type gzipCompression struct
function newGzipCompressionWithLevel (line 44) | func newGzipCompressionWithLevel(level int) Compression {
function NewGzipCompressor (line 51) | func NewGzipCompressor() *GzipCompressor {
function NewGzipCompressorWithLevel (line 55) | func NewGzipCompressorWithLevel(level int) *GzipCompressor {
type GzipCompressor (line 59) | type GzipCompressor struct
method Writer (line 63) | func (gc *GzipCompressor) Writer(w io.Writer) (WriteFlushCloser, error) {
method WriteTOCAndFooter (line 67) | func (gc *GzipCompressor) WriteTOCAndFooter(w io.Writer, off int64, to...
function gzipFooterBytes (line 102) | func gzipFooterBytes(tocOff int64) []byte {
type GzipDecompressor (line 120) | type GzipDecompressor struct
method Reader (line 122) | func (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error) {
method ParseTOC (line 126) | func (gz *GzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, tocDgst ...
method ParseFooter (line 130) | func (gz *GzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, to...
method FooterSize (line 157) | func (gz *GzipDecompressor) FooterSize() int64 {
method DecompressTOC (line 161) | func (gz *GzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.Rea...
type LegacyGzipDecompressor (line 165) | type LegacyGzipDecompressor struct
method Reader (line 167) | func (gz *LegacyGzipDecompressor) Reader(r io.Reader) (io.ReadCloser, ...
method ParseTOC (line 171) | func (gz *LegacyGzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, to...
method ParseFooter (line 175) | func (gz *LegacyGzipDecompressor) ParseFooter(p []byte) (blobPayloadSi...
method FooterSize (line 198) | func (gz *LegacyGzipDecompressor) FooterSize() int64 {
method DecompressTOC (line 202) | func (gz *LegacyGzipDecompressor) DecompressTOC(r io.Reader) (tocJSON ...
function parseTOCEStargz (line 206) | func parseTOCEStargz(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err...
function decompressTOCEStargz (line 222) | func decompressTOCEStargz(r io.Reader) (tocJSON io.ReadCloser, err error) {
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go
type TestingController (line 49) | type TestingController interface
type TestingT (line 59) | type TestingT interface
type Runner (line 72) | type Runner
type TestRunner (line 74) | type TestRunner struct
method Run (line 79) | func (r *TestRunner) Run(name string, run func(*TestRunner)) {
function CompressionTestSuite (line 86) | func CompressionTestSuite(t *TestRunner, controllers ...TestingControlle...
type TestingControllerFactory (line 95) | type TestingControllerFactory
constant uncompressedType (line 98) | uncompressedType int = iota
constant gzipType (line 99) | gzipType
constant zstdType (line 100) | zstdType
function testBuild (line 113) | func testBuild(t *TestRunner, controllers ...TestingControllerFactory) {
function isSameTarGz (line 299) | func isSameTarGz(t TestingT, cla TestingController, a []byte, clb Testin...
function isSameVersion (line 359) | func isSameVersion(t TestingT, cla TestingController, a []byte, clb Test...
function isSameEntries (line 373) | func isSameEntries(t TestingT, a, b *Reader) bool {
function compressBlob (line 387) | func compressBlob(t TestingT, src *io.SectionReader, srcCompression int)...
type stargzEntry (line 414) | type stargzEntry struct
function contains (line 421) | func contains(t TestingT, a, b stargzEntry) bool {
function allChildrenName (line 498) | func allChildrenName(e *TOCEntry) (children []string) {
function equalEntry (line 506) | func equalEntry(a, b *TOCEntry) bool {
function readOffset (line 532) | func readOffset(t TestingT, r *io.SectionReader, offset int64, e stargzE...
function dumpTOCJSON (line 551) | func dumpTOCJSON(t TestingT, tocJSON *JTOC) string {
constant chunkSize (line 563) | chunkSize = 3
type check (line 565) | type check
function testDigestAndVerify (line 568) | func testDigestAndVerify(t *TestRunner, controllers ...TestingController...
function checkStargzTOC (line 723) | func checkStargzTOC(t *TestRunner, sgzData []byte, tocDigest digest.Dige...
function checkVerifyTOC (line 834) | func checkVerifyTOC(t *TestRunner, sgzData []byte, tocDigest digest.Dige...
function checkVerifyInvalidTOCEntryFail (line 914) | func checkVerifyInvalidTOCEntryFail(filename string) check {
function checkVerifyInvalidStargzFail (line 990) | func checkVerifyInvalidStargzFail(invalid *io.SectionReader) check {
function checkVerifyBrokenContentFail (line 1022) | func checkVerifyBrokenContentFail(filename string) check {
function chunkID (line 1076) | func chunkID(name string, offset, size int64) string {
type rewriteFunc (line 1080) | type rewriteFunc
function rewriteTOCJSON (line 1082) | func rewriteTOCJSON(t TestingT, sgz *io.SectionReader, rewrite rewriteFu...
function listDigests (line 1105) | func listDigests(sgz *io.SectionReader, controller TestingController) (m...
function parseStargz (line 1130) | func parseStargz(sgz *io.SectionReader, controller TestingController) (d...
function testWriteAndOpen (line 1153) | func testWriteAndOpen(t *TestRunner, controllers ...TestingControllerFac...
type chunkInfo (line 1627) | type chunkInfo struct
function newCalledTelemetry (line 1632) | func newCalledTelemetry() (telemetry *Telemetry, check func(needsGetTOC ...
function digestFor (line 1657) | func digestFor(content string) string {
type numTOCEntries (line 1662) | type numTOCEntries
method check (line 1664) | func (n numTOCEntries) check(t TestingT, r *Reader) {
function checks (line 1681) | func checks(s ...stargzCheck) []stargzCheck { return s }
type stargzCheck (line 1683) | type stargzCheck interface
type stargzCheckFn (line 1687) | type stargzCheckFn
method check (line 1689) | func (f stargzCheckFn) check(t TestingT, r *Reader) { f(t, r) }
function maxDepth (line 1691) | func maxDepth(max int) stargzCheck {
function getMaxDepth (line 1709) | func getMaxDepth(t TestingT, e *TOCEntry, current, limit int) (max int, ...
function hasFileLen (line 1730) | func hasFileLen(file string, wantLen int) stargzCheck {
function hasFileXattrs (line 1746) | func hasFileXattrs(file, name, value string) stargzCheck {
function hasFileDigest (line 1773) | func hasFileDigest(file string, digest string) stargzCheck {
function hasFileContentsWithPreRead (line 1785) | func hasFileContentsWithPreRead(file string, offset int, want string, ex...
function hasFileContentsRange (line 1832) | func hasFileContentsRange(file string, offset int, want string) stargzCh...
function hasChunkEntries (line 1849) | func hasChunkEntries(file string, wantChunks int) stargzCheck {
function entryHasChildren (line 1893) | func entryHasChildren(dir string, want ...string) stargzCheck {
function hasDir (line 1912) | func hasDir(file string) stargzCheck {
function hasDirLinkCount (line 1926) | func hasDirLinkCount(file string, count int) stargzCheck {
function hasMode (line 1944) | func hasMode(file string, mode os.FileMode) stargzCheck {
function hasSymlink (line 1959) | func hasSymlink(file, target string) stargzCheck {
function lookupMatch (line 1975) | func lookupMatch(name string, want *TOCEntry) stargzCheck {
function hasEntryOwner (line 1988) | func hasEntryOwner(entry string, owner owner) stargzCheck {
function mustSameEntry (line 2002) | func mustSameEntry(files ...string) stargzCheck {
function viewContent (line 2056) | func viewContent(c []byte) string {
function tarOf (line 2063) | func tarOf(s ...tarEntry) []tarEntry { return s }
type tarEntry (line 2065) | type tarEntry interface
type tarEntryFunc (line 2069) | type tarEntryFunc
method appendTar (line 2071) | func (f tarEntryFunc) appendTar(tw *tar.Writer, prefix string, format ...
function buildTar (line 2075) | func buildTar(t TestingT, ents []tarEntry, prefix string, opts ...interf...
function dir (line 2099) | func dir(name string, opts ...interface{}) tarEntry {
type xAttr (line 2132) | type xAttr
type owner (line 2135) | type owner struct
function file (line 2140) | func file(name, contents string, opts ...interface{}) tarEntry {
function symlink (line 2184) | func symlink(name, target string) tarEntry {
function link (line 2196) | func link(name string, linkname string) tarEntry {
function chardev (line 2209) | func chardev(name string, major, minor int64) tarEntry {
function blockdev (line 2223) | func blockdev(name string, major, minor int64) tarEntry {
function fifo (line 2236) | func fifo(name string) tarEntry {
function prefetchLandmark (line 2248) | func prefetchLandmark() tarEntry {
function noPrefetchLandmark (line 2266) | func noPrefetchLandmark() tarEntry {
function regDigest (line 2284) | func regDigest(t TestingT, name string, contentStr string, digestMap map...
function randomContents (line 2324) | func randomContents(n int) string {
function fileModeToTarMode (line 2336) | func fileModeToTarMode(mode os.FileMode) (int64, error) {
type fileInfoOnlyMode (line 2345) | type fileInfoOnlyMode
method Name (line 2347) | func (f fileInfoOnlyMode) Name() string { return "" }
method Size (line 2348) | func (f fileInfoOnlyMode) Size() int64 { return 0 }
method Mode (line 2349) | func (f fileInfoOnlyMode) Mode() os.FileMode { return os.FileMode(f) }
method ModTime (line 2350) | func (f fileInfoOnlyMode) ModTime() time.Time { return time.Now() }
method IsDir (line 2351) | func (f fileInfoOnlyMode) IsDir() bool { return os.FileMode(f)....
method Sys (line 2352) | func (f fileInfoOnlyMode) Sys() interface{} { return nil }
function CheckGzipHasStreams (line 2354) | func CheckGzipHasStreams(t TestingT, b []byte, streams []int64) {
function GzipDiffIDOf (line 2392) | func GzipDiffIDOf(t TestingT, b []byte) string {
FILE: vendor/github.com/containerd/stargz-snapshotter/estargz/types.go
constant TOCTarName (line 39) | TOCTarName = "stargz.index.json"
constant FooterSize (line 59) | FooterSize = 51
constant legacyFooterSize (line 70) | legacyFooterSize = 47
constant TOCJSONDigestAnnotation (line 76) | TOCJSONDigestAnnotation = "containerd.io/snapshot/stargz/toc.digest"
constant StoreUncompressedSizeAnnotation (line 82) | StoreUncompressedSizeAnnotation = "io.containers.estargz.uncompressed-size"
constant PrefetchLandmark (line 86) | PrefetchLandmark = ".prefetch.landmark"
constant NoPrefetchLandmark (line 90) | NoPrefetchLandmark = ".no.prefetch.landmark"
constant landmarkContents (line 92) | landmarkContents = 0xf
type JTOC (line 96) | type JTOC struct
type TOCEntry (line 102) | type TOCEntry struct
method ModTime (line 201) | func (e *TOCEntry) ModTime() time.Time { return e.modTime }
method NextOffset (line 205) | func (e *TOCEntry) NextOffset() int64 { return e.nextOffset }
method addChild (line 207) | func (e *TOCEntry) addChild(baseName string, child *TOCEntry) {
method isDataType (line 219) | func (e *TOCEntry) isDataType() bool { return e.Type == "reg" || e.Typ...
method Stat (line 222) | func (e *TOCEntry) Stat() os.FileInfo { return fileInfo{e} }
method ForeachChild (line 226) | func (e *TOCEntry) ForeachChild(f func(baseName string, ent *TOCEntry)...
method LookupChild (line 235) | func (e *TOCEntry) LookupChild(baseName string) (child *TOCEntry, ok b...
type fileInfo (line 241) | type fileInfo struct
method Name (line 245) | func (fi fileInfo) Name() string { return path.Base(fi.e.Name) }
method IsDir (line 246) | func (fi fileInfo) IsDir() bool { return fi.e.Type == "dir" }
method Size (line 247) | func (fi fileInfo) Size() int64 { return fi.e.Size }
method ModTime (line 248) | func (fi fileInfo) ModTime() time.Time { return fi.e.ModTime() }
method Sys (line 249) | func (fi fileInfo) Sys() interface{} { return fi.e }
method Mode (line 250) | func (fi fileInfo) Mode() (m os.FileMode) {
type TOCEntryVerifier (line 271) | type TOCEntryVerifier interface
type Compression (line 281) | type Compression interface
type Compressor (line 287) | type Compressor interface
type Decompressor (line 307) | type Decompressor interface
type WriteFlushCloser (line 339) | type WriteFlushCloser interface
FILE: vendor/github.com/docker/cli/cli/config/config.go
constant EnvOverrideConfigDir (line 24) | EnvOverrideConfigDir = "DOCKER_CONFIG"
constant ConfigFileName (line 28) | ConfigFileName = "config.json"
constant configFileDir (line 29) | configFileDir = ".docker"
constant contextsDir (line 30) | contextsDir = "contexts"
function resetConfigDir (line 40) | func resetConfigDir() {
function getHomeDir (line 61) | func getHomeDir() string {
type Provider (line 72) | type Provider interface
function Dir (line 77) | func Dir() string {
function ContextStoreDir (line 88) | func ContextStoreDir() string {
function SetDir (line 93) | func SetDir(dir string) {
function Path (line 100) | func Path(p ...string) (string, error) {
function LoadFromReader (line 110) | func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) {
function Load (line 126) | func Load(configDir string) (*configfile.ConfigFile, error) {
function load (line 133) | func load(configDir string) (*configfile.ConfigFile, error) {
function LoadDefaultConfigFile (line 166) | func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile {
FILE: vendor/github.com/docker/cli/cli/config/configfile/file.go
type ConfigFile (line 20) | type ConfigFile struct
method LoadFromReader (line 95) | func (configFile *ConfigFile) LoadFromReader(configData io.Reader) err...
method ContainsAuth (line 116) | func (configFile *ConfigFile) ContainsAuth() bool {
method GetAuthConfigs (line 123) | func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthCo...
method SaveToWriter (line 132) | func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error {
method Save (line 165) | func (configFile *ConfigFile) Save() (retErr error) {
method ParseProxyConfig (line 216) | func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts ma...
method GetCredentialsStore (line 289) | func (configFile *ConfigFile) GetCredentialsStore(registryHostname str...
method GetAuthConfig (line 356) | func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (...
method GetAllCredentials (line 374) | func (configFile *ConfigFile) GetAllCredentials() (map[string]types.Au...
method GetFilename (line 403) | func (configFile *ConfigFile) GetFilename() string {
method PluginConfig (line 408) | func (configFile *ConfigFile) PluginConfig(pluginname, option string) ...
method SetPluginConfig (line 424) | func (configFile *ConfigFile) SetPluginConfig(pluginname, option, valu...
type configEnvAuth (line 48) | type configEnvAuth struct
type configEnv (line 52) | type configEnv struct
constant DockerEnvConfigKey (line 71) | DockerEnvConfigKey = "DOCKER_AUTH_CONFIG"
type ProxyConfig (line 74) | type ProxyConfig struct
function New (line 83) | func New(fn string) *ConfigFile {
function encodeAuth (line 252) | func encodeAuth(authConfig *types.AuthConfig) string {
function decodeAuth (line 265) | func decodeAuth(authStr string) (string, string, error) {
function parseEnvConfig (line 321) | func parseEnvConfig(v string) (map[string]types.AuthConfig, error) {
function getConfiguredCredentialStore (line 363) | func getConfiguredCredentialStore(c *ConfigFile, registryHostname string...
FILE: vendor/github.com/docker/cli/cli/config/configfile/file_unix.go
function copyFilePermissions (line 12) | func copyFilePermissions(src, dst string) {
FILE: vendor/github.com/docker/cli/cli/config/configfile/file_windows.go
function copyFilePermissions (line 3) | func copyFilePermissions(src, dst string) {
FILE: vendor/github.com/docker/cli/cli/config/credentials/credentials.go
type Store (line 8) | type Store interface
FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store.go
function DetectDefaultStore (line 7) | func DetectDefaultStore(store string) string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go
function defaultCredentialsStore (line 3) | func defaultCredentialsStore() string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go
function defaultCredentialsStore (line 7) | func defaultCredentialsStore() string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go
function defaultCredentialsStore (line 5) | func defaultCredentialsStore() string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go
function defaultCredentialsStore (line 3) | func defaultCredentialsStore() string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/file_store.go
type store (line 14) | type store interface
type fileStore (line 22) | type fileStore struct
method Erase (line 33) | func (c *fileStore) Erase(serverAddress string) error {
method Get (line 43) | func (c *fileStore) Get(serverAddress string) (types.AuthConfig, error) {
method GetAll (line 59) | func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) {
method Store (line 80) | func (c *fileStore) Store(authConfig types.AuthConfig) error {
function NewFileStore (line 27) | func NewFileStore(file store) Store {
constant unencryptedWarning (line 68) | unencryptedWarning = `
function ConvertToHostname (line 105) | func ConvertToHostname(maybeURL string) string {
FILE: vendor/github.com/docker/cli/cli/config/credentials/native_store.go
constant remoteCredentialsPrefix (line 10) | remoteCredentialsPrefix = "docker-credential-"
constant tokenUsername (line 11) | tokenUsername = "<token>"
type nativeStore (line 17) | type nativeStore struct
method Erase (line 33) | func (c *nativeStore) Erase(serverAddress string) error {
method Get (line 43) | func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, err...
method GetAll (line 60) | func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) {
method Store (line 90) | func (c *nativeStore) Store(authConfig types.AuthConfig) error {
method storeCredentialsInStore (line 103) | func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig)...
method getCredentialsFromStore (line 119) | func (c *nativeStore) getCredentialsFromStore(serverAddress string) (t...
method listCredentialsInStore (line 145) | func (c *nativeStore) listCredentialsInStore() (map[string]string, err...
function NewNativeStore (line 24) | func NewNativeStore(file store, helperSuffix string) Store {
FILE: vendor/github.com/docker/cli/cli/config/memorystore/store.go
type notFoundErr (line 17) | type notFoundErr
method NotFound (line 19) | func (notFoundErr) NotFound() {}
method Error (line 21) | func (e notFoundErr) Error() string {
type Config (line 27) | type Config struct
method Erase (line 33) | func (e *Config) Erase(serverAddress string) error {
method Get (line 48) | func (e *Config) Get(serverAddress string) (types.AuthConfig, error) {
method GetAll (line 61) | func (e *Config) GetAll() (map[string]types.AuthConfig, error) {
method Store (line 79) | func (e *Config) Store(authConfig types.AuthConfig) error {
function WithFallbackStore (line 103) | func WithFallbackStore(store credentials.Store) Options {
function WithAuthConfig (line 111) | func WithAuthConfig(config map[string]types.AuthConfig) Options {
type Options (line 118) | type Options
function New (line 121) | func New(opts ...Options) (credentials.Store, error) {
FILE: vendor/github.com/docker/cli/cli/config/types/authconfig.go
type AuthConfig (line 4) | type AuthConfig struct
FILE: vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go
function hasPort (line 11) | func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings...
function canonicalAddr (line 21) | func canonicalAddr(url *url.URL) string {
FILE: vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go
type Challenge (line 13) | type Challenge struct
type Manager (line 26) | type Manager interface
function NewSimpleManager (line 46) | func NewSimpleManager() Manager {
type simpleManager (line 52) | type simpleManager struct
method GetChallenges (line 62) | func (m *simpleManager) GetChallenges(endpoint url.URL) ([]Challenge, ...
method AddResponse (line 71) | func (m *simpleManager) AddResponse(resp *http.Response) error {
function normalizeURL (line 57) | func normalizeURL(endpoint *url.URL) {
type octetType (line 90) | type octetType
constant isToken (line 95) | isToken octetType = 1 << iota
constant isSpace (line 96) | isSpace
function init (line 99) | func init() {
function ResponseChallenges (line 134) | func ResponseChallenges(resp *http.Response) []Challenge {
function parseAuthHeader (line 144) | func parseAuthHeader(header http.Header) []Challenge {
function parseValueAndParams (line 155) | func parseValueAndParams(header string) (value string, params map[string...
function skipSpace (line 184) | func skipSpace(s string) (rest string) {
function expectToken (line 194) | func expectToken(s string) (token, rest string) {
function expectTokenOrQuoted (line 204) | func expectTokenOrQuoted(s string) (value string, rest string) {
FILE: vendor/github.com/docker/docker-credential-helpers/client/client.go
function isValidCredsMessage (line 15) | func isValidCredsMessage(msg string) error {
function Store (line 26) | func Store(program ProgramFunc, creds *credentials.Credentials) error {
function Get (line 47) | func Get(program ProgramFunc, serverURL string) (*credentials.Credential...
function Erase (line 76) | func Erase(program ProgramFunc, serverURL string) error {
function List (line 94) | func List(program ProgramFunc) (map[string]string, error) {
FILE: vendor/github.com/docker/docker-credential-helpers/client/command.go
type Program (line 10) | type Program interface
type ProgramFunc (line 16) | type ProgramFunc
function NewShellProgramFunc (line 19) | func NewShellProgramFunc(command string) ProgramFunc {
function NewShellProgramFuncWithEnv (line 27) | func NewShellProgramFuncWithEnv(command string, env *map[string]string) ...
function createProgramCmdRedirectErr (line 33) | func createProgramCmdRedirectErr(command string, args []string, env *map...
type Shell (line 45) | type Shell struct
method Output (line 50) | func (s *Shell) Output() ([]byte, error) {
method Input (line 55) | func (s *Shell) Input(in io.Reader) {
FILE: vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go
constant ActionStore (line 20) | ActionStore Action = "store"
constant ActionGet (line 21) | ActionGet Action = "get"
constant ActionErase (line 22) | ActionErase Action = "erase"
constant ActionList (line 23) | ActionList Action = "list"
constant ActionVersion (line 24) | ActionVersion Action = "version"
type Credentials (line 28) | type Credentials struct
method isValid (line 38) | func (c *Credentials) isValid() (bool, error) {
function SetCredsLabel (line 56) | func SetCredsLabel(label string) {
function Serve (line 65) | func Serve(helper Helper) {
function usage (line 86) | func usage() string {
function HandleCommand (line 91) | func HandleCommand(helper Helper, action Action, in io.Reader, out io.Wr...
function Store (line 110) | func Store(helper Helper, reader io.Reader) error {
function Get (line 137) | func Get(helper Helper, reader io.Reader, writer io.Writer) error {
function Erase (line 175) | func Erase(helper Helper, reader io.Reader) error {
function List (line 197) | func List(helper Helper, writer io.Writer) error {
function PrintVersion (line 206) | func PrintVersion(writer io.Writer) error {
FILE: vendor/github.com/docker/docker-credential-helpers/credentials/error.go
constant errCredentialsNotFoundMessage (line 11) | errCredentialsNotFoundMessage = "credentials not found in native keychain"
constant errCredentialsMissingServerURLMessage (line 15) | errCredentialsMissingServerURLMessage = "no credentials server URL"
constant errCredentialsMissingUsernameMessage (line 16) | errCredentialsMissingUsernameMessage = "no credentials username"
type errCredentialsNotFound (line 21) | type errCredentialsNotFound struct
method Error (line 25) | func (errCredentialsNotFound) Error() string {
method NotFound (line 32) | func (errCredentialsNotFound) NotFound() {}
function NewErrCredentialsNotFound (line 36) | func NewErrCredentialsNotFound() error {
function IsErrCredentialsNotFound (line 42) | func IsErrCredentialsNotFound(err error) bool {
function IsErrCredentialsNotFoundMessage (line 52) | func IsErrCredentialsNotFoundMessage(err string) bool {
type errCredentialsMissingServerURL (line 60) | type errCredentialsMissingServerURL struct
method Error (line 62) | func (errCredentialsMissingServerURL) Error() string {
method InvalidParameter (line 70) | func (errCredentialsMissingServerURL) InvalidParameter() {}
type errCredentialsMissingUsername (line 76) | type errCredentialsMissingUsername struct
method Error (line 78) | func (errCredentialsMissingUsername) Error() string {
method InvalidParameter (line 86) | func (errCredentialsMissingUsername) InvalidParameter() {}
function NewErrCredentialsMissingServerURL (line 90) | func NewErrCredentialsMissingServerURL() error {
function NewErrCredentialsMissingUsername (line 96) | func NewErrCredentialsMissingUsername() error {
function IsCredentialsMissingServerURL (line 102) | func IsCredentialsMissingServerURL(err error) bool {
function IsCredentialsMissingServerURLMessage (line 109) | func IsCredentialsMissingServerURLMessage(err string) bool {
function IsCredentialsMissingUsername (line 115) | func IsCredentialsMissingUsername(err error) bool {
function IsCredentialsMissingUsernameMessage (line 122) | func IsCredentialsMissingUsernameMessage(err string) bool {
FILE: vendor/github.com/docker/docker-credential-helpers/credentials/helper.go
type Helper (line 4) | type Helper interface
FILE: vendor/github.com/google/go-containerregistry/internal/and/and_closer.go
type ReadCloser (line 24) | type ReadCloser struct
method Close (line 32) | func (rac *ReadCloser) Close() error {
type WriteCloser (line 38) | type WriteCloser struct
method Close (line 46) | func (wac *WriteCloser) Close() error {
FILE: vendor/github.com/google/go-containerregistry/internal/compression/compression.go
function GetCompression (line 32) | func GetCompression(opener Opener) (compression.Compression, error) {
function PeekCompression (line 52) | func PeekCompression(r io.Reader) (compression.Compression, PeekReader, ...
type PeekReader (line 71) | type PeekReader interface
function intoPeekReader (line 78) | func intoPeekReader(r io.Reader) PeekReader {
function checkHeader (line 87) | func checkHeader(pr PeekReader, expectedHeader []byte) (bool, PeekReader...
FILE: vendor/github.com/google/go-containerregistry/internal/estargz/estargz.go
function ReadCloser (line 37) | func ReadCloser(r io.ReadCloser, opts ...estargz.Option) (*estargz.Blob,...
FILE: vendor/github.com/google/go-containerregistry/internal/gzip/zip.go
function ReadCloser (line 33) | func ReadCloser(r io.ReadCloser) io.ReadCloser {
function ReadCloserLevel (line 41) | func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser {
function UnzipReadCloser (line 89) | func UnzipReadCloser(r io.ReadCloser) (io.ReadCloser, error) {
function Is (line 108) | func Is(r io.Reader) (bool, error) {
FILE: vendor/github.com/google/go-containerregistry/internal/redact/redact.go
type contextKey (line 24) | type contextKey
function NewContext (line 29) | func NewContext(ctx context.Context, reason string) context.Context {
function FromContext (line 34) | func FromContext(ctx context.Context) (bool, string) {
function Error (line 43) | func Error(err error) error {
function URL (line 76) | func URL(u *url.URL) string {
FILE: vendor/github.com/google/go-containerregistry/internal/retry/retry.go
type temporary (line 34) | type temporary interface
function IsTemporary (line 39) | func IsTemporary(err error) bool {
function IsNotNil (line 50) | func IsNotNil(err error) bool {
type Predicate (line 55) | type Predicate
function Retry (line 60) | func Retry(f func() error, p Predicate, backoff wait.Backoff) (err error) {
type contextKey (line 80) | type contextKey
function Never (line 87) | func Never(ctx context.Context) context.Context {
function Ever (line 92) | func Ever(ctx context.Context) bool {
FILE: vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.go
function Jitter (line 32) | func Jitter(duration time.Duration, maxFactor float64) time.Duration {
type ConditionFunc (line 45) | type ConditionFunc
type Backoff (line 48) | type Backoff struct
method Step (line 76) | func (b *Backoff) Step() time.Duration {
function ExponentialBackoff (line 112) | func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
FILE: vendor/github.com/google/go-containerregistry/internal/verify/verify.go
constant SizeUnknown (line 32) | SizeUnknown = -1
type verifyReader (line 34) | type verifyReader struct
method Read (line 54) | func (vc *verifyReader) Read(b []byte) (int, error) {
type Error (line 42) | type Error struct
method Error (line 48) | func (v Error) Error() string {
function ReadCloser (line 82) | func ReadCloser(r io.ReadCloser, size int64, h v1.Hash) (io.ReadCloser, ...
function Descriptor (line 105) | func Descriptor(d v1.Descriptor) error {
FILE: vendor/github.com/google/go-containerregistry/internal/windows/windows.go
constant userOwnerAndGroupSID (line 35) | userOwnerAndGroupSID = "AQAAgBQAAAAkAAAAAAAAAAAAAAABAgAAAAAABSAAAAAhAgAA...
function Windows (line 38) | func Windows(layer v1.Layer) (v1.Layer, error) {
FILE: vendor/github.com/google/go-containerregistry/internal/zstd/zstd.go
function ReadCloser (line 33) | func ReadCloser(r io.ReadCloser) io.ReadCloser {
function ReadCloserLevel (line 39) | func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser {
function UnzipReadCloser (line 87) | func UnzipReadCloser(r io.ReadCloser) (io.ReadCloser, error) {
function Is (line 106) | func Is(r io.Reader) (bool, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/anon.go
type anonymous (line 18) | type anonymous struct
method Authorization (line 21) | func (a *anonymous) Authorization() (*AuthConfig, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/auth.go
type auth (line 18) | type auth struct
method Authorization (line 28) | func (a *auth) Authorization() (*AuthConfig, error) {
function FromConfig (line 23) | func FromConfig(cfg AuthConfig) Authenticator {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/authn.go
type Authenticator (line 26) | type Authenticator interface
type ContextAuthenticator (line 32) | type ContextAuthenticator interface
function Authorization (line 39) | func Authorization(ctx context.Context, authn Authenticator) (*AuthConfi...
type AuthConfig (line 49) | type AuthConfig struct
method UnmarshalJSON (line 67) | func (a *AuthConfig) UnmarshalJSON(data []byte) error {
method MarshalJSON (line 90) | func (a AuthConfig) MarshalJSON() ([]byte, error) {
type authConfig (line 64) | type authConfig
function decodeDockerConfigFieldAuth (line 102) | func decodeDockerConfigFieldAuth(field string) (username, password strin...
function encodeDockerConfigFieldAuth (line 130) | func encodeDockerConfigFieldAuth(username, password string) string {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/basic.go
type Basic (line 18) | type Basic struct
method Authorization (line 24) | func (b *Basic) Authorization() (*AuthConfig, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go
type Bearer (line 18) | type Bearer struct
method Authorization (line 23) | func (b *Bearer) Authorization() (*AuthConfig, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go
type Resource (line 32) | type Resource interface
type Keychain (line 44) | type Keychain interface
type ContextKeychain (line 50) | type ContextKeychain interface
type defaultKeychain (line 56) | type defaultKeychain struct
method Resolve (line 82) | func (dk *defaultKeychain) Resolve(target Resource) (Authenticator, er...
method ResolveContext (line 87) | func (dk *defaultKeychain) ResolveContext(_ context.Context, target Re...
constant DefaultAuthKey (line 68) | DefaultAuthKey = "https://" + name.DefaultRegistry + "/v1/"
function Resolve (line 73) | func Resolve(ctx context.Context, keychain Keychain, target Resource) (A...
function fileExists (line 182) | func fileExists(path string) bool {
type Helper (line 192) | type Helper interface
function NewKeychainFromHelper (line 199) | func NewKeychainFromHelper(h Helper) Keychain { return wrapper{h} }
type wrapper (line 201) | type wrapper struct
method Resolve (line 203) | func (w wrapper) Resolve(r Resource) (Authenticator, error) {
method ResolveContext (line 207) | func (w wrapper) ResolveContext(_ context.Context, r Resource) (Authen...
function RefreshingKeychain (line 220) | func RefreshingKeychain(inner Keychain, duration time.Duration) Keychain {
type refreshingKeychain (line 227) | type refreshingKeychain struct
method Resolve (line 233) | func (r *refreshingKeychain) Resolve(target Resource) (Authenticator, ...
method ResolveContext (line 237) | func (r *refreshingKeychain) ResolveContext(ctx context.Context, targe...
type refreshing (line 253) | type refreshing struct
method Authorization (line 267) | func (r *refreshing) Authorization() (*AuthConfig, error) {
method AuthorizationContext (line 271) | func (r *refreshing) AuthorizationContext(ctx context.Context) (*AuthC...
method now (line 285) | func (r *refreshing) now() time.Time {
method expired (line 292) | func (r *refreshing) expired() bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.go
type multiKeychain (line 19) | type multiKeychain struct
method Resolve (line 32) | func (mk *multiKeychain) Resolve(target Resource) (Authenticator, erro...
method ResolveContext (line 36) | func (mk *multiKeychain) ResolveContext(ctx context.Context, target Re...
function NewMultiKeychain (line 27) | func NewMultiKeychain(kcs ...Keychain) Keychain {
FILE: vendor/github.com/google/go-containerregistry/pkg/compression/compression.go
type Compression (line 19) | type Compression
constant None (line 23) | None Compression = "none"
constant GZip (line 24) | GZip Compression = "gzip"
constant ZStd (line 25) | ZStd Compression = "zstd"
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/append.go
function isWindows (line 31) | func isWindows(img v1.Image) (bool, error) {
function Append (line 44) | func Append(base v1.Image, paths ...string) (v1.Image, error) {
function getLayer (line 84) | func getLayer(path string, layerType types.MediaType) (v1.Layer, error) {
function streamFile (line 115) | func streamFile(path string) (*os.File, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/catalog.go
function Catalog (line 25) | func Catalog(src string, opt ...Option) (res []string, err error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/config.go
function Config (line 18) | func Config(ref string, opt ...Option) ([]byte, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/copy.go
function Copy (line 34) | func Copy(src, dst string, opt ...Option) error {
function CopyRepository (line 94) | func CopyRepository(src, dst string, opt ...Option) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/delete.go
function Delete (line 25) | func Delete(src string, opt ...Option) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/digest.go
function Digest (line 20) | func Digest(ref string, opt ...Option) (string, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/export.go
function Export (line 27) | func Export(img v1.Image, w io.Writer) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/filemap.go
function Layer (line 31) | func Layer(filemap map[string][]byte) (v1.Layer, error) {
function Image (line 65) | func Image(filemap map[string][]byte) (v1.Image, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/get.go
function getImage (line 25) | func getImage(r string, opt ...Option) (v1.Image, name.Reference, error) {
function getManifest (line 38) | func getManifest(r string, opt ...Option) (*remote.Descriptor, error) {
function Get (line 48) | func Get(r string, opt ...Option) (*remote.Descriptor, error) {
function Head (line 54) | func Head(r string, opt ...Option) (*v1.Descriptor, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/list.go
function ListTags (line 25) | func ListTags(src string, opt ...Option) ([]string, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go
function Manifest (line 18) | func Manifest(ref string, opt ...Option) ([]byte, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/options.go
type Options (line 29) | type Options struct
function GetOptions (line 47) | func GetOptions(opts ...Option) Options {
function makeOptions (line 51) | func makeOptions(opts ...Option) Options {
type Option (line 82) | type Option
function WithTransport (line 87) | func WithTransport(t http.RoundTripper) Option {
function Insecure (line 97) | func Insecure(o *Options) {
function WithPlatform (line 103) | func WithPlatform(platform *v1.Platform) Option {
function WithAuthFromKeychain (line 117) | func WithAuthFromKeychain(keys authn.Keychain) Option {
function WithAuth (line 129) | func WithAuth(auth authn.Authenticator) Option {
function WithUserAgent (line 139) | func WithUserAgent(ua string) Option {
function WithNondistributable (line 147) | func WithNondistributable() Option {
function WithContext (line 154) | func WithContext(ctx context.Context) Option {
function WithJobs (line 164) | func WithJobs(jobs int) Option {
function WithNoClobber (line 174) | func WithNoClobber(noclobber bool) Option {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/pull.go
constant iWasADigestTag (line 33) | iWasADigestTag = "i-was-a-digest"
function Pull (line 36) | func Pull(src string, opt ...Option) (v1.Image, error) {
function Save (line 47) | func Save(img v1.Image, src, path string) error {
function MultiSave (line 53) | func MultiSave(imgMap map[string]v1.Image, path string, opt ...Option) e...
function PullLayer (line 82) | func PullLayer(ref string, opt ...Option) (v1.Layer, error) {
function SaveLegacy (line 93) | func SaveLegacy(img v1.Image, src, path string) error {
function MultiSaveLegacy (line 99) | func MultiSaveLegacy(imgMap map[string]v1.Image, path string) error {
function SaveOCI (line 121) | func SaveOCI(img v1.Image, path string) error {
function MultiSaveOCI (line 128) | func MultiSaveOCI(imgMap map[string]v1.Image, path string) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/push.go
function Load (line 27) | func Load(path string, opt ...Option) (v1.Image, error) {
function LoadTag (line 33) | func LoadTag(path, tag string, opt ...Option) (v1.Image, error) {
function Push (line 47) | func Push(img v1.Image, dst string, opt ...Option) error {
function Upload (line 57) | func Upload(layer v1.Layer, repo string, opt ...Option) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/crane/tag.go
function Tag (line 25) | func Tag(img, tag string, opt ...Option) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/legacy/config.go
type LayerConfigFile (line 24) | type LayerConfigFile struct
FILE: vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/write.go
type repositoriesTarDescriptor (line 34) | type repositoriesTarDescriptor
type v1Layer (line 37) | type v1Layer struct
method json (line 45) | func (l *v1Layer) json() ([]byte, error) {
method version (line 50) | func (l *v1Layer) version() []byte {
function v1LayerID (line 55) | func v1LayerID(layer v1.Layer, parentID string, rawConfig []byte) (strin...
function newV1Layer (line 70) | func newV1Layer(layer v1.Layer, parent *v1Layer, history v1.History) (*v...
function newTopV1Layer (line 99) | func newTopV1Layer(layer v1.Layer, parent *v1Layer, history v1.History, ...
function splitTag (line 120) | func splitTag(name string) (string, string) {
function addTags (line 133) | func addTags(repos repositoriesTarDescriptor, tags []string, topLayerID ...
function updateLayerSources (line 146) | func updateLayerSources(layerSources map[v1.Hash]v1.Descriptor, layer v1...
function Write (line 167) | func Write(ref name.Reference, img v1.Image, w io.Writer) error {
function filterEmpty (line 173) | func filterEmpty(h []v1.History) []v1.History {
function MultiWrite (line 195) | func MultiWrite(refToImage map[name.Reference]v1.Image, w io.Writer) err...
function dedupRefToImage (line 319) | func dedupRefToImage(refToImage map[name.Reference]v1.Image) ([]v1.Image...
function writeTarEntry (line 359) | func writeTarEntry(tf *tar.Writer, path string, r io.Reader, size int64)...
FILE: vendor/github.com/google/go-containerregistry/pkg/logs/logs.go
function Enabled (line 37) | func Enabled(l *log.Logger) bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/check.go
function stripRunesFn (line 24) | func stripRunesFn(runes string) func(rune) rune {
function checkElement (line 35) | func checkElement(name, element, allowedRunes string, minRunes, maxRunes...
FILE: vendor/github.com/google/go-containerregistry/pkg/name/digest.go
constant digestDelim (line 27) | digestDelim = "@"
type Digest (line 30) | type Digest struct
method Context (line 43) | func (d Digest) Context() Repository {
method Identifier (line 48) | func (d Digest) Identifier() string {
method DigestStr (line 53) | func (d Digest) DigestStr() string {
method Name (line 58) | func (d Digest) Name() string {
method String (line 63) | func (d Digest) String() string {
method MarshalJSON (line 68) | func (d Digest) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 73) | func (d *Digest) UnmarshalJSON(data []byte) error {
method MarshalText (line 87) | func (d Digest) MarshalText() ([]byte, error) {
method UnmarshalText (line 92) | func (d *Digest) UnmarshalText(data []byte) error {
function NewDigest (line 102) | func NewDigest(name string, opts ...Option) (Digest, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/errors.go
type ErrBadName (line 23) | type ErrBadName struct
method Error (line 27) | func (e *ErrBadName) Error() string {
method Is (line 32) | func (e *ErrBadName) Is(target error) bool {
function newErrBadName (line 38) | func newErrBadName(fmtStr string, args ...any) *ErrBadName {
function IsErrBadName (line 45) | func IsErrBadName(err error) bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/options.go
constant DefaultRegistry (line 20) | DefaultRegistry = "index.docker.io"
constant defaultRegistryAlias (line 21) | defaultRegistryAlias = "docker.io"
constant DefaultTag (line 25) | DefaultTag = "latest"
type options (line 28) | type options struct
function makeOptions (line 35) | func makeOptions(opts ...Option) options {
type Option (line 47) | type Option
function StrictValidation (line 52) | func StrictValidation(opts *options) {
function WeakValidation (line 58) | func WeakValidation(opts *options) {
function Insecure (line 63) | func Insecure(opts *options) {
type OptionFn (line 68) | type OptionFn
function WithDefaultRegistry (line 72) | func WithDefaultRegistry(r string) Option {
function WithDefaultTag (line 79) | func WithDefaultTag(t string) Option {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/ref.go
type Reference (line 23) | type Reference interface
function ParseReference (line 40) | func ParseReference(s string, opts ...Option) (Reference, error) {
type stringConst (line 50) | type stringConst
function MustParseReference (line 69) | func MustParseReference(s stringConst, opts ...Option) Reference {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/registry.go
type Registry (line 37) | type Registry struct
method RegistryStr (line 48) | func (r Registry) RegistryStr() string {
method Name (line 53) | func (r Registry) Name() string {
method String (line 57) | func (r Registry) String() string {
method Repo (line 62) | func (r Registry) Repo(repo ...string) Repository {
method Scope (line 67) | func (r Registry) Scope(string) string {
method isRFC1918 (line 72) | func (r Registry) isRFC1918() bool {
method Scheme (line 88) | func (r Registry) Scheme() string {
method MarshalJSON (line 152) | func (r Registry) MarshalJSON() ([]byte, error) { return json.Marshal(...
method UnmarshalJSON (line 155) | func (r *Registry) UnmarshalJSON(data []byte) error {
method MarshalText (line 169) | func (r Registry) MarshalText() ([]byte, error) { return []byte(r.Stri...
method UnmarshalText (line 172) | func (r *Registry) UnmarshalText(data []byte) error {
function checkRegistry (line 110) | func checkRegistry(name string) error {
function NewRegistry (line 121) | func NewRegistry(name string, opts ...Option) (Registry, error) {
function NewInsecureRegistry (line 146) | func NewInsecureRegistry(name string, opts ...Option) (Registry, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/repository.go
constant defaultNamespace (line 25) | defaultNamespace = "library"
constant repositoryChars (line 26) | repositoryChars = "abcdefghijklmnopqrstuvwxyz0123456789_-./"
constant regRepoDelimiter (line 27) | regRepoDelimiter = "/"
type Repository (line 31) | type Repository struct
method RepositoryStr (line 47) | func (r Repository) RepositoryStr() string {
method Name (line 55) | func (r Repository) Name() string {
method String (line 64) | func (r Repository) String() string {
method Scope (line 70) | func (r Repository) Scope(action string) string {
method Tag (line 111) | func (r Repository) Tag(identifier string) Tag {
method Digest (line 121) | func (r Repository) Digest(identifier string) Digest {
method MarshalJSON (line 131) | func (r Repository) MarshalJSON() ([]byte, error) { return json.Marsha...
method UnmarshalJSON (line 134) | func (r *Repository) UnmarshalJSON(data []byte) error {
method MarshalText (line 148) | func (r Repository) MarshalText() ([]byte, error) { return []byte(r.St...
method UnmarshalText (line 151) | func (r *Repository) UnmarshalText(data []byte) error {
function hasImplicitNamespace (line 42) | func hasImplicitNamespace(repo string, reg Registry) bool {
function checkRepository (line 74) | func checkRepository(repository string) error {
function NewRepository (line 79) | func NewRepository(name string, opts ...Option) (Repository, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/name/tag.go
constant tagChars (line 25) | tagChars = "abcdefghijklmnopqrstuvwxyz0123456789_-.ABCDEFGHIJKLMNOPQRSTU...
constant tagDelim (line 26) | tagDelim = ":"
type Tag (line 30) | type Tag struct
method Context (line 43) | func (t Tag) Context() Repository {
method Identifier (line 48) | func (t Tag) Identifier() string {
method TagStr (line 53) | func (t Tag) TagStr() string {
method Name (line 58) | func (t Tag) Name() string {
method String (line 63) | func (t Tag) String() string {
method Scope (line 68) | func (t Tag) Scope(action string) string {
method MarshalJSON (line 119) | func (t Tag) MarshalJSON() ([]byte, error) { return json.Marshal(t.Str...
method UnmarshalJSON (line 122) | func (t *Tag) UnmarshalJSON(data []byte) error {
method MarshalText (line 136) | func (t Tag) MarshalText() ([]byte, error) { return []byte(t.String())...
method UnmarshalText (line 139) | func (t *Tag) UnmarshalText(data []byte) error {
function checkTag (line 72) | func checkTag(name string) error {
function NewTag (line 77) | func NewTag(name string, opts ...Option) (Tag, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/config.go
type ConfigFile (line 29) | type ConfigFile struct
method Platform (line 46) | func (cf *ConfigFile) Platform() *Platform {
type History (line 60) | type History struct
type Time (line 69) | type Time struct
method DeepCopyInto (line 76) | func (t *Time) DeepCopyInto(out *Time) {
type RootFS (line 82) | type RootFS struct
type HealthConfig (line 88) | type HealthConfig struct
type Config (line 118) | type Config struct
function ParseConfigFile (line 146) | func ParseConfigFile(r io.Reader) (*ConfigFile, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go
type emptyImage (line 28) | type emptyImage struct
method MediaType (line 31) | func (i emptyImage) MediaType() (types.MediaType, error) {
method RawConfigFile (line 36) | func (i emptyImage) RawConfigFile() ([]byte, error) {
method ConfigFile (line 41) | func (i emptyImage) ConfigFile() (*v1.ConfigFile, error) {
method LayerByDiffID (line 50) | func (i emptyImage) LayerByDiffID(h v1.Hash) (partial.UncompressedLaye...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go
type emptyIndex (line 29) | type emptyIndex struct
method MediaType (line 31) | func (i emptyIndex) MediaType() (types.MediaType, error) {
method Digest (line 35) | func (i emptyIndex) Digest() (v1.Hash, error) {
method Size (line 39) | func (i emptyIndex) Size() (int64, error) {
method IndexManifest (line 43) | func (i emptyIndex) IndexManifest() (*v1.IndexManifest, error) {
method RawManifest (line 47) | func (i emptyIndex) RawManifest() ([]byte, error) {
method Image (line 51) | func (i emptyIndex) Image(v1.Hash) (v1.Image, error) {
method ImageIndex (line 55) | func (i emptyIndex) ImageIndex(v1.Hash) (v1.ImageIndex, error) {
function base (line 59) | func base() *v1.IndexManifest {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/hash.go
type Hash (line 29) | type Hash struct
method String (line 43) | func (h Hash) String() string {
method MarshalJSON (line 57) | func (h Hash) MarshalJSON() ([]byte, error) { return json.Marshal(h.St...
method UnmarshalJSON (line 60) | func (h *Hash) UnmarshalJSON(data []byte) error {
method MarshalText (line 70) | func (h Hash) MarshalText() ([]byte, error) { return []byte(h.String()...
method UnmarshalText (line 74) | func (h *Hash) UnmarshalText(text []byte) error { return h.parse(strin...
method parse (line 86) | func (h *Hash) parse(unquoted string) error {
function NewHash (line 48) | func NewHash(s string) (Hash, error) {
function Hasher (line 77) | func Hasher(name string) (hash.Hash, error) {
function SHA256 (line 120) | func SHA256(r io.Reader) (Hash, int64, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/image.go
type Image (line 22) | type Image interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/index.go
type ImageIndex (line 22) | type ImageIndex interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layer.go
type Layer (line 24) | type Layer interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/blob.go
method Blob (line 25) | func (l Path) Blob(h v1.Hash) (io.ReadCloser, error) {
method Bytes (line 31) | func (l Path) Bytes(h v1.Hash) ([]byte, error) {
method blobPath (line 35) | func (l Path) blobPath(h v1.Hash) string {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/gc.go
method GarbageCollect (line 32) | func (l Path) GarbageCollect() ([]v1.Hash, error) {
method garbageCollectImageIndex (line 75) | func (l Path) garbageCollectImageIndex(index v1.ImageIndex, blobsToKeep ...
method garbageCollectImage (line 112) | func (l Path) garbageCollectImage(image v1.Image, blobsToKeep map[string...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/image.go
type layoutImage (line 28) | type layoutImage struct
method MediaType (line 47) | func (li *layoutImage) MediaType() (types.MediaType, error) {
method Manifest (line 52) | func (li *layoutImage) Manifest() (*v1.Manifest, error) {
method RawManifest (line 56) | func (li *layoutImage) RawManifest() ([]byte, error) {
method RawConfigFile (line 72) | func (li *layoutImage) RawConfigFile() ([]byte, error) {
method LayerByDigest (line 81) | func (li *layoutImage) LayerByDigest(h v1.Hash) (partial.CompressedLay...
method Image (line 38) | func (l Path) Image(h v1.Hash) (v1.Image, error) {
type compressedBlob (line 106) | type compressedBlob struct
method Digest (line 111) | func (b *compressedBlob) Digest() (v1.Hash, error) {
method Compressed (line 115) | func (b *compressedBlob) Compressed() (io.ReadCloser, error) {
method Size (line 119) | func (b *compressedBlob) Size() (int64, error) {
method MediaType (line 123) | func (b *compressedBlob) MediaType() (types.MediaType, error) {
method Descriptor (line 128) | func (b *compressedBlob) Descriptor() (*v1.Descriptor, error) {
method Exists (line 133) | func (b *compressedBlob) Exists() (bool, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/index.go
type layoutIndex (line 31) | type layoutIndex struct
method MediaType (line 62) | func (i *layoutIndex) MediaType() (types.MediaType, error) {
method Digest (line 66) | func (i *layoutIndex) Digest() (v1.Hash, error) {
method Size (line 70) | func (i *layoutIndex) Size() (int64, error) {
method IndexManifest (line 74) | func (i *layoutIndex) IndexManifest() (*v1.IndexManifest, error) {
method RawManifest (line 80) | func (i *layoutIndex) RawManifest() ([]byte, error) {
method Image (line 84) | func (i *layoutIndex) Image(h v1.Hash) (v1.Image, error) {
method ImageIndex (line 102) | func (i *layoutIndex) ImageIndex(h v1.Hash) (v1.ImageIndex, error) {
method Blob (line 125) | func (i *layoutIndex) Blob(h v1.Hash) (io.ReadCloser, error) {
method findDescriptor (line 129) | func (i *layoutIndex) findDescriptor(h v1.Hash) (*v1.Descriptor, error) {
function ImageIndexFromPath (line 38) | func ImageIndexFromPath(path string) (v1.ImageIndex, error) {
method ImageIndex (line 47) | func (l Path) ImageIndex() (v1.ImageIndex, error) {
function isExpectedMediaType (line 154) | func isExpectedMediaType(mt types.MediaType, expected ...types.MediaType...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go
type Path (line 20) | type Path
method path (line 22) | func (l Path) path(elem ...string) string {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/options.go
type Option (line 20) | type Option
type options (line 22) | type options struct
function makeOptions (line 26) | func makeOptions(opts ...Option) *options {
type descriptorOption (line 36) | type descriptorOption
function WithAnnotations (line 39) | func WithAnnotations(annotations map[string]string) Option {
function WithURLs (line 53) | func WithURLs(urls []string) Option {
function WithPlatform (line 65) | func WithPlatform(platform v1.Platform) Option {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go
function FromPath (line 23) | func FromPath(path string) (Path, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go
method AppendImage (line 47) | func (l Path) AppendImage(img v1.Image, options ...Option) error {
method AppendIndex (line 67) | func (l Path) AppendIndex(ii v1.ImageIndex, options ...Option) error {
method AppendDescriptor (line 86) | func (l Path) AppendDescriptor(desc v1.Descriptor) error {
method ReplaceImage (line 109) | func (l Path) ReplaceImage(img v1.Image, matcher match.Matcher, options ...
method ReplaceIndex (line 119) | func (l Path) ReplaceIndex(ii v1.ImageIndex, matcher match.Matcher, opti...
method replaceDescriptor (line 129) | func (l Path) replaceDescriptor(appendable mutate.Appendable, matcher ma...
method RemoveDescriptors (line 165) | func (l Path) RemoveDescriptors(matcher match.Matcher) error {
method WriteFile (line 189) | func (l Path) WriteFile(name string, data []byte, perm os.FileMode) error {
method WriteBlob (line 199) | func (l Path) WriteBlob(hash v1.Hash, r io.ReadCloser) error {
method writeBlob (line 203) | func (l Path) writeBlob(hash v1.Hash, size int64, rc io.ReadCloser, rena...
method writeLayer (line 281) | func (l Path) writeLayer(layer v1.Layer) error {
method RemoveBlob (line 322) | func (l Path) RemoveBlob(hash v1.Hash) error {
method WriteImage (line 337) | func (l Path) WriteImage(img v1.Image) error {
type withLayer (line 381) | type withLayer interface
type withBlob (line 385) | type withBlob interface
method writeIndexToFile (line 389) | func (l Path) writeIndexToFile(indexFile string, ii v1.ImageIndex) error {
method WriteIndex (line 454) | func (l Path) WriteIndex(ii v1.ImageIndex) error {
function Write (line 482) | func Write(path string, ii v1.ImageIndex) (Path, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go
type Manifest (line 25) | type Manifest struct
type IndexManifest (line 35) | type IndexManifest struct
type Descriptor (line 44) | type Descriptor struct
function ParseManifest (line 56) | func ParseManifest(r io.Reader) (*Manifest, error) {
function ParseIndexManifest (line 65) | func ParseIndexManifest(r io.Reader) (*IndexManifest, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/match/match.go
type Matcher (line 25) | type Matcher
function Name (line 32) | func Name(name string) Matcher {
function Annotation (line 37) | func Annotation(key, value string) Matcher {
function Platforms (line 51) | func Platforms(platforms ...v1.Platform) Matcher {
function MediaTypes (line 66) | func MediaTypes(mediaTypes ...string) Matcher {
function Digests (line 83) | func Digests(digests ...v1.Hash) Matcher {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.go
type image (line 29) | type image struct
method MediaType (line 48) | func (i *image) MediaType() (types.MediaType, error) {
method compute (line 55) | func (i *image) compute() error {
method Layers (line 175) | func (i *image) Layers() ([]v1.Layer, error) {
method ConfigName (line 208) | func (i *image) ConfigName() (v1.Hash, error) {
method ConfigFile (line 216) | func (i *image) ConfigFile() (*v1.ConfigFile, error) {
method RawConfigFile (line 224) | func (i *image) RawConfigFile() ([]byte, error) {
method Digest (line 232) | func (i *image) Digest() (v1.Hash, error) {
method Size (line 240) | func (i *image) Size() (int64, error) {
method Manifest (line 248) | func (i *image) Manifest() (*v1.Manifest, error) {
method RawManifest (line 256) | func (i *image) RawManifest() ([]byte, error) {
method LayerByDigest (line 265) | func (i *image) LayerByDigest(h v1.Hash) (v1.Layer, error) {
method LayerByDiffID (line 279) | func (i *image) LayerByDiffID(h v1.Hash) (v1.Layer, error) {
function validate (line 286) | func validate(adds []Addendum) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go
function computeDescriptor (line 31) | func computeDescriptor(ia IndexAddendum) (*v1.Descriptor, error) {
type index (line 63) | type index struct
method MediaType (line 83) | func (i *index) MediaType() (types.MediaType, error) {
method Size (line 90) | func (i *index) Size() (int64, error) { return partial.Size(i) }
method compute (line 92) | func (i *index) compute() error {
method Image (line 161) | func (i *index) Image(h v1.Hash) (v1.Image, error) {
method ImageIndex (line 168) | func (i *index) ImageIndex(h v1.Hash) (v1.ImageIndex, error) {
method Layer (line 180) | func (i *index) Layer(h v1.Hash) (v1.Layer, error) {
method Digest (line 191) | func (i *index) Digest() (v1.Hash, error) {
method IndexManifest (line 199) | func (i *index) IndexManifest() (*v1.IndexManifest, error) {
method RawManifest (line 207) | func (i *index) RawManifest() ([]byte, error) {
method Manifests (line 214) | func (i *index) Manifests() ([]partial.Describable, error) {
type withLayer (line 175) | type withLayer interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go
constant whiteoutPrefix (line 38) | whiteoutPrefix = ".wh."
type Addendum (line 42) | type Addendum struct
function AppendLayers (line 51) | func AppendLayers(base v1.Image, layers ...v1.Layer) (v1.Image, error) {
function Append (line 61) | func Append(base v1.Image, adds ...Addendum) (v1.Image, error) {
type Appendable (line 78) | type Appendable interface
type IndexAddendum (line 86) | type IndexAddendum struct
function AppendManifests (line 92) | func AppendManifests(base v1.ImageIndex, adds ...IndexAddendum) v1.Image...
function RemoveManifests (line 100) | func RemoveManifests(base v1.ImageIndex, matcher match.Matcher) v1.Image...
function Config (line 108) | func Config(base v1.Image, cfg v1.Config) (v1.Image, error) {
function Subject (line 132) | func Subject(f partial.WithRawManifest, subject v1.Descriptor) partial.W...
function Annotations (line 165) | func Annotations(f partial.WithRawManifest, anns map[string]string) part...
type arbitraryRawManifest (line 181) | type arbitraryRawManifest struct
method RawManifest (line 187) | func (a arbitraryRawManifest) RawManifest() ([]byte, error) {
function ConfigFile (line 214) | func ConfigFile(base v1.Image, cfg *v1.ConfigFile) (v1.Image, error) {
function CreatedAt (line 230) | func CreatedAt(base v1.Image, created v1.Time) (v1.Image, error) {
function Extract (line 250) | func Extract(img v1.Image) io.ReadCloser {
function extract (line 265) | func extract(img v1.Image, w io.Writer) error {
function inWhiteoutDir (line 347) | func inWhiteoutDir(fileMap map[string]bool, file string) bool {
function Time (line 362) | func Time(img v1.Image, t time.Time) (v1.Image, error) {
function layerTime (line 440) | func layerTime(layer v1.Layer, t time.Time) (v1.Layer, error) {
function Canonical (line 499) | func Canonical(img v1.Image) (v1.Image, error) {
function MediaType (line 523) | func MediaType(img v1.Image, mt types.MediaType) v1.Image {
function ConfigMediaType (line 533) | func ConfigMediaType(img v1.Image, mt types.MediaType) v1.Image {
function IndexMediaType (line 541) | func IndexMediaType(idx v1.ImageIndex, mt types.MediaType) v1.ImageIndex {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.go
function Rebase (line 25) | func Rebase(orig, oldBase, newBase v1.Image) (v1.Image, error) {
function createAddendums (line 116) | func createAddendums(startHistory, startLayer int, history []v1.History,...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.go
type CompressedLayer (line 31) | type CompressedLayer interface
type compressedLayerExtender (line 46) | type compressedLayerExtender struct
method Uncompressed (line 51) | func (cle *compressedLayerExtender) Uncompressed() (io.ReadCloser, err...
method DiffID (line 81) | func (cle *compressedLayerExtender) DiffID() (v1.Hash, error) {
function CompressedToLayer (line 97) | func CompressedToLayer(ul CompressedLayer) (v1.Layer, error) {
type CompressedImageCore (line 103) | type CompressedImageCore interface
type compressedImageExtender (line 116) | type compressedImageExtender struct
method Digest (line 124) | func (i *compressedImageExtender) Digest() (v1.Hash, error) {
method ConfigName (line 129) | func (i *compressedImageExtender) ConfigName() (v1.Hash, error) {
method Layers (line 134) | func (i *compressedImageExtender) Layers() ([]v1.Layer, error) {
method LayerByDigest (line 151) | func (i *compressedImageExtender) LayerByDigest(h v1.Hash) (v1.Layer, ...
method LayerByDiffID (line 160) | func (i *compressedImageExtender) LayerByDiffID(h v1.Hash) (v1.Layer, ...
method ConfigFile (line 169) | func (i *compressedImageExtender) ConfigFile() (*v1.ConfigFile, error) {
method Manifest (line 174) | func (i *compressedImageExtender) Manifest() (*v1.Manifest, error) {
method Size (line 179) | func (i *compressedImageExtender) Size() (int64, error) {
function CompressedToImage (line 184) | func CompressedToImage(cic CompressedImageCore) (v1.Image, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go
type ImageCore (line 22) | type ImageCore interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.go
function FindManifests (line 26) | func FindManifests(index v1.ImageIndex, matcher match.Matcher) ([]v1.Des...
function FindImages (line 45) | func FindImages(index v1.ImageIndex, matcher match.Matcher) ([]v1.Image,...
function FindIndexes (line 68) | func FindIndexes(index v1.ImageIndex, matcher match.Matcher) ([]v1.Image...
type withManifests (line 88) | type withManifests interface
type withLayer (line 92) | type withLayer interface
type describable (line 96) | type describable struct
method Digest (line 100) | func (d describable) Digest() (v1.Hash, error) {
method Size (line 104) | func (d describable) Size() (int64, error) {
method MediaType (line 108) | func (d describable) MediaType() (types.MediaType, error) {
method Descriptor (line 112) | func (d describable) Descriptor() (*v1.Descriptor, error) {
function Manifests (line 122) | func Manifests(idx v1.ImageIndex) ([]Describable, error) {
function ComputeManifests (line 131) | func ComputeManifests(idx v1.ImageIndex) ([]Describable, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.go
type UncompressedLayer (line 29) | type UncompressedLayer interface
type uncompressedLayerExtender (line 41) | type uncompressedLayerExtender struct
method Compressed (line 52) | func (ule *uncompressedLayerExtender) Compressed() (io.ReadCloser, err...
method Digest (line 61) | func (ule *uncompressedLayerExtender) Digest() (v1.Hash, error) {
method Size (line 67) | func (ule *uncompressedLayerExtender) Size() (int64, error) {
method calcSizeHash (line 72) | func (ule *uncompressedLayerExtender) calcSizeHash() {
function UncompressedToLayer (line 85) | func UncompressedToLayer(ul UncompressedLayer) (v1.Layer, error) {
type UncompressedImageCore (line 91) | type UncompressedImageCore interface
function UncompressedToImage (line 100) | func UncompressedToImage(uic UncompressedImageCore) (v1.Image, error) {
type uncompressedImageExtender (line 108) | type uncompressedImageExtender struct
method Digest (line 119) | func (i *uncompressedImageExtender) Digest() (v1.Hash, error) {
method Manifest (line 124) | func (i *uncompressedImageExtender) Manifest() (*v1.Manifest, error) {
method RawManifest (line 171) | func (i *uncompressedImageExtender) RawManifest() ([]byte, error) {
method Size (line 176) | func (i *uncompressedImageExtender) Size() (int64, error) {
method ConfigName (line 181) | func (i *uncompressedImageExtender) ConfigName() (v1.Hash, error) {
method ConfigFile (line 186) | func (i *uncompressedImageExtender) ConfigFile() (*v1.ConfigFile, erro...
method Layers (line 191) | func (i *uncompressedImageExtender) Layers() ([]v1.Layer, error) {
method LayerByDiffID (line 208) | func (i *uncompressedImageExtender) LayerByDiffID(diffID v1.Hash) (v1....
method LayerByDigest (line 217) | func (i *uncompressedImageExtender) LayerByDigest(h v1.Hash) (v1.Layer...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.go
type WithRawConfigFile (line 28) | type WithRawConfigFile interface
function ConfigFile (line 34) | func ConfigFile(i WithRawConfigFile) (*v1.ConfigFile, error) {
function ConfigName (line 43) | func ConfigName(i WithRawConfigFile) (v1.Hash, error) {
type configLayer (line 52) | type configLayer struct
method Digest (line 58) | func (cl *configLayer) Digest() (v1.Hash, error) {
method DiffID (line 63) | func (cl *configLayer) DiffID() (v1.Hash, error) {
method Uncompressed (line 68) | func (cl *configLayer) Uncompressed() (io.ReadCloser, error) {
method Compressed (line 73) | func (cl *configLayer) Compressed() (io.ReadCloser, error) {
method Size (line 78) | func (cl *configLayer) Size() (int64, error) {
method MediaType (line 82) | func (cl *configLayer) MediaType() (types.MediaType, error) {
type withConfigLayer (line 92) | type withConfigLayer interface
function ConfigLayer (line 101) | func ConfigLayer(i WithRawConfigFile) (v1.Layer, error) {
type WithConfigFile (line 121) | type WithConfigFile interface
function DiffIDs (line 127) | func DiffIDs(i WithConfigFile) ([]v1.Hash, error) {
function RawConfigFile (line 136) | func RawConfigFile(i WithConfigFile) ([]byte, error) {
type WithRawManifest (line 145) | type WithRawManifest interface
function Digest (line 151) | func Digest(i WithRawManifest) (v1.Hash, error) {
function Manifest (line 161) | func Manifest(i WithRawManifest) (*v1.Manifest, error) {
type WithManifest (line 170) | type WithManifest interface
function RawManifest (line 176) | func RawManifest(i WithManifest) ([]byte, error) {
function Size (line 185) | func Size(i WithRawManifest) (int64, error) {
function FSLayers (line 194) | func FSLayers(i WithManifest) ([]v1.Hash, error) {
function BlobSize (line 207) | func BlobSize(i WithManifest, h v1.Hash) (int64, error) {
function BlobDescriptor (line 216) | func BlobDescriptor(i WithManifest, h v1.Hash) (*v1.Descriptor, error) {
type WithManifestAndConfigFile (line 235) | type WithManifestAndConfigFile interface
function BlobToDiffID (line 244) | func BlobToDiffID(i WithManifestAndConfigFile, h v1.Hash) (v1.Hash, erro...
function DiffIDToBlob (line 266) | func DiffIDToBlob(wm WithManifestAndConfigFile, h v1.Hash) (v1.Hash, err...
type WithDiffID (line 287) | type WithDiffID interface
type withDescriptor (line 295) | type withDescriptor interface
type Describable (line 300) | type Describable interface
function Descriptor (line 310) | func Descriptor(d Describable) (*v1.Descriptor, error) {
type withArtifactType (line 349) | type withArtifactType interface
type withUncompressedSize (line 353) | type withUncompressedSize interface
function UncompressedSize (line 362) | func UncompressedSize(l v1.Layer) (int64, error) {
type withExists (line 378) | type withExists interface
function Exists (line 384) | func Exists(l v1.Layer) (bool, error) {
function unwrap (line 405) | func unwrap(i any) any {
function ArtifactType (line 425) | func ArtifactType(w WithManifest) (string, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/platform.go
type Platform (line 24) | type Platform struct
method String (line 33) | func (p Platform) String() string {
method Equals (line 79) | func (p Platform) Equals(o Platform) bool {
method Satisfies (line 97) | func (p Platform) Satisfies(spec Platform) bool {
function ParsePlatform (line 55) | func ParsePlatform(s string) (*Platform, error) {
function satisfies (line 106) | func satisfies(want, have string) bool {
function satisfiesList (line 110) | func satisfiesList(want, have []string) bool {
function stringSliceEqual (line 130) | func stringSliceEqual(a, b []string) bool {
function stringSliceEqualIgnoreOrder (line 143) | func stringSliceEqualIgnoreOrder(a, b []string) bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/progress.go
type Update (line 21) | type Update struct
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.go
type Catalogs (line 28) | type Catalogs struct
function CatalogPage (line 34) | func CatalogPage(target name.Registry, last string, n int, options ...Op...
function Catalog (line 75) | func Catalog(ctx context.Context, target name.Registry, options ...Optio...
method catalogPage (line 89) | func (f *fetcher) catalogPage(ctx context.Context, reg name.Registry, ne...
type Catalogger (line 137) | type Catalogger struct
method Next (line 148) | func (l *Catalogger) Next(ctx context.Context) (*Catalogs, error) {
method HasNext (line 157) | func (l *Catalogger) HasNext() bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.go
function CheckPushPermission (line 34) | func CheckPushPermission(ref name.Reference, kc authn.Keychain, t http.R...
method cancelUpload (line 66) | func (w *writer) cancelUpload(loc string) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go
function Delete (line 22) | func Delete(ref name.Reference, options ...Option) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.go
function newErrSchema1 (line 40) | func newErrSchema1(schema types.MediaType) error {
type Descriptor (line 46) | type Descriptor struct
method toDesc (line 58) | func (d *Descriptor) toDesc() v1.Descriptor {
method RawManifest (line 63) | func (d *Descriptor) RawManifest() ([]byte, error) {
method Image (line 108) | func (d *Descriptor) Image() (v1.Image, error) {
method Schema1 (line 142) | func (d *Descriptor) Schema1() (v1.Image, error) {
method ImageIndex (line 159) | func (d *Descriptor) ImageIndex() (v1.ImageIndex, error) {
method remoteImage (line 178) | func (d *Descriptor) remoteImage() *remoteImage {
method remoteIndex (line 189) | func (d *Descriptor) remoteIndex() *remoteIndex {
function Get (line 72) | func Get(ref name.Reference, options ...Option) (*Descriptor, error) {
function Head (line 81) | func Head(ref name.Reference, options ...Option) (*v1.Descriptor, error) {
function get (line 92) | func get(ref name.Reference, acceptable []types.MediaType, options ...Op...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.go
constant kib (line 36) | kib = 1024
constant mib (line 37) | mib = 1024 * kib
constant manifestLimit (line 38) | manifestLimit = 100 * mib
type fetcher (line 42) | type fetcher struct
method Do (line 76) | func (f *fetcher) Do(req *http.Request) (*http.Response, error) {
method url (line 89) | func (f *fetcher) url(resource, identifier string) url.URL {
method get (line 102) | func (f *fetcher) get(ctx context.Context, ref name.Reference, accepta...
method fetchManifest (line 117) | func (f *fetcher) fetchManifest(ctx context.Context, ref name.Referenc...
method headManifest (line 191) | func (f *fetcher) headManifest(ctx context.Context, ref name.Reference...
method fetchBlob (line 248) | func (f *fetcher) fetchBlob(ctx context.Context, size int64, h v1.Hash...
method headBlob (line 279) | func (f *fetcher) headBlob(ctx context.Context, h v1.Hash) (*http.Resp...
method blobExists (line 299) | func (f *fetcher) blobExists(ctx context.Context, h v1.Hash) (bool, er...
function makeFetcher (line 47) | func makeFetcher(ctx context.Context, target resource, o *options) (*fet...
type resource (line 80) | type resource interface
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.go
type remoteImage (line 40) | type remoteImage struct
method ArtifactType (line 52) | func (r *remoteImage) ArtifactType() (string, error) {
method MediaType (line 73) | func (r *remoteImage) MediaType() (types.MediaType, error) {
method RawManifest (line 80) | func (r *remoteImage) RawManifest() ([]byte, error) {
method RawConfigFile (line 103) | func (r *remoteImage) RawConfigFile() ([]byte, error) {
method Descriptor (line 138) | func (r *remoteImage) Descriptor() (*v1.Descriptor, error) {
method ConfigLayer (line 145) | func (r *remoteImage) ConfigLayer() (v1.Layer, error) {
method LayerByDigest (line 271) | func (r *remoteImage) LayerByDigest(h v1.Hash) (partial.CompressedLaye...
function Image (line 64) | func Image(ref name.Reference, options ...Option) (v1.Image, error) {
type remoteImageLayer (line 162) | type remoteImageLayer struct
method Digest (line 169) | func (rl *remoteImageLayer) Digest() (v1.Hash, error) {
method Compressed (line 174) | func (rl *remoteImageLayer) Compressed() (io.ReadCloser, error) {
method Manifest (line 228) | func (rl *remoteImageLayer) Manifest() (*v1.Manifest, error) {
method MediaType (line 233) | func (rl *remoteImageLayer) MediaType() (types.MediaType, error) {
method Size (line 243) | func (rl *remoteImageLayer) Size() (int64, error) {
method ConfigFile (line 249) | func (rl *remoteImageLayer) ConfigFile() (*v1.ConfigFile, error) {
method DiffID (line 255) | func (rl *remoteImageLayer) DiffID() (v1.Hash, error) {
method Descriptor (line 261) | func (rl *remoteImageLayer) Descriptor() (*v1.Descriptor, error) {
method Exists (line 266) | func (rl *remoteImageLayer) Exists() (bool, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.go
type remoteIndex (line 36) | type remoteIndex struct
method MediaType (line 56) | func (r *remoteIndex) MediaType() (types.MediaType, error) {
method Digest (line 63) | func (r *remoteIndex) Digest() (v1.Hash, error) {
method Size (line 67) | func (r *remoteIndex) Size() (int64, error) {
method RawManifest (line 71) | func (r *remoteIndex) RawManifest() ([]byte, error) {
method IndexManifest (line 94) | func (r *remoteIndex) IndexManifest() (*v1.IndexManifest, error) {
method Image (line 102) | func (r *remoteIndex) Image(h v1.Hash) (v1.Image, error) {
method Descriptor (line 114) | func (r *remoteIndex) Descriptor() (*v1.Descriptor, error) {
method ImageIndex (line 121) | func (r *remoteIndex) ImageIndex(h v1.Hash) (v1.ImageIndex, error) {
method Layer (line 130) | func (r *remoteIndex) Layer(h v1.Hash) (v1.Layer, error) {
method imageByPlatform (line 154) | func (r *remoteIndex) imageByPlatform(platform v1.Platform) (v1.Image,...
method childByPlatform (line 173) | func (r *remoteIndex) childByPlatform(platform v1.Platform) (*Descript...
method childByHash (line 192) | func (r *remoteIndex) childByHash(h v1.Hash) (*Descriptor, error) {
method childDescriptor (line 206) | func (r *remoteIndex) childDescriptor(child v1.Descriptor, platform v1...
function Index (line 47) | func Index(ref name.Reference, options ...Option) (v1.ImageIndex, error) {
function matchesPlatform (line 248) | func matchesPlatform(given, required v1.Platform) bool {
function isSubset (line 274) | func isSubset(lst, required []string) bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.go
type remoteLayer (line 29) | type remoteLayer struct
method Compressed (line 36) | func (rl *remoteLayer) Compressed() (io.ReadCloser, error) {
method Size (line 43) | func (rl *remoteLayer) Size() (int64, error) {
method Digest (line 53) | func (rl *remoteLayer) Digest() (v1.Hash, error) {
method MediaType (line 58) | func (rl *remoteLayer) MediaType() (types.MediaType, error) {
method Exists (line 63) | func (rl *remoteLayer) Exists() (bool, error) {
function Layer (line 71) | func Layer(ref name.Digest, options ...Option) (v1.Layer, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.go
function ListWithContext (line 32) | func ListWithContext(ctx context.Context, repo name.Repository, options ...
function List (line 38) | func List(repo name.Repository, options ...Option) ([]string, error) {
type Tags (line 46) | type Tags struct
method listPage (line 52) | func (f *fetcher) listPage(ctx context.Context, repo name.Repository, ne...
function getNextPageURL (line 103) | func getNextPageURL(resp *http.Response) (*url.URL, error) {
type Lister (line 130) | type Lister struct
method Next (line 141) | func (l *Lister) Next(ctx context.Context) (*Tags, error) {
method HasNext (line 150) | func (l *Lister) HasNext() bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.go
type MountableLayer (line 25) | type MountableLayer struct
method Descriptor (line 33) | func (ml *MountableLayer) Descriptor() (*v1.Descriptor, error) {
method Exists (line 38) | func (ml *MountableLayer) Exists() (bool, error) {
type mountableImage (line 45) | type mountableImage struct
method Layers (line 52) | func (mi *mountableImage) Layers() ([]v1.Layer, error) {
method LayerByDigest (line 68) | func (mi *mountableImage) LayerByDigest(d v1.Hash) (v1.Layer, error) {
method LayerByDiffID (line 80) | func (mi *mountableImage) LayerByDiffID(d v1.Hash) (v1.Layer, error) {
method Descriptor (line 93) | func (mi *mountableImage) Descriptor() (*v1.Descriptor, error) {
method ConfigLayer (line 99) | func (mi *mountableImage) ConfigLayer() (v1.Layer, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.go
function MultiWrite (line 25) | func MultiWrite(todo map[name.Reference]Taggable, options ...Option) (re...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.go
type Option (line 34) | type Option
type options (line 36) | type options struct
constant defaultJobs (line 104) | defaultJobs = 4
constant defaultPageSize (line 108) | defaultPageSize = 1000
function makeOptions (line 128) | func makeOptions(opts ...Option) (*options, error) {
function WithTransport (line 188) | func WithTransport(t http.RoundTripper) Option {
function WithAuth (line 200) | func WithAuth(auth authn.Authenticator) Option {
function WithAuthFromKeychain (line 213) | func WithAuthFromKeychain(keys authn.Keychain) Option {
function WithPlatform (line 224) | func WithPlatform(p v1.Platform) Option {
function WithContext (line 238) | func WithContext(ctx context.Context) Option {
function WithJobs (line 250) | func WithJobs(jobs int) Option {
function WithUserAgent (line 264) | func WithUserAgent(ua string) Option {
function WithNondistributable (line 276) | func WithNondistributable(o *options) error {
function WithProgress (line 285) | func WithProgress(updates chan<- v1.Update) Option {
function WithPageSize (line 297) | func WithPageSize(size int) Option {
function WithRetryBackoff (line 305) | func WithRetryBackoff(backoff Backoff) Option {
function WithRetryPredicate (line 313) | func WithRetryPredicate(predicate retry.Predicate) Option {
function WithRetryStatusCodes (line 321) | func WithRetryStatusCodes(codes ...int) Option {
function WithFilter (line 329) | func WithFilter(key string, value string) Option {
function Reuse (line 345) | func Reuse[I *Puller | *Pusher](i I) Option {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.go
type progress (line 25) | type progress struct
method total (line 31) | func (p *progress) total(delta int64) {
method complete (line 37) | func (p *progress) complete(delta int64) {
method err (line 46) | func (p *progress) err(err error) error {
method Close (line 53) | func (p *progress) Close(err error) {
type progressReader (line 58) | type progressReader struct
method Read (line 65) | func (r *progressReader) Read(b []byte) (int, error) {
method Close (line 76) | func (r *progressReader) Close() error { return r.rc.Close() }
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.go
type Puller (line 27) | type Puller struct
method fetcher (line 73) | func (p *Puller) fetcher(ctx context.Context, target resource) (*fetch...
method Head (line 83) | func (p *Puller) Head(ctx context.Context, ref name.Reference) (*v1.De...
method Get (line 93) | func (p *Puller) Get(ctx context.Context, ref name.Reference) (*Descri...
method get (line 97) | func (p *Puller) get(ctx context.Context, ref name.Reference, acceptab...
method Layer (line 106) | func (p *Puller) Layer(ctx context.Context, ref name.Digest) (v1.Layer...
method List (line 131) | func (p *Puller) List(ctx context.Context, repo name.Repository) ([]st...
method Lister (line 150) | func (p *Puller) Lister(ctx context.Context, repo name.Repository) (*L...
method lister (line 154) | func (p *Puller) lister(ctx context.Context, repo name.Repository, pag...
method Catalog (line 173) | func (p *Puller) Catalog(ctx context.Context, reg name.Registry) ([]st...
method catalog (line 177) | func (p *Puller) catalog(ctx context.Context, reg name.Registry, pageS...
method Catalogger (line 194) | func (p *Puller) Catalogger(ctx context.Context, reg name.Registry) (*...
method catalogger (line 198) | func (p *Puller) catalogger(ctx context.Context, reg name.Registry, pa...
method referrers (line 216) | func (p *Puller) referrers(ctx context.Context, d name.Digest, filter ...
function NewPuller (line 34) | func NewPuller(options ...Option) (*Puller, error) {
function newPuller (line 43) | func newPuller(o *options) *Puller {
type reader (line 52) | type reader struct
method init (line 66) | func (r *reader) init(ctx context.Context) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go
type manifest (line 36) | type manifest interface
type workers (line 42) | type workers struct
method err (line 54) | func (w *workers) err(digest v1.Hash) error {
method Do (line 62) | func (w *workers) Do(digest v1.Hash, f func() error) error {
method Stream (line 78) | func (w *workers) Stream(layer v1.Layer, f func() error) error {
function nop (line 50) | func nop() error {
type Pusher (line 94) | type Pusher struct
method writer (line 119) | func (p *Pusher) writer(ctx context.Context, repo name.Repository, o *...
method Put (line 128) | func (p *Pusher) Put(ctx context.Context, ref name.Reference, t Taggab...
method Push (line 142) | func (p *Pusher) Push(ctx context.Context, ref name.Reference, t Tagga...
method Upload (line 150) | func (p *Pusher) Upload(ctx context.Context, repo name.Repository, l v...
method Delete (line 158) | func (p *Pusher) Delete(ctx context.Context, ref name.Reference) error {
function NewPusher (line 101) | func NewPusher(options ...Option) (*Pusher, error) {
function newPusher (line 110) | func newPusher(o *options) *Pusher {
type repoWriter (line 188) | type repoWriter struct
method init (line 200) | func (rw *repoWriter) init(ctx context.Context) error {
method writeDeps (line 208) | func (rw *repoWriter) writeDeps(ctx context.Context, m manifest) error {
method writeManifest (line 288) | func (rw *repoWriter) writeManifest(ctx context.Context, ref name.Refe...
method writeChildren (line 361) | func (rw *repoWriter) writeChildren(ctx context.Context, idx v1.ImageI...
method writeChild (line 380) | func (rw *repoWriter) writeChild(ctx context.Context, child partial.De...
method manifestExists (line 406) | func (rw *repoWriter) manifestExists(ctx context.Context, ref name.Ref...
method commitManifest (line 458) | func (rw *repoWriter) commitManifest(ctx context.Context, ref name.Ref...
method writeLayers (line 470) | func (rw *repoWriter) writeLayers(pctx context.Context, img v1.Image) ...
method writeLayer (line 519) | func (rw *repoWriter) writeLayer(ctx context.Context, l v1.Layer) error {
method lazyWriteLayer (line 549) | func (rw *repoWriter) lazyWriteLayer(ctx context.Context, l v1.Layer) ...
type describable (line 221) | type describable struct
method Digest (line 225) | func (d describable) Digest() (v1.Hash, error) {
method Size (line 229) | func (d describable) Size() (int64, error) {
method MediaType (line 233) | func (d describable) MediaType() (types.MediaType, error) {
type tagManifest (line 237) | type tagManifest struct
function taggableToManifest (line 242) | func taggableToManifest(t Taggable) (manifest, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go
function Referrers (line 36) | func Referrers(d name.Digest, options ...Option) (v1.ImageIndex, error) {
function fallbackTag (line 45) | func fallbackTag(d name.Digest) name.Tag {
method fetchReferrers (line 49) | func (f *fetcher) fetchReferrers(ctx context.Context, filter map[string]...
function filterReferrersResponse (line 106) | func filterReferrersResponse(filter map[string]string, in v1.ImageIndex)...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.go
type schema1 (line 28) | type schema1 struct
method Layers (line 37) | func (s *schema1) Layers() ([]v1.Layer, error) {
method MediaType (line 61) | func (s *schema1) MediaType() (types.MediaType, error) {
method Size (line 65) | func (s *schema1) Size() (int64, error) {
method ConfigName (line 69) | func (s *schema1) ConfigName() (v1.Hash, error) {
method ConfigFile (line 73) | func (s *schema1) ConfigFile() (*v1.ConfigFile, error) {
method RawConfigFile (line 77) | func (s *schema1) RawConfigFile() ([]byte, error) {
method Digest (line 81) | func (s *schema1) Digest() (v1.Hash, error) {
method Manifest (line 85) | func (s *schema1) Manifest() (*v1.Manifest, error) {
method RawManifest (line 89) | func (s *schema1) RawManifest() ([]byte, error) {
method LayerByDigest (line 93) | func (s *schema1) LayerByDigest(h v1.Hash) (v1.Layer, error) {
method LayerByDiffID (line 108) | func (s *schema1) LayerByDiffID(v1.Hash) (v1.Layer, error) {
type fslayer (line 112) | type fslayer struct
type schema1Manifest (line 116) | type schema1Manifest struct
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.go
type basicTransport (line 25) | type basicTransport struct
method RoundTrip (line 34) | func (bt *basicTransport) RoundTrip(in *http.Request) (*http.Response,...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go
type Token (line 37) | type Token struct
function Exchange (line 45) | func Exchange(ctx context.Context, reg name.Registry, auth authn.Authent...
function FromToken (line 66) | func FromToken(reg name.Registry, auth authn.Authenticator, t http.Round...
function fromChallenge (line 80) | func fromChallenge(reg name.Registry, auth authn.Authenticator, t http.R...
type bearerTransport (line 102) | type bearerTransport struct
method RoundTrip (line 137) | func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response...
method refresh (line 200) | func (bt *bearerTransport) refresh(ctx context.Context) error {
method Refresh (line 240) | func (bt *bearerTransport) Refresh(ctx context.Context, auth *authn.Au...
method refreshOauth (line 309) | func (bt *bearerTransport) refreshOauth(ctx context.Context) ([]byte, ...
method refreshBasic (line 366) | func (bt *bearerTransport) refreshBasic(ctx context.Context) ([]byte, ...
function stringSet (line 128) | func stringSet(ss []string) map[string]struct{} {
function matchesHost (line 276) | func matchesHost(host string, in *http.Request, scheme string) bool {
function canonicalAddress (line 283) | func canonicalAddress(host, scheme string) (address string) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.go
type Error (line 29) | type Error struct
method Error (line 46) | func (e *Error) Error() string {
method responseErr (line 54) | func (e *Error) responseErr() string {
method Temporary (line 77) | func (e *Error) Temporary() bool {
type Diagnostic (line 95) | type Diagnostic struct
method String (line 102) | func (d Diagnostic) String() string {
type ErrorCode (line 111) | type ErrorCode
constant BlobUnknownErrorCode (line 116) | BlobUnknownErrorCode ErrorCode = "BLOB_UNKNOWN"
constant BlobUploadInvalidErrorCode (line 117) | BlobUploadInvalidErrorCode ErrorCode = "BLOB_UPLOAD_INVALID"
constant BlobUploadUnknownErrorCode (line 118) | BlobUploadUnknownErrorCode ErrorCode = "BLOB_UPLOAD_UNKNOWN"
constant DigestInvalidErrorCode (line 119) | DigestInvalidErrorCode ErrorCode = "DIGEST_INVALID"
constant ManifestBlobUnknownErrorCode (line 120) | ManifestBlobUnknownErrorCode ErrorCode = "MANIFEST_BLOB_UNKNOWN"
constant ManifestInvalidErrorCode (line 121) | ManifestInvalidErrorCode ErrorCode = "MANIFEST_INVALID"
constant ManifestUnknownErrorCode (line 122) | ManifestUnknownErrorCode ErrorCode = "MANIFEST_UNKNOWN"
constant ManifestUnverifiedErrorCode (line 123) | ManifestUnverifiedErrorCode ErrorCode = "MANIFEST_UNVERIFIED"
constant NameInvalidErrorCode (line 124) | NameInvalidErrorCode ErrorCode = "NAME_INVALID"
constant NameUnknownErrorCode (line 125) | NameUnknownErrorCode ErrorCode = "NAME_UNKNOWN"
constant SizeInvalidErrorCode (line 126) | SizeInvalidErrorCode ErrorCode = "SIZE_INVALID"
constant TagInvalidErrorCode (line 127) | TagInvalidErrorCode ErrorCode = "TAG_INVALID"
constant UnauthorizedErrorCode (line 128) | UnauthorizedErrorCode ErrorCode = "UNAUTHORIZED"
constant DeniedErrorCode (line 129) | DeniedErrorCode ErrorCode = "DENIED"
constant UnsupportedErrorCode (line 130) | UnsupportedErrorCode ErrorCode = "UNSUPPORTED"
constant TooManyRequestsErrorCode (line 131) | TooManyRequestsErrorCode ErrorCode = "TOOMANYREQUESTS"
constant UnknownErrorCode (line 132) | UnknownErrorCode ErrorCode = "UNKNOWN"
constant UnavailableErrorCode (line 136) | UnavailableErrorCode ErrorCode = "UNAVAILABLE"
function CheckError (line 156) | func CheckError(resp *http.Response, codes ...int) error {
function makeError (line 172) | func makeError(resp *http.Response, body []byte) *Error {
function retryError (line 187) | func retryError(resp *http.Response) error {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.go
type logTransport (line 27) | type logTransport struct
method RoundTrip (line 37) | func (t *logTransport) RoundTrip(in *http.Request) (out *http.Response...
function NewLogger (line 33) | func NewLogger(inner http.RoundTripper) http.RoundTripper {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.go
type Challenge (line 35) | type Challenge struct
function Ping (line 47) | func Ping(ctx context.Context, reg name.Registry, t http.RoundTripper) (...
function pingSingle (line 61) | func pingSingle(ctx context.Context, reg name.Registry, t http.RoundTrip...
function pingParallel (line 111) | func pingParallel(ctx context.Context, reg name.Registry, t http.RoundTr...
function pickFromMultipleChallenges (line 172) | func pickFromMultipleChallenges(challenges []authchallenge.Challenge) au...
type multierrs (line 190) | type multierrs
method Error (line 192) | func (m multierrs) Error() string {
method As (line 205) | func (m multierrs) As(target any) bool {
method Is (line 214) | func (m multierrs) Is(target error) bool {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.go
type retryTransport (line 35) | type retryTransport struct
method RoundTrip (line 94) | func (t *retryTransport) RoundTrip(in *http.Request) (out *http.Respon...
type Option (line 43) | type Option
type options (line 45) | type options struct
function WithRetryBackoff (line 55) | func WithRetryBackoff(backoff Backoff) Option {
function WithRetryPredicate (line 62) | func WithRetryPredicate(predicate func(error) bool) Option {
function WithRetryStatusCodes (line 69) | func WithRetryStatusCodes(codes ...int) Option {
function NewRetry (line 76) | func NewRetry(inner http.RoundTripper, opts ...Option) http.RoundTripper {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.go
type schemeTransport (line 23) | type schemeTransport struct
method RoundTrip (line 35) | func (st *schemeTransport) RoundTrip(in *http.Request) (*http.Response...
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.go
constant PullScope (line 19) | PullScope string = "pull"
constant PushScope (line 20) | PushScope string = "push,pull"
constant DeleteScope (line 22) | DeleteScope string = PushScope
constant CatalogScope (line 23) | CatalogScope string = "catalog"
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.go
function New (line 31) | func New(reg name.Registry, auth authn.Authenticator, t http.RoundTrippe...
function NewWithContext (line 41) | func NewWithContext(ctx context.Context, reg name.Registry, auth authn.A...
type Wrapper (line 102) | type Wrapper struct
method RoundTrip (line 107) | func (w *Wrapper) RoundTrip(in *http.Request) (*http.Response, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.go
constant defaultUserAgent (line 32) | defaultUserAgent = "go-containerregistry"
constant moduleName (line 33) | moduleName = "github.com/google/go-containerregistry"
type userAgentTransport (line 36) | type userAgentTransport struct
method RoundTrip (line 91) | func (ut *userAgentTransport) RoundTrip(in *http.Request) (*http.Respo...
function init (line 41) | func init() {
function version (line 47) | func version() string {
function NewUserAgent (line 78) | func NewUserAgent(inner http.RoundTripper, ua string) http.RoundTripper {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go
type Taggable (line 42) | type Taggable interface
function Write (line 47) | func Write(ref name.Reference, img v1.Image, options ...Option) (rerr er...
type writer (line 52) | type writer struct
method url (line 102) | func (w *writer) url(path string) url.URL {
method maybeUpdateScopes (line 110) | func (w *writer) maybeUpdateScopes(ctx context.Context, ml *MountableL...
method nextLocation (line 139) | func (w *writer) nextLocation(resp *http.Response) (string, error) {
method checkExistingBlob (line 158) | func (w *writer) checkExistingBlob(ctx context.Context, h v1.Hash) (bo...
method initiateUpload (line 185) | func (w *writer) initiateUpload(ctx context.Context, from, mount, orig...
method streamBlob (line 241) | func (w *writer) streamBlob(ctx context.Context, layer v1.Layer, strea...
method commitBlob (line 301) | func (w *writer) commitBlob(ctx context.Context, location, digest stri...
method incrProgress (line 326) | func (w *writer) incrProgress(written int64) {
method uploadOne (line 334) | func (w *writer) uploadOne(ctx context.Context, l v1.Layer) error {
method commitSubjectReferrers (line 466) | func (w *writer) commitSubjectReferrers(ctx context.Context, sub name....
method commitManifest (line 551) | func (w *writer) commitManifest(ctx context.Context, t Taggable, ref n...
function makeWriter (line 69) | func makeWriter(ctx context.Context, repo name.Repository, ls []v1.Layer...
type withMediaType (line 422) | type withMediaType interface
function unpackTaggable (line 432) | func unpackTaggable(t Taggable) ([]byte, *v1.Descriptor, error) {
type fallbackTaggable (line 543) | type fallbackTaggable struct
method RawManifest (line 547) | func (f fallbackTaggable) RawManifest() ([]byte, error) { retur...
method MediaType (line 548) | func (f fallbackTaggable) MediaType() (types.MediaType, error) { retur...
function scopesForUploadingImage (line 623) | func scopesForUploadingImage(repo name.Repository, layers []v1.Layer) []...
function WriteIndex (line 651) | func WriteIndex(ref name.Reference, ii v1.ImageIndex, options ...Option)...
function WriteLayer (line 656) | func WriteLayer(repo name.Repository, layer v1.Layer, options ...Option)...
function Tag (line 678) | func Tag(tag name.Tag, t Taggable, options ...Option) error {
function Put (line 693) | func Put(ref name.Reference, t Taggable, options ...Option) error {
function Push (line 702) | func Push(ref name.Reference, t Taggable, options ...Option) (rerr error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.go
type Layer (line 44) | type Layer struct
method Digest (line 92) | func (l *Layer) Digest() (v1.Hash, error) {
method DiffID (line 102) | func (l *Layer) DiffID() (v1.Hash, error) {
method Size (line 112) | func (l *Layer) Size() (int64, error) {
method MediaType (line 122) | func (l *Layer) MediaType() (types.MediaType, error) {
method Uncompressed (line 127) | func (l *Layer) Uncompressed() (io.ReadCloser, error) {
method Compressed (line 132) | func (l *Layer) Compressed() (io.ReadCloser, error) {
method finalize (line 142) | func (l *Layer) finalize(uncompressed, compressed hash.Hash, size int6...
type LayerOption (line 58) | type LayerOption
function WithCompressionLevel (line 61) | func WithCompressionLevel(level int) LayerOption {
function WithMediaType (line 68) | func WithMediaType(mt types.MediaType) LayerOption {
function NewLayer (line 75) | func NewLayer(rc io.ReadCloser, opts ...LayerOption) *Layer {
type compressedReader (line 163) | type compressedReader struct
method Read (line 265) | func (cr *compressedReader) Read(b []byte) (int, error) { return cr.pr...
method Close (line 267) | func (cr *compressedReader) Close() error { return cr.closer() }
function newCompressedReader (line 168) | func newCompressedReader(l *Layer) (*compressedReader, error) {
type countWriter (line 270) | type countWriter struct
method Write (line 272) | func (c *countWriter) Write(p []byte) (int, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.go
type image (line 37) | type image struct
method MediaType (line 119) | func (i *image) MediaType() (types.MediaType, error) {
method areLayersCompressed (line 159) | func (i *image) areLayersCompressed() (bool, error) {
method loadTarDescriptorAndConfig (line 178) | func (i *image) loadTarDescriptorAndConfig() error {
method RawConfigFile (line 211) | func (i *image) RawConfigFile() ([]byte, error) {
type uncompressedImage (line 46) | type uncompressedImage struct
method LayerByDiffID (line 291) | func (i *uncompressedImage) LayerByDiffID(h v1.Hash) (partial.Uncompre...
type compressedImage (line 50) | type compressedImage struct
method Manifest (line 336) | func (c *compressedImage) Manifest() (*v1.Manifest, error) {
method RawManifest (line 393) | func (c *compressedImage) RawManifest() ([]byte, error) {
method LayerByDigest (line 424) | func (c *compressedImage) LayerByDigest(h v1.Hash) (partial.Compressed...
type Opener (line 60) | type Opener
function pathOpener (line 62) | func pathOpener(path string) Opener {
function ImageFromPath (line 69) | func ImageFromPath(path string, tag *name.Tag) (v1.Image, error) {
function LoadManifest (line 74) | func LoadManifest(opener Opener) (Manifest, error) {
function Image (line 90) | func Image(opener Opener, tag *name.Tag) (v1.Image, error) {
type Descriptor (line 124) | type Descriptor struct
type Manifest (line 134) | type Manifest
method findDescriptor (line 136) | func (m Manifest) findDescriptor(tag *name.Tag) (*Descriptor, error) {
type tarFile (line 216) | type tarFile struct
function extractFileFromTar (line 221) | func extractFileFromTar(opener Opener, filePath string) (io.ReadCloser, ...
type uncompressedLayerFromTarball (line 258) | type uncompressedLayerFromTarball struct
method DiffID (line 278) | func (ulft *uncompressedLayerFromTarball) DiffID() (v1.Hash, error) {
method Uncompressed (line 283) | func (ulft *uncompressedLayerFromTarball) Uncompressed() (io.ReadClose...
method MediaType (line 287) | func (ulft *uncompressedLayerFromTarball) MediaType() (types.MediaType...
type foreignUncompressedLayer (line 268) | type foreignUncompressedLayer struct
method Descriptor (line 273) | func (fl *foreignUncompressedLayer) Descriptor() (*v1.Descriptor, erro...
type compressedLayerFromTarball (line 398) | type compressedLayerFromTarball struct
method Digest (line 405) | func (clft *compressedLayerFromTarball) Digest() (v1.Hash, error) {
method Compressed (line 410) | func (clft *compressedLayerFromTarball) Compressed() (io.ReadCloser, e...
method MediaType (line 415) | func (clft *compressedLayerFromTarball) MediaType() (types.MediaType, ...
method Size (line 420) | func (clft *compressedLayerFromTarball) Size() (int64, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.go
type layer (line 37) | type layer struct
method Descriptor (line 51) | func (l *layer) Descriptor() (*v1.Descriptor, error) {
method Digest (line 65) | func (l *layer) Digest() (v1.Hash, error) {
method DiffID (line 70) | func (l *layer) DiffID() (v1.Hash, error) {
method Compressed (line 75) | func (l *layer) Compressed() (io.ReadCloser, error) {
method Uncompressed (line 80) | func (l *layer) Uncompressed() (io.ReadCloser, error) {
method Size (line 85) | func (l *layer) Size() (int64, error) {
method MediaType (line 90) | func (l *layer) MediaType() (types.MediaType, error) {
type LayerOption (line 95) | type LayerOption
function WithCompression (line 101) | func WithCompression(comp compression.Compression) LayerOption {
function WithCompressionLevel (line 120) | func WithCompressionLevel(level int) LayerOption {
function WithMediaType (line 127) | func WithMediaType(mt types.MediaType) LayerOption {
function WithCompressedCaching (line 136) | func WithCompressedCaching(l *layer) {
function WithEstargzOptions (line 165) | func WithEstargzOptions(opts ...estargz.Option) LayerOption {
function WithEstargz (line 174) | func WithEstargz(l *layer) {
function LayerFromFile (line 213) | func LayerFromFile(path string, opts ...LayerOption) (v1.Layer, error) {
function LayerFromOpener (line 231) | func LayerFromOpener(opener Opener, opts ...LayerOption) (v1.Layer, erro...
function LayerFromReader (line 324) | func LayerFromReader(reader io.Reader, opts ...LayerOption) (v1.Layer, e...
function computeDigest (line 335) | func computeDigest(opener Opener) (v1.Hash, int64, error) {
function computeDiffID (line 345) | func computeDiffID(opener Opener) (v1.Hash, error) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.go
function WriteToFile (line 35) | func WriteToFile(p string, ref name.Reference, img v1.Image, opts ...Wri...
function MultiWriteToFile (line 47) | func MultiWriteToFile(p string, tagToImage map[name.Tag]v1.Image, opts ....
function MultiRefWriteToFile (line 57) | func MultiRefWriteToFile(p string, refToImage map[name.Reference]v1.Imag...
function Write (line 68) | func Write(ref name.Reference, img v1.Image, w io.Writer, opts ...WriteO...
function MultiWrite (line 77) | func MultiWrite(tagToImage map[name.Tag]v1.Image, w io.Writer, opts ...W...
function MultiRefWrite (line 90) | func MultiRefWrite(refToImage map[name.Reference]v1.Image, w io.Writer, ...
function sendUpdateReturn (line 111) | func sendUpdateReturn(o *writeOptions, err error) error {
function sendProgressWriterReturn (line 121) | func sendProgressWriterReturn(pw *progressWriter, err error) error {
function writeImagesToTar (line 129) | func writeImagesToTar(imageToTags map[v1.Image][]string, m []byte, size ...
function calculateManifest (line 222) | func calculateManifest(imageToTags map[v1.Image][]string) (m Manifest, e...
function CalculateSize (line 290) | func CalculateSize(refToImage map[name.Reference]v1.Image) (size int64, ...
function getSizeAndManifest (line 296) | func getSizeAndManifest(imageToTags map[v1.Image][]string) (int64, []byt...
function calculateTarballSize (line 314) | func calculateTarballSize(imageToTags map[v1.Image][]string, mBytes []by...
function dedupRefToImage (line 339) | func dedupRefToImage(refToImage map[name.Reference]v1.Image) map[v1.Imag...
function writeTarEntry (line 369) | func writeTarEntry(tf *tar.Writer, path string, r io.Reader, size int64)...
function ComputeManifest (line 385) | func ComputeManifest(refToImage map[name.Reference]v1.Image) (Manifest, ...
type WriteOption (line 391) | type WriteOption
type writeOptions (line 392) | type writeOptions struct
function WithProgress (line 398) | func WithProgress(updates chan<- v1.Update) WriteOption {
type progressWriter (line 406) | type progressWriter struct
method Write (line 412) | func (pw *progressWriter) Write(p []byte) (int, error) {
method Error (line 428) | func (pw *progressWriter) Error(err error) error {
method Close (line 437) | func (pw *progressWriter) Close() error {
function calculateSingleFileInTarSize (line 449) | func calculateSingleFileInTarSize(in int64) (out int64) {
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/types/types.go
type MediaType (line 19) | type MediaType
method IsDistributable (line 49) | func (m MediaType) IsDistributable() bool {
method IsImage (line 58) | func (m MediaType) IsImage() bool {
method IsIndex (line 67) | func (m MediaType) IsIndex() bool {
method IsConfig (line 76) | func (m MediaType) IsConfig() bool {
method IsSchema1 (line 84) | func (m MediaType) IsSchema1() bool {
method IsLayer (line 92) | func (m MediaType) IsLayer() bool {
constant OCIContentDescriptor (line 23) | OCIContentDescriptor MediaType = "application/vnd.oci.descript...
constant OCIImageIndex (line 24) | OCIImageIndex MediaType = "application/vnd.oci.image.in...
constant OCIManifestSchema1 (line 25) | OCIManifestSchema1 MediaType = "application/vnd.oci.image.ma...
constant OCIConfigJSON (line 26) | OCIConfigJSON MediaType = "application/vnd.oci.image.co...
constant OCILayer (line 27) | OCILayer MediaType = "application/vnd.oci.image.la...
constant OCILayerZStd (line 28) | OCILayerZStd MediaType = "application/vnd.oci.image.la...
constant OCIRestrictedLayer (line 29) | OCIRestrictedLayer MediaType = "application/vnd.oci.image.la...
constant OCIUncompressedLayer (line 30) | OCIUncompressedLayer MediaType = "application/vnd.oci.image.la...
constant OCIUncompressedRestrictedLayer (line 31) | OCIUncompressedRestrictedLayer MediaType = "application/vnd.oci.image.la...
constant DockerManifestSchema1 (line 33) | DockerManifestSchema1 MediaType = "application/vnd.docker.distribu...
constant DockerManifestSchema1Signed (line 34) | DockerManifestSchema1Signed MediaType = "application/vnd.docker.distribu...
constant DockerManifestSchema2 (line 35) | DockerManifestSchema2 MediaType = "application/vnd.docker.distribu...
constant DockerManifestList (line 36) | DockerManifestList MediaType = "application/vnd.docker.distribu...
constant DockerLayer (line 37) | DockerLayer MediaType = "application/vnd.docker.image.ro...
constant DockerConfigJSON (line 38) | DockerConfigJSON MediaType = "application/vnd.docker.containe...
constant DockerPluginConfig (line 39) | DockerPluginConfig MediaType = "application/vnd.docker.plugin.v...
constant DockerForeignLayer (line 40) | DockerForeignLayer MediaType = "application/vnd.docker.image.ro...
constant DockerUncompressedLayer (line 41) | DockerUncompressedLayer MediaType = "application/vnd.docker.image.ro...
constant OCIVendorPrefix (line 43) | OCIVendorPrefix = "vnd.oci"
constant DockerVendorPrefix (line 44) | DockerVendorPrefix = "vnd.docker"
FILE: vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.go
method DeepCopyInto (line 22) | func (in *Config) DeepCopyInto(out *Config) {
method DeepCopy (line 79) | func (in *Config) DeepCopy() *Config {
method DeepCopyInto (line 89) | func (in *ConfigFile) DeepCopyInto(out *ConfigFile) {
method DeepCopy (line 110) | func (in *ConfigFile) DeepCopy() *ConfigFile {
method DeepCopyInto (line 120) | func (in *Descriptor) DeepCopyInto(out *Descriptor) {
method DeepCopy (line 149) | func (in *Descriptor) DeepCopy() *Descriptor {
method DeepCopyInto (line 159) | func (in *Hash) DeepCopyInto(out *Hash) {
method DeepCopy (line 165) | func (in *Hash) DeepCopy() *Hash {
method DeepCopyInto (line 175) | func (in *HealthConfig) DeepCopyInto(out *HealthConfig) {
method DeepCopy (line 186) | func (in *HealthConfig) DeepCopy() *HealthConfig {
method DeepCopyInto (line 196) | func (in *History) DeepCopyInto(out *History) {
method DeepCopy (line 203) | func (in *History) DeepCopy() *History {
method DeepCopyInto (line 213) | func (in *IndexManifest) DeepCopyInto(out *IndexManifest) {
method DeepCopy (line 238) | func (in *IndexManifest) DeepCopy() *IndexManifest {
method DeepCopyInto (line 248) | func (in *Manifest) DeepCopyInto(out *Manifest) {
method DeepCopy (line 274) | func (in *Manifest) DeepCopy() *Manifest {
method DeepCopyInto (line 284) | func (in *Platform) DeepCopyInto(out *Platform) {
method DeepCopy (line 300) | func (in *Platform) DeepCopy() *Platform {
method DeepCopyInto (line 310) | func (in *RootFS) DeepCopyInto(out *RootFS) {
method DeepCopy (line 321) | func (in *RootFS) DeepCopy() *RootFS {
method DeepCopy (line 331) | func (in *Time) DeepCopy() *Time {
FILE: vendor/github.com/inconshreveable/mousetrap/trap_others.go
function StartedByExplorer (line 14) | func StartedByExplorer() bool {
FILE: vendor/github.com/inconshreveable/mousetrap/trap_windows.go
function getProcessEntry (line 8) | func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
function StartedByExplorer (line 36) | func StartedByExplorer() bool {
FILE: vendor/github.com/klauspost/compress/compressible.go
function Estimate (line 10) | func Estimate(b []byte) float64 {
function ShannonEntropyBits (line 68) | func ShannonEntropyBits(b []byte) int {
FILE: vendor/github.com/klauspost/compress/fse/bitreader.go
type bitReader (line 17) | type bitReader struct
method init (line 25) | func (b *bitReader) init(in []byte) error {
method getBits (line 49) | func (b *bitReader) getBits(n uint8) uint16 {
method getBitsFast (line 58) | func (b *bitReader) getBitsFast(n uint8) uint16 {
method fillFast (line 67) | func (b *bitReader) fillFast() {
method fill (line 81) | func (b *bitReader) fill() {
method fillFastStart (line 102) | func (b *bitReader) fillFastStart() {
method finished (line 110) | func (b *bitReader) finished() bool {
method close (line 115) | func (b *bitReader) close() error {
FILE: vendor/github.com/klauspost/compress/fse/bitwriter.go
type bitWriter (line 12) | type bitWriter struct
method addBits16NC (line 29) | func (b *bitWriter) addBits16NC(value uint16, bits uint8) {
method addBits16Clean (line 36) | func (b *bitWriter) addBits16Clean(value uint16, bits uint8) {
method addBits16ZeroNC (line 45) | func (b *bitWriter) addBits16ZeroNC(value uint16, bits uint8) {
method flush (line 58) | func (b *bitWriter) flush() {
method flush32 (line 130) | func (b *bitWriter) flush32() {
method flushAlign (line 144) | func (b *bitWriter) flushAlign() {
method close (line 155) | func (b *bitWriter) close() {
method reset (line 163) | func (b *bitWriter) reset(out []byte) {
FILE: vendor/github.com/klauspost/compress/fse/bytereader.go
type byteReader (line 12) | type byteReader struct
method init (line 18) | func (b *byteReader) init(in []byte) {
method advance (line 24) | func (b *byteReader) advance(n uint) {
method Uint32 (line 29) | func (b byteReader) Uint32() uint32 {
method unread (line 40) | func (b byteReader) unread() []byte {
method remain (line 45) | func (b byteReader) remain() int {
FILE: vendor/github.com/klauspost/compress/fse/compress.go
function Compress (line 18) | func Compress(in []byte, s *Scratch) ([]byte, error) {
type cState (line 80) | type cState struct
method init (line 87) | func (c *cState) init(bw *bitWriter, ct *cTable, tableLog uint8, first...
method encode (line 98) | func (c *cState) encode(symbolTT symbolTransform) {
method encodeZero (line 106) | func (c *cState) encodeZero(symbolTT symbolTransform) {
method flush (line 114) | func (c *cState) flush(tableLog uint8) {
method compress (line 121) | func (s *Scratch) compress(src []byte) error {
method writeCount (line 208) | func (s *Scratch) writeCount() error {
type symbolTransform (line 309) | type symbolTransform struct
method String (line 315) | func (s symbolTransform) String() string {
type cTable (line 320) | type cTable struct
method allocCtable (line 328) | func (s *Scratch) allocCtable() {
method buildCTable (line 349) | func (s *Scratch) buildCTable() error {
method countSimple (line 456) | func (s *Scratch) countSimple(in []byte) (max int) {
method minTableLog (line 475) | func (s *Scratch) minTableLog() uint8 {
method optimalTableLog (line 485) | func (s *Scratch) optimalTableLog() {
method normalizeCount (line 510) | func (s *Scratch) normalizeCount() error {
method normalizeCount2 (line 561) | func (s *Scratch) normalizeCount2() error {
method validateNorm (line 656) | func (s *Scratch) validateNorm() (err error) {
FILE: vendor/github.com/klauspost/compress/fse/decompress.go
constant tablelogAbsoluteMax (line 9) | tablelogAbsoluteMax = 15
function Decompress (line 19) | func Decompress(b []byte, s *Scratch) ([]byte, error) {
method readNCount (line 42) | func (s *Scratch) readNCount() error {
type decSymbol (line 166) | type decSymbol struct
method allocDtable (line 173) | func (s *Scratch) allocDtable() {
method buildDtable (line 192) | func (s *Scratch) buildDtable() error {
method decompress (line 261) | func (s *Scratch) decompress() error {
type decoder (line 335) | type decoder struct
method init (line 342) | func (d *decoder) init(in *bitReader, dt []decSymbol, tableLog uint8) {
method next (line 350) | func (d *decoder) next() uint8 {
method finished (line 359) | func (d *decoder) finished() bool {
method final (line 364) | func (d *decoder) final() uint8 {
method nextFast (line 371) | func (d *decoder) nextFast() uint8 {
FILE: vendor/github.com/klauspost/compress/fse/fse.go
constant maxMemoryUsage (line 26) | maxMemoryUsage = 14
constant defaultMemoryUsage (line 27) | defaultMemoryUsage = 13
constant maxTableLog (line 29) | maxTableLog = maxMemoryUsage - 2
constant maxTablesize (line 30) | maxTablesize = 1 << maxTableLog
constant defaultTablelog (line 31) | defaultTablelog = defaultMemoryUsage - 2
constant minTablelog (line 32) | minTablelog = 5
constant maxSymbolValue (line 33) | maxSymbolValue = 255
type Scratch (line 45) | type Scratch struct
method Histogram (line 91) | func (s *Scratch) Histogram() []uint32 {
method HistogramFinished (line 99) | func (s *Scratch) HistogramFinished(maxSymbol uint8, maxCount int) {
method prepare (line 106) | func (s *Scratch) prepare(in []byte) (*Scratch, error) {
function tableStep (line 138) | func tableStep(tableSize uint32) uint32 {
function highBits (line 142) | func highBits(val uint32) (n uint32) {
FILE: vendor/github.com/klauspost/compress/huff0/bitreader.go
type bitReaderBytes (line 19) | type bitReaderBytes struct
method init (line 27) | func (b *bitReaderBytes) init(in []byte) error {
method peekByteFast (line 52) | func (b *bitReaderBytes) peekByteFast() uint8 {
method advance (line 57) | func (b *bitReaderBytes) advance(n uint8) {
method fillFast (line 64) | func (b *bitReaderBytes) fillFast() {
method fillFastStart (line 77) | func (b *bitReaderBytes) fillFastStart() {
method fill (line 85) | func (b *bitReaderBytes) fill() {
method finished (line 104) | func (b *bitReaderBytes) finished() bool {
method remaining (line 108) | func (b *bitReaderBytes) remaining() uint {
method close (line 113) | func (b *bitReaderBytes) close() error {
type bitReaderShifted (line 128) | type bitReaderShifted struct
method init (line 136) | func (b *bitReaderShifted) init(in []byte) error {
method peekBitsFast (line 161) | func (b *bitReaderShifted) peekBitsFast(n uint8) uint16 {
method advance (line 165) | func (b *bitReaderShifted) advance(n uint8) {
method fillFast (line 172) | func (b *bitReaderShifted) fillFast() {
method fillFastStart (line 184) | func (b *bitReaderShifted) fillFastStart() {
method fill (line 191) | func (b *bitReaderShifted) fill() {
method remaining (line 209) | func (b *bitReaderShifted) remaining() uint {
method close (line 214) | func (b *bitReaderShifted) close() error {
FILE: vendor/github.com/klauspost/compress/huff0/bitwriter.go
type bitWriter (line 10) | type bitWriter struct
method addBits16Clean (line 18) | func (b *bitWriter) addBits16Clean(value uint16, bits uint8) {
method encSymbol (line 25) | func (b *bitWriter) encSymbol(ct cTable, symbol byte) {
method encTwoSymbols (line 38) | func (b *bitWriter) encTwoSymbols(ct cTable, av, bv byte) {
method encFourSymbols (line 58) | func (b *bitWriter) encFourSymbols(encA, encB, encC, encD cTableEntry) {
method flush32 (line 72) | func (b *bitWriter) flush32() {
method flushAlign (line 86) | func (b *bitWriter) flushAlign() {
method close (line 97) | func (b *bitWriter) close() {
FILE: vendor/github.com/klauspost/compress/huff0/compress.go
function Compress1X (line 14) | func Compress1X(in []byte, s *Scratch) (out []byte, reUsed bool, err err...
function Compress4X (line 27) | func Compress4X(in []byte, s *Scratch) (out []byte, reUsed bool, err err...
function compress (line 43) | func compress(in []byte, s *Scratch, compressor func(src []byte) ([]byte...
function EstimateSizes (line 166) | func EstimateSizes(in []byte, s *Scratch) (tableSz, dataSz, reuseSz int,...
method compress1X (line 229) | func (s *Scratch) compress1X(src []byte) ([]byte, error) {
method compress1xDo (line 233) | func (s *Scratch) compress1xDo(dst, src []byte) []byte {
method compress4X (line 269) | func (s *Scratch) compress4X(src []byte) ([]byte, error) {
method compress4Xp (line 305) | func (s *Scratch) compress4Xp(src []byte) ([]byte, error) {
method countSimple (line 351) | func (s *Scratch) countSimple(in []byte) (max int, reuse bool) {
method canUseTable (line 387) | func (s *Scratch) canUseTable(c cTable) bool {
method validateTable (line 400) | func (s *Scratch) validateTable(c cTable) bool {
method minTableLog (line 418) | func (s *Scratch) minTableLog() uint8 {
method optimalTableLog (line 428) | func (s *Scratch) optimalTableLog() {
type cTableEntry (line 449) | type cTableEntry struct
constant huffNodesMask (line 455) | huffNodesMask = huffNodesLen - 1
method buildCTable (line 457) | func (s *Scratch) buildCTable() error {
method huffSort (line 570) | func (s *Scratch) huffSort() {
method setMaxHeight (line 609) | func (s *Scratch) setMaxHeight(lastNonNull int) uint8 {
type nodeElt (line 729) | type nodeElt
method count (line 735) | func (e *nodeElt) count() uint32 { return uint32(*e) }
method parent (line 736) | func (e *nodeElt) parent() uint16 { return uint16(*e >> 32) }
method symbol (line 737) | func (e *nodeElt) symbol() byte { return byte(*e >> 48) }
method nbBits (line 738) | func (e *nodeElt) nbBits() uint8 { return uint8(*e >> 56) }
method setCount (line 740) | func (e *nodeElt) setCount(c uint32) { *e = (*e)&0xffffffff00000000 | ...
method setParent (line 741) | func (e *nodeElt) setParent(p int16) { *e = (*e)&0xffff0000ffffffff | ...
method setNbBits (line 742) | func (e *nodeElt) setNbBits(n uint8) { *e = (*e)&0x00ffffffffffffff | ...
function makeNodeElt (line 731) | func makeNodeElt(count uint32, symbol byte) nodeElt {
FILE: vendor/github.com/klauspost/compress/huff0/decompress.go
type dTable (line 12) | type dTable struct
type dEntrySingle (line 17) | type dEntrySingle struct
constant use8BitTables (line 22) | use8BitTables = true
function ReadTable (line 29) | func ReadTable(in []byte, s *Scratch) (s2 *Scratch, remain []byte, err e...
method Decompress1X (line 176) | func (s *Scratch) Decompress1X(in []byte) (out []byte, err error) {
method Decompress4X (line 191) | func (s *Scratch) Decompress4X(in []byte, dstSize int) (out []byte, err ...
method Decoder (line 208) | func (s *Scratch) Decoder() *Decoder {
type Decoder (line 217) | type Decoder struct
method buffer (line 223) | func (d *Decoder) buffer() *[4][256]byte {
method decompress1X8Bit (line 234) | func (d *Decoder) decompress1X8Bit(dst, src []byte) ([]byte, error) {
method decompress1X8BitExactly (line 537) | func (d *Decoder) decompress1X8BitExactly(dst, src []byte) ([]byte, er...
method decompress4X8bit (line 622) | func (d *Decoder) decompress4X8bit(dst, src []byte) ([]byte, error) {
method decompress4X8bitExactly (line 861) | func (d *Decoder) decompress4X8bitExactly(dst, src []byte) ([]byte, er...
method matches (line 1095) | func (s *Scratch) matches(ct cTable, w io.Writer) {
FILE: vendor/github.com/klauspost/compress/huff0/decompress_amd64.go
function decompress4x_main_loop_amd64 (line 19) | func decompress4x_main_loop_amd64(ctx *decompress4xContext)
function decompress4x_8b_main_loop_amd64 (line 26) | func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)
constant fallback8BitSize (line 29) | fallback8BitSize = 800
type decompress4xContext (line 31) | type decompress4xContext struct
method Decompress4X (line 45) | func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
function decompress1x_main_loop_amd64 (line 149) | func decompress1x_main_loop_amd64(ctx *decompress1xContext)
function decompress1x_main_loop_bmi2 (line 155) | func decompress1x_main_loop_bmi2(ctx *decompress1xContext)
type decompress1xContext (line 157) | type decompress1xContext struct
constant error_max_decoded_size_exeeded (line 167) | error_max_decoded_size_exeeded = -1
method Decompress1X (line 172) | func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/huff0/decompress_generic.go
method Decompress4X (line 16) | func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
method Decompress1X (line 202) | func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/huff0/huff0.go
constant maxSymbolValue (line 17) | maxSymbolValue = 255
constant tableLogMax (line 21) | tableLogMax = 11
constant tableLogDefault (line 22) | tableLogDefault = 11
constant minTablelog (line 23) | minTablelog = 5
constant huffNodesLen (line 24) | huffNodesLen = 512
constant BlockSizeMax (line 27) | BlockSizeMax = 1<<18 - 1
type ReusePolicy (line 44) | type ReusePolicy
constant ReusePolicyAllow (line 48) | ReusePolicyAllow ReusePolicy = iota
constant ReusePolicyPrefer (line 54) | ReusePolicyPrefer
constant ReusePolicyNone (line 58) | ReusePolicyNone
constant ReusePolicyMust (line 61) | ReusePolicyMust
type Scratch (line 64) | type Scratch struct
method TransferCTable (line 125) | func (s *Scratch) TransferCTable(src *Scratch) {
method prepare (line 134) | func (s *Scratch) prepare(in []byte) (*Scratch, error) {
method minSize (line 323) | func (s *Scratch) minSize(total int) int {
type cTable (line 178) | type cTable
method write (line 180) | func (c cTable) write(s *Scratch) error {
method estTableSize (line 250) | func (c cTable) estTableSize(s *Scratch) (sz int, err error) {
method estimateSize (line 314) | func (c cTable) estimateSize(hist []uint32) int {
function highBit32 (line 335) | func highBit32(val uint32) (n uint32) {
FILE: vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go
function HasBMI1 (line 9) | func HasBMI1() bool {
function HasBMI2 (line 14) | func HasBMI2() bool {
function DisableBMI2 (line 20) | func DisableBMI2() func() {
function HasBMI (line 29) | func HasBMI() bool {
FILE: vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go
function x86extensions (line 7) | func x86extensions() (bmi1, bmi2 bool)
function init (line 9) | func init() {
FILE: vendor/github.com/klauspost/compress/internal/le/le.go
type Indexer (line 3) | type Indexer interface
FILE: vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go
function Load8 (line 10) | func Load8[I Indexer](b []byte, i I) byte {
function Load16 (line 15) | func Load16[I Indexer](b []byte, i I) uint16 {
function Load32 (line 20) | func Load32[I Indexer](b []byte, i I) uint32 {
function Load64 (line 25) | func Load64[I Indexer](b []byte, i I) uint64 {
function Store16 (line 30) | func Store16(b []byte, v uint16) {
function Store32 (line 35) | func Store32(b []byte, v uint32) {
function Store64 (line 40) | func Store64[I Indexer](b []byte, i I, v uint64) {
FILE: vendor/github.com/klauspost/compress/internal/le/unsafe_enabled.go
function Load8 (line 12) | func Load8[I Indexer](b []byte, i I) byte {
function Load16 (line 19) | func Load16[I Indexer](b []byte, i I) uint16 {
function Load32 (line 26) | func Load32[I Indexer](b []byte, i I) uint32 {
function Load64 (line 33) | func Load64[I Indexer](b []byte, i I) uint64 {
function Store16 (line 40) | func Store16(b []byte, v uint16) {
function Store32 (line 45) | func Store32(b []byte, v uint32) {
function Store64 (line 50) | func Store64[I Indexer](b []byte, i I, v uint64) {
FILE: vendor/github.com/klauspost/compress/internal/snapref/decode.go
function DecodedLen (line 25) | func DecodedLen(src []byte) (int, error) {
function decodedLen (line 32) | func decodedLen(src []byte) (blockLen, headerLen int, err error) {
constant decodeErrCodeCorrupt (line 46) | decodeErrCodeCorrupt = 1
constant decodeErrCodeUnsupportedLiteralLength (line 47) | decodeErrCodeUnsupportedLiteralLength = 2
function Decode (line 57) | func Decode(dst, src []byte) ([]byte, error) {
function NewReader (line 79) | func NewReader(r io.Reader) *Reader {
type Reader (line 90) | type Reader struct
method Reset (line 103) | func (r *Reader) Reset(reader io.Reader) {
method readFull (line 111) | func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) {
method fill (line 121) | func (r *Reader) fill() error {
method Read (line 237) | func (r *Reader) Read(p []byte) (int, error) {
method ReadByte (line 252) | func (r *Reader) ReadByte() (byte, error) {
FILE: vendor/github.com/klauspost/compress/internal/snapref/decode_other.go
function decode (line 12) | func decode(dst, src []byte) int {
FILE: vendor/github.com/klauspost/compress/internal/snapref/encode.go
function Encode (line 20) | func Encode(dst, src []byte) []byte {
constant inputMargin (line 55) | inputMargin = 16 - 1
constant minNonLiteralBlockSize (line 74) | minNonLiteralBlockSize = 1 + 1 + inputMargin
function MaxEncodedLen (line 80) | func MaxEncodedLen(srcLen int) int {
function NewWriter (line 123) | func NewWriter(w io.Writer) *Writer {
function NewBufferedWriter (line 137) | func NewBufferedWriter(w io.Writer) *Writer {
type Writer (line 148) | type Writer struct
method Reset (line 168) | func (w *Writer) Reset(writer io.Writer) {
method Write (line 178) | func (w *Writer) Write(p []byte) (nRet int, errRet error) {
method write (line 213) | func (w *Writer) write(p []byte) (nRet int, errRet error) {
method Flush (line 271) | func (w *Writer) Flush() error {
method Close (line 284) | func (w *Writer) Close() error {
FILE: vendor/github.com/klauspost/compress/internal/snapref/encode_other.go
function load32 (line 7) | func load32(b []byte, i int) uint32 {
function load64 (line 12) | func load64(b []byte, i int) uint64 {
function emitLiteral (line 24) | func emitLiteral(dst, lit []byte) int {
function emitCopy (line 50) | func emitCopy(dst []byte, offset, length int) int {
function hash (line 90) | func hash(u, shift uint32) uint32 {
function EncodeBlockInto (line 95) | func EncodeBlockInto(dst, src []byte) (d int) {
function encodeBlock (line 124) | func encodeBlock(dst, src []byte) (d int) {
FILE: vendor/github.com/klauspost/compress/internal/snapref/snappy.go
constant tagLiteral (line 52) | tagLiteral = 0x00
constant tagCopy1 (line 53) | tagCopy1 = 0x01
constant tagCopy2 (line 54) | tagCopy2 = 0x02
constant tagCopy4 (line 55) | tagCopy4 = 0x03
constant checksumSize (line 59) | checksumSize = 4
constant chunkHeaderSize (line 60) | chunkHeaderSize = 4
constant magicChunk (line 61) | magicChunk = "\xff\x06\x00\x00" + magicBody
constant magicBody (line 62) | magicBody = "sNaPpY"
constant maxBlockSize (line 72) | maxBlockSize = 65536
constant maxEncodedLenOfMaxBlockSize (line 78) | maxEncodedLenOfMaxBlockSize = 76490
constant obufHeaderLen (line 80) | obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize
constant obufLen (line 81) | obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize
constant chunkTypeCompressedData (line 85) | chunkTypeCompressedData = 0x00
constant chunkTypeUncompressedData (line 86) | chunkTypeUncompressedData = 0x01
constant chunkTypePadding (line 87) | chunkTypePadding = 0xfe
constant chunkTypeStreamIdentifier (line 88) | chunkTypeStreamIdentifier = 0xff
function crc (line 95) | func crc(b []byte) uint32 {
FILE: vendor/github.com/klauspost/compress/zstd/bitreader.go
type bitReader (line 19) | type bitReader struct
method init (line 27) | func (b *bitReader) init(in []byte) error {
method getBits (line 51) | func (b *bitReader) getBits(n uint8) int {
method get32BitsFast (line 60) | func (b *bitReader) get32BitsFast(n uint8) uint32 {
method fillFast (line 69) | func (b *bitReader) fillFast() {
method fillFastStart (line 79) | func (b *bitReader) fillFastStart() {
method fill (line 86) | func (b *bitReader) fill() {
method finished (line 105) | func (b *bitReader) finished() bool {
method overread (line 110) | func (b *bitReader) overread() bool {
method remain (line 115) | func (b *bitReader) remain() uint {
method close (line 120) | func (b *bitReader) close() error {
function highBits (line 133) | func highBits(val uint32) (n uint32) {
FILE: vendor/github.com/klauspost/compress/zstd/bitwriter.go
type bitWriter (line 10) | type bitWriter struct
method addBits16NC (line 34) | func (b *bitWriter) addBits16NC(value uint16, bits uint8) {
method addBits32NC (line 42) | func (b *bitWriter) addBits32NC(value uint32, bits uint8) {
method addBits64NC (line 49) | func (b *bitWriter) addBits64NC(value uint64, bits uint8) {
method addBits32Clean (line 62) | func (b *bitWriter) addBits32Clean(value uint32, bits uint8) {
method addBits16Clean (line 69) | func (b *bitWriter) addBits16Clean(value uint16, bits uint8) {
method flush32 (line 75) | func (b *bitWriter) flush32() {
method flushAlign (line 89) | func (b *bitWriter) flushAlign() {
method close (line 100) | func (b *bitWriter) close() {
method reset (line 108) | func (b *bitWriter) reset(out []byte) {
FILE: vendor/github.com/klauspost/compress/zstd/blockdec.go
type blockType (line 18) | type blockType
constant blockTypeRaw (line 23) | blockTypeRaw blockType = iota
constant blockTypeRLE (line 24) | blockTypeRLE
constant blockTypeCompressed (line 25) | blockTypeCompressed
constant blockTypeReserved (line 26) | blockTypeReserved
type literalsBlockType (line 29) | type literalsBlockType
constant literalsBlockRaw (line 32) | literalsBlockRaw literalsBlockType = iota
constant literalsBlockRLE (line 33) | literalsBlockRLE
constant literalsBlockCompressed (line 34) | literalsBlockCompressed
constant literalsBlockTreeless (line 35) | literalsBlockTreeless
constant maxCompressedBlockSize (line 40) | maxCompressedBlockSize = 128 << 10
constant compressedBlockOverAlloc (line 42) | compressedBlockOverAlloc = 16
constant maxCompressedBlockSizeAlloc (line 43) | maxCompressedBlockSizeAlloc = 128<<10 + compressedBlockOverAlloc
constant maxBlockSize (line 46) | maxBlockSize = (1 << 21) - 1
constant maxMatchLen (line 48) | maxMatchLen = 131074
constant maxSequences (line 49) | maxSequences = 0x7f00 + 0xffff
constant maxOffsetBits (line 53) | maxOffsetBits = 30
type blockDec (line 66) | type blockDec struct
method String (line 112) | func (b *blockDec) String() string {
method reset (line 128) | func (b *blockDec) reset(br byteBuffer, windowSize uint64) error {
method sendErr (line 215) | func (b *blockDec) sendErr(err error) {
method Close (line 223) | func (b *blockDec) Close() {
method decodeBuf (line 227) | func (b *blockDec) decodeBuf(hist *history) error {
method decodeLiterals (line 275) | func (b *blockDec) decodeLiterals(in []byte, hist *history) (remain []...
method decodeCompressed (line 477) | func (b *blockDec) decodeCompressed(hist *history) error {
method prepareSequences (line 505) | func (b *blockDec) prepareSequences(in []byte, hist *history) (err err...
method decodeSequences (line 651) | func (b *blockDec) decodeSequences(hist *history) error {
method executeSequences (line 672) | func (b *blockDec) executeSequences(hist *history) error {
method updateHistory (line 690) | func (b *blockDec) updateHistory(hist *history) error {
function newBlockDec (line 119) | func newBlockDec(lowMem bool) *blockDec {
FILE: vendor/github.com/klauspost/compress/zstd/blockenc.go
type blockEnc (line 17) | type blockEnc struct
method init (line 37) | func (b *blockEnc) init() {
method initNewEncode (line 77) | func (b *blockEnc) initNewEncode() {
method reset (line 86) | func (b *blockEnc) reset(prev *blockEnc) {
method swapEncoders (line 102) | func (b *blockEnc) swapEncoders(prev *blockEnc) {
method pushOffsets (line 244) | func (b *blockEnc) pushOffsets() {
method popOffsets (line 249) | func (b *blockEnc) popOffsets() {
method matchOffset (line 255) | func (b *blockEnc) matchOffset(offset, lits uint32) uint32 {
method encodeRaw (line 309) | func (b *blockEnc) encodeRaw(a []byte) {
method encodeRawTo (line 322) | func (b *blockEnc) encodeRawTo(dst, src []byte) []byte {
method encodeLits (line 336) | func (b *blockEnc) encodeLits(lits []byte, raw bool) error {
method encodeRLE (line 432) | func (b *blockEnc) encodeRLE(val byte, length uint32) {
method encode (line 480) | func (b *blockEnc) encode(org []byte, raw, rawAllLits bool) error {
method genCodes (line 830) | func (b *blockEnc) genCodes() {
type blockHeader (line 108) | type blockHeader
method setLast (line 111) | func (h *blockHeader) setLast(b bool) {
method setSize (line 121) | func (h *blockHeader) setSize(v uint32) {
method setType (line 127) | func (h *blockHeader) setType(t blockType) {
method appendTo (line 133) | func (h blockHeader) appendTo(b []byte) []byte {
method String (line 138) | func (h blockHeader) String() string {
type literalsHeader (line 143) | type literalsHeader
method setType (line 146) | func (h *literalsHeader) setType(t literalsBlockType) {
method setSize (line 152) | func (h *literalsHeader) setSize(regenLen int) {
method setSizes (line 177) | func (h *literalsHeader) setSizes(compLen, inLen int, single bool) {
method appendTo (line 215) | func (h literalsHeader) appendTo(b []byte) []byte {
method size (line 235) | func (h literalsHeader) size() int {
method String (line 239) | func (h literalsHeader) String() string {
function fuzzFseEncoder (line 442) | func fuzzFseEncoder(data []byte) int {
FILE: vendor/github.com/klauspost/compress/zstd/blocktype_string.go
function _ (line 7) | func _() {
constant _blockType_name (line 17) | _blockType_name = "blockTypeRawblockTypeRLEblockTypeCompressedblockTypeR...
method String (line 21) | func (i blockType) String() string {
function _ (line 27) | func _() {
constant _literalsBlockType_name (line 37) | _literalsBlockType_name = "literalsBlockRawliteralsBlockRLEliteralsBlock...
method String (line 41) | func (i literalsBlockType) String() string {
function _ (line 47) | func _() {
constant _seqCompMode_name (line 57) | _seqCompMode_name = "compModePredefinedcompModeRLEcompModeFSEcompModeRep...
method String (line 61) | func (i seqCompMode) String() string {
function _ (line 67) | func _() {
constant _tableIndex_name (line 76) | _tableIndex_name = "tableLiteralLengthstableOffsetstableMatchLengths"
method String (line 80) | func (i tableIndex) String() string {
FILE: vendor/github.com/klauspost/compress/zstd/bytebuf.go
type byteBuffer (line 12) | type byteBuffer interface
type byteBuf (line 29) | type byteBuf
method readSmall (line 31) | func (b *byteBuf) readSmall(n int) ([]byte, error) {
method readBig (line 44) | func (b *byteBuf) readBig(n int, dst []byte) ([]byte, error) {
method readByte (line 54) | func (b *byteBuf) readByte() (byte, error) {
method skipN (line 64) | func (b *byteBuf) skipN(n int64) error {
type readerWrapper (line 77) | type readerWrapper struct
method readSmall (line 82) | func (r *readerWrapper) readSmall(n int) ([]byte, error) {
method readBig (line 100) | func (r *readerWrapper) readBig(n int, dst []byte) ([]byte, error) {
method readByte (line 111) | func (r *readerWrapper) readByte() (byte, error) {
method skipN (line 125) | func (r *readerWrapper) skipN(n int64) error {
FILE: vendor/github.com/klauspost/compress/zstd/bytereader.go
type byteReader (line 11) | type byteReader struct
method advance (line 17) | func (b *byteReader) advance(n uint) {
method overread (line 22) | func (b *byteReader) overread() bool {
method Int32 (line 27) | func (b byteReader) Int32() int32 {
method Uint8 (line 38) | func (b *byteReader) Uint8() uint8 {
method Uint32 (line 44) | func (b byteReader) Uint32() uint32 {
method Uint32NC (line 64) | func (b byteReader) Uint32NC() uint32 {
method unread (line 75) | func (b byteReader) unread() []byte {
method remain (line 80) | func (b byteReader) remain() int {
FILE: vendor/github.com/klauspost/compress/zstd/decodeheader.go
constant HeaderMaxSize (line 14) | HeaderMaxSize = 14 + 3
type Header (line 17) | type Header struct
method Decode (line 97) | func (h *Header) Decode(in []byte) error {
method DecodeAndStrip (line 109) | func (h *Header) DecodeAndStrip(in []byte) (remain []byte, err error) {
method AppendTo (line 245) | func (h *Header) AppendTo(dst []byte) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/zstd/decoder.go
type Decoder (line 22) | type Decoder struct
method Read (line 123) | func (d *Decoder) Read(p []byte) (int, error) {
method Reset (line 166) | func (d *Decoder) Reset(r io.Reader) error {
method ResetWithOptions (line 240) | func (d *Decoder) ResetWithOptions(r io.Reader, opts ...DOption) error {
method drainOutput (line 252) | func (d *Decoder) drainOutput() {
method WriteTo (line 287) | func (d *Decoder) WriteTo(w io.Writer) (int64, error) {
method DecodeAll (line 319) | func (d *Decoder) DecodeAll(input, dst []byte) ([]byte, error) {
method nextBlock (line 417) | func (d *Decoder) nextBlock(blocking bool) (ok bool) {
method nextBlockSync (line 486) | func (d *Decoder) nextBlockSync() (ok bool) {
method stashDecoder (line 569) | func (d *Decoder) stashDecoder() {
method Close (line 581) | func (d *Decoder) Close() {
method IOReadCloser (line 609) | func (d *Decoder) IOReadCloser() io.ReadCloser {
method startSyncDecoder (line 640) | func (d *Decoder) startSyncDecoder(r io.Reader) error {
method startStreamDecoder (line 655) | func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader,...
method setDict (line 942) | func (d *Decoder) setDict(frame *frameDec) (err error) {
type decoderState (line 48) | type decoderState struct
function NewReader (line 84) | func NewReader(r io.Reader, opts ...DOption) (*Decoder, error) {
type closeWrapper (line 614) | type closeWrapper struct
method WriteTo (line 619) | func (c closeWrapper) WriteTo(w io.Writer) (n int64, err error) {
method Read (line 624) | func (c closeWrapper) Read(p []byte) (n int, err error) {
method Close (line 629) | func (c closeWrapper) Close() error {
type decodeOutput (line 634) | type decodeOutput struct
FILE: vendor/github.com/klauspost/compress/zstd/decoder_options.go
type DOption (line 15) | type DOption
type decoderOptions (line 18) | type decoderOptions struct
method setDefault (line 30) | func (o *decoderOptions) setDefault() {
function WithDecoderLowmem (line 47) | func WithDecoderLowmem(b bool) DOption {
function WithDecoderConcurrency (line 68) | func WithDecoderConcurrency(n int) DOption {
function WithDecoderMaxMemory (line 90) | func WithDecoderMaxMemory(n uint64) DOption {
function WithDecoderDicts (line 112) | func WithDecoderDicts(dicts ...[]byte) DOption {
function WithDecoderDictRaw (line 131) | func WithDecoderDictRaw(id uint32, content []byte) DOption {
function WithDecoderMaxWindow (line 150) | func WithDecoderMaxWindow(size uint64) DOption {
function WithDecodeAllCapLimit (line 168) | func WithDecodeAllCapLimit(b bool) DOption {
function WithDecodeBuffersBelow (line 181) | func WithDecodeBuffersBelow(size int) DOption {
function IgnoreChecksum (line 193) | func IgnoreChecksum(b bool) DOption {
function WithDecoderDictDelete (line 203) | func WithDecoderDictDelete(ids ...uint32) DOption {
FILE: vendor/github.com/klauspost/compress/zstd/dict.go
type dict (line 15) | type dict struct
method ID (line 30) | func (d *dict) ID() uint32 {
method ContentSize (line 38) | func (d *dict) ContentSize() int {
method Content (line 46) | func (d *dict) Content() []byte {
method Offsets (line 54) | func (d *dict) Offsets() [3]int {
method LitEncoder (line 62) | func (d *dict) LitEncoder() *huff0.Scratch {
constant dictMagic (line 24) | dictMagic = "\x37\xa4\x30\xec"
constant dictMaxLength (line 27) | dictMaxLength = 1 << 31
function loadDict (line 71) | func loadDict(b []byte) (*dict, error) {
function InspectDictionary (line 153) | func InspectDictionary(b []byte) (interface {
type BuildDictOptions (line 165) | type BuildDictOptions struct
function BuildDict (line 192) | func BuildDict(o BuildDictOptions) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/zstd/enc_base.go
constant dictShardBits (line 11) | dictShardBits = 7
type fastBase (line 14) | type fastBase struct
method CRC (line 29) | func (e *fastBase) CRC() *xxhash.Digest {
method AppendCRC (line 34) | func (e *fastBase) AppendCRC(dst []byte) []byte {
method WindowSize (line 42) | func (e *fastBase) WindowSize(size int64) int32 {
method Block (line 53) | func (e *fastBase) Block() *blockEnc {
method addBlock (line 57) | func (e *fastBase) addBlock(src []byte) int32 {
method ensureHist (line 82) | func (e *fastBase) ensureHist(n int) {
method UseBlock (line 105) | func (e *fastBase) UseBlock(enc *blockEnc) {
method matchlen (line 110) | func (e *fastBase) matchlen(s, t int32, src []byte) int32 {
method resetBase (line 132) | func (e *fastBase) resetBase(d *dict, singleBlock bool) {
FILE: vendor/github.com/klauspost/compress/zstd/enc_best.go
constant bestLongTableBits (line 15) | bestLongTableBits = 22
constant bestLongTableSize (line 16) | bestLongTableSize = 1 << bestLongTableBits
constant bestLongLen (line 17) | bestLongLen = 8
constant bestShortTableBits (line 23) | bestShortTableBits = 18
constant bestShortTableSize (line 24) | bestShortTableSize = 1 << bestShortTableBits
constant bestShortLen (line 25) | bestShortLen = 4
type match (line 29) | type match struct
method estBits (line 40) | func (m *match) estBits(bitsPerByte int32) {
constant highScore (line 37) | highScore = maxMatchLen * 8
type bestFastEncoder (line 69) | type bestFastEncoder struct
method Encode (line 78) | func (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) {
method EncodeNoHist (line 471) | func (e *bestFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {
method Reset (line 477) | func (e *bestFastEncoder) Reset(d *dict, singleBlock bool) {
FILE: vendor/github.com/klauspost/compress/zstd/enc_better.go
constant betterLongTableBits (line 10) | betterLongTableBits = 19
constant betterLongTableSize (line 11) | betterLongTableSize = 1 << betterLongTableBits
constant betterLongLen (line 12) | betterLongLen = 8
constant betterShortTableBits (line 18) | betterShortTableBits = 13
constant betterShortTableSize (line 19) | betterShortTableSize = 1 << betterShortTableBits
constant betterShortLen (line 20) | betterShortLen = 5
constant betterLongTableShardCnt (line 22) | betterLongTableShardCnt = 1 << (betterLongTableBits - dictShardBits)
constant betterLongTableShardSize (line 23) | betterLongTableShardSize = betterLongTableSize / betterLongTableShardCnt
constant betterShortTableShardCnt (line 25) | betterShortTableShardCnt = 1 << (betterShortTableBits - dictShardBits)
constant betterShortTableShardSize (line 26) | betterShortTableShardSize = betterShortTableSize / betterShortTableShardCnt
type prevEntry (line 29) | type prevEntry struct
type betterFastEncoder (line 40) | type betterFastEncoder struct
method Encode (line 56) | func (e *betterFastEncoder) Encode(blk *blockEnc, src []byte) {
method EncodeNoHist (line 573) | func (e *betterFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {
method Reset (line 1092) | func (e *betterFastEncoder) Reset(d *dict, singleBlock bool) {
type betterFastEncoderDict (line 46) | type betterFastEncoderDict struct
method Encode (line 579) | func (e *betterFastEncoderDict) Encode(blk *blockEnc, src []byte) {
method Reset (line 1100) | func (e *betterFastEncoderDict) Reset(d *dict, singleBlock bool) {
method markLongShardDirty (line 1228) | func (e *betterFastEncoderDict) markLongShardDirty(entryNum uint32) {
method markShortShardDirty (line 1232) | func (e *betterFastEncoderDict) markShortShardDirty(entryNum uint32) {
FILE: vendor/github.com/klauspost/compress/zstd/enc_dfast.go
constant dFastLongTableBits (line 10) | dFastLongTableBits = 17
constant dFastLongTableSize (line 11) | dFastLongTableSize = 1 << dFastLongTableBits
constant dFastLongTableMask (line 12) | dFastLongTableMask = dFastLongTableSize - 1
constant dFastLongLen (line 13) | dFastLongLen = 8
constant dLongTableShardCnt (line 15) | dLongTableShardCnt = 1 << (dFastLongTableBits - dictShardBits)
constant dLongTableShardSize (line 16) | dLongTableShardSize = dFastLongTableSize / dLongTableShardCnt
constant dFastShortTableBits (line 18) | dFastShortTableBits = tableBits
constant dFastShortTableSize (line 19) | dFastShortTableSize = 1 << dFastShortTableBits
constant dFastShortTableMask (line 20) | dFastShortTableMask = dFastShortTableSize - 1
constant dFastShortLen (line 21) | dFastShortLen = 5
type doubleFastEncoder (line 25) | type doubleFastEncoder struct
method Encode (line 38) | func (e *doubleFastEncoder) Encode(blk *blockEnc, src []byte) {
method EncodeNoHist (line 372) | func (e *doubleFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {
method Reset (line 1033) | func (e *doubleFastEncoder) Reset(d *dict, singleBlock bool) {
type doubleFastEncoderDict (line 30) | type doubleFastEncoderDict struct
method Encode (line 678) | func (e *doubleFastEncoderDict) Encode(blk *blockEnc, src []byte) {
method Reset (line 1041) | func (e *doubleFastEncoderDict) Reset(d *dict, singleBlock bool) {
method markLongShardDirty (line 1103) | func (e *doubleFastEncoderDict) markLongShardDirty(entryNum uint32) {
FILE: vendor/github.com/klauspost/compress/zstd/enc_fast.go
constant tableBits (line 12) | tableBits = 15
constant tableSize (line 13) | tableSize = 1 << tableBits
constant tableShardCnt (line 14) | tableShardCnt = 1 << (tableBits - dictShardBits)
constant tableShardSize (line 15) | tableShardSize = tableSize / tableShardCnt
constant tableFastHashLen (line 16) | tableFastHashLen = 6
constant tableMask (line 17) | tableMask = tableSize - 1
constant maxMatchLength (line 18) | maxMatchLength = 131074
type tableEntry (line 21) | type tableEntry struct
type fastEncoder (line 26) | type fastEncoder struct
method Encode (line 39) | func (e *fastEncoder) Encode(blk *blockEnc, src []byte) {
method EncodeNoHist (line 294) | func (e *fastEncoder) EncodeNoHist(blk *blockEnc, src []byte) {
method Reset (line 793) | func (e *fastEncoder) Reset(d *dict, singleBlock bool) {
type fastEncoderDict (line 31) | type fastEncoderDict struct
method Encode (line 534) | func (e *fastEncoderDict) Encode(blk *blockEnc, src []byte) {
method Reset (line 801) | func (e *fastEncoderDict) Reset(d *dict, singleBlock bool) {
method markAllShardsDirty (line 867) | func (e *fastEncoderDict) markAllShardsDirty() {
method markShardDirty (line 871) | func (e *fastEncoderDict) markShardDirty(entryNum uint32) {
FILE: vendor/github.com/klauspost/compress/zstd/encoder.go
type Encoder (line 25) | type Encoder struct
method initialize (line 83) | func (e *Encoder) initialize() {
method Reset (line 96) | func (e *Encoder) Reset(w io.Writer) {
method ResetWithOptions (line 138) | func (e *Encoder) ResetWithOptions(w io.Writer, opts ...EOption) error {
method ResetContentSize (line 155) | func (e *Encoder) ResetContentSize(w io.Writer, size int64) {
method Write (line 167) | func (e *Encoder) Write(p []byte) (n int, err error) {
method nextBlock (line 206) | func (e *Encoder) nextBlock(final bool) error {
method ReadFrom (line 365) | func (e *Encoder) ReadFrom(r io.Reader) (n int64, err error) {
method Flush (line 419) | func (e *Encoder) Flush() error {
method Close (line 446) | func (e *Encoder) Close() error {
method EncodeAll (line 507) | func (e *Encoder) EncodeAll(src, dst []byte) []byte {
method encodeAll (line 516) | func (e *Encoder) encodeAll(enc encoder, src, dst []byte) []byte {
method MaxEncodedSize (line 628) | func (e *Encoder) MaxEncodedSize(size int) int {
type encoder (line 32) | type encoder interface
type encoderState (line 43) | type encoderState struct
function NewWriter (line 67) | func NewWriter(w io.Writer, opts ...EOption) (*Encoder, error) {
FILE: vendor/github.com/klauspost/compress/zstd/encoder_options.go
type EOption (line 13) | type EOption
type encoderOptions (line 16) | type encoderOptions struct
method setDefault (line 35) | func (o *encoderOptions) setDefault() {
method encoder (line 49) | func (o encoderOptions) encoder() encoder {
function WithEncoderCRC (line 76) | func WithEncoderCRC(b bool) EOption {
function WithEncoderConcurrency (line 87) | func WithEncoderConcurrency(n int) EOption {
function WithWindowSize (line 109) | func WithWindowSize(n int) EOption {
function WithEncoderPadding (line 140) | func WithEncoderPadding(n int) EOption {
type EncoderLevel (line 161) | type EncoderLevel
method String (line 217) | func (e EncoderLevel) String() string {
constant speedNotSet (line 164) | speedNotSet EncoderLevel = iota
constant SpeedFastest (line 168) | SpeedFastest
constant SpeedDefault (line 172) | SpeedDefault
constant SpeedBetterCompression (line 177) | SpeedBetterCompression
constant SpeedBestCompression (line 181) | SpeedBestCompression
constant speedLast (line 185) | speedLast
function EncoderLevelFromString (line 191) | func EncoderLevelFromString(s string) (bool, EncoderLevel) {
function EncoderLevelFromZstd (line 203) | func EncoderLevelFromZstd(level int) EncoderLevel {
function WithEncoderLevel (line 234) | func WithEncoderLevel(l EncoderLevel) EOption {
function WithZeroFrames (line 271) | func WithZeroFrames(b bool) EOption {
function WithAllLitEntropyCompression (line 283) | func WithAllLitEntropyCompression(b bool) EOption {
function WithNoEntropyCompression (line 295) | func WithNoEntropyCompression(b bool) EOption {
function WithSingleSegment (line 313) | func WithSingleSegment(b bool) EOption {
function WithLowerEncoderMem (line 325) | func WithLowerEncoderMem(b bool) EOption {
function WithEncoderDict (line 344) | func WithEncoderDict(dict []byte) EOption {
function WithEncoderDictRaw (line 360) | func WithEncoderDictRaw(id uint32, content []byte) EOption {
function WithEncoderDictDelete (line 372) | func WithEncoderDictDelete() EOption {
FILE: vendor/github.com/klauspost/compress/zstd/framedec.go
type frameDec (line 16) | type frameDec struct
method reset (line 65) | func (d *frameDec) reset(br byteBuffer) error {
method next (line 281) | func (d *frameDec) next(block *blockDec) error {
method checkCRC (line 297) | func (d *frameDec) checkCRC() error {
method consumeCRC (line 321) | func (d *frameDec) consumeCRC() error {
method runDecoder (line 330) | func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, erro...
constant MinWindowSize (line 39) | MinWindowSize = 1 << 10
constant MaxWindowSize (line 43) | MaxWindowSize = 1 << 29
constant frameMagic (line 47) | frameMagic = "\x28\xb5\x2f\xfd"
constant skippableFrameMagic (line 48) | skippableFrameMagic = "\x2a\x4d\x18"
function newFrameDec (line 51) | func newFrameDec(o decoderOptions) *frameDec {
FILE: vendor/github.com/klauspost/compress/zstd/frameenc.go
type frameHeader (line 15) | type frameHeader struct
method appendTo (line 25) | func (f frameHeader) appendTo(dst []byte) []byte {
constant maxHeaderSize (line 23) | maxHeaderSize = 14
constant skippableFrameHeader (line 94) | skippableFrameHeader = 4 + 4
function calcSkippableFrame (line 100) | func calcSkippableFrame(written, wantMultiple int64) int {
function skippableFrame (line 120) | func skippableFrame(dst []byte, total int, r io.Reader) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/zstd/fse_decoder.go
constant tablelogAbsoluteMax (line 15) | tablelogAbsoluteMax = 9
constant maxMemoryUsage (line 24) | maxMemoryUsage = tablelogAbsoluteMax + 2
constant maxTableLog (line 26) | maxTableLog = maxMemoryUsage - 2
constant maxTablesize (line 27) | maxTablesize = 1 << maxTableLog
constant maxTableMask (line 28) | maxTableMask = (1 << maxTableLog) - 1
constant minTablelog (line 29) | minTablelog = 5
constant maxSymbolValue (line 30) | maxSymbolValue = 255
type fseDecoder (line 34) | type fseDecoder struct
method readNCount (line 52) | func (s *fseDecoder) readNCount(b *byteReader, maxSymbol uint16) error {
method mustReadFrom (line 186) | func (s *fseDecoder) mustReadFrom(r io.Reader) {
method setRLE (line 265) | func (s *fseDecoder) setRLE(symbol decSymbol) {
method transform (line 274) | func (s *fseDecoder) transform(t []baseOffset) error {
function tableStep (line 47) | func tableStep(tableSize uint32) uint32 {
type decSymbol (line 213) | type decSymbol
method nbBits (line 219) | func (d decSymbol) nbBits() uint8 {
method addBits (line 223) | func (d decSymbol) addBits() uint8 {
method newState (line 227) | func (d decSymbol) newState() uint16 {
method baselineInt (line 231) | func (d decSymbol) baselineInt() int {
method setNBits (line 235) | func (d *decSymbol) setNBits(nBits uint8) {
method setAddBits (line 240) | func (d *decSymbol) setAddBits(addBits uint8) {
method setNewState (line 245) | func (d *decSymbol) setNewState(state uint16) {
method setExt (line 250) | func (d *decSymbol) setExt(addBits uint8, baseline uint32) {
method final (line 305) | func (s decSymbol) final() (int, uint8) {
function newDecSymbol (line 215) | func newDecSymbol(nbits, addBits uint8, newState uint16, baseline uint32...
function decSymbolValue (line 256) | func decSymbolValue(symb uint8, t []baseOffset) (decSymbol, error) {
type fseState (line 292) | type fseState struct
method init (line 298) | func (s *fseState) init(br *bitReader, tableLog uint8, dt []decSymbol) {
FILE: vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go
type buildDtableAsmContext (line 10) | type buildDtableAsmContext struct
function buildDtable_asm (line 26) | func buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int
constant errorCorruptedNormalizedCounter (line 30) | errorCorruptedNormalizedCounter = 1
constant errorNewStateTooBig (line 31) | errorNewStateTooBig = 2
constant errorNewStateNoBits (line 32) | errorNewStateNoBits = 3
method buildDtable (line 36) | func (s *fseDecoder) buildDtable() error {
FILE: vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go
method buildDtable (line 12) | func (s *fseDecoder) buildDtable() error {
FILE: vendor/github.com/klauspost/compress/zstd/fse_encoder.go
constant maxEncTableLog (line 15) | maxEncTableLog = 8
constant maxEncTablesize (line 16) | maxEncTablesize = 1 << maxTableLog
constant maxEncTableMask (line 17) | maxEncTableMask = (1 << maxTableLog) - 1
constant minEncTablelog (line 18) | minEncTablelog = 5
constant maxEncSymbolValue (line 19) | maxEncSymbolValue = maxMatchLengthSymbol
type fseEncoder (line 23) | type fseEncoder struct
method Histogram (line 65) | func (s *fseEncoder) Histogram() *[256]uint32 {
method HistogramFinished (line 73) | func (s *fseEncoder) HistogramFinished(maxSymbol uint8, maxCount int) {
method allocCtable (line 81) | func (s *fseEncoder) allocCtable() {
method buildCTable (line 102) | func (s *fseEncoder) buildCTable() error {
method setRLE (line 208) | func (s *fseEncoder) setRLE(val byte) {
method setBits (line 225) | func (s *fseEncoder) setBits(transform []byte) {
method normalizeCount (line 259) | func (s *fseEncoder) normalizeCount(length int) error {
method normalizeCount2 (line 334) | func (s *fseEncoder) normalizeCount2(length int) error {
method optimalTableLog (line 429) | func (s *fseEncoder) optimalTableLog(length int) {
method validateNorm (line 457) | func (s *fseEncoder) validateNorm() (err error) {
method writeCount (line 488) | func (s *fseEncoder) writeCount(out []byte) ([]byte, error) {
method bitCost (line 603) | func (s *fseEncoder) bitCost(symbolValue uint8, accuracyLog uint32) ui...
method approxSize (line 634) | func (s *fseEncoder) approxSize(hist []uint32) uint32 {
method maxHeaderSize (line 664) | func (s *fseEncoder) maxHeaderSize() uint32 {
type cTable (line 42) | type cTable struct
type symbolTransform (line 49) | type symbolTransform struct
method String (line 56) | func (s symbolTransform) String() string {
type cState (line 675) | type cState struct
method init (line 682) | func (c *cState) init(bw *bitWriter, ct *cTable, first symbolTransform) {
method flush (line 698) | func (c *cState) flush(tableLog uint8) {
FILE: vendor/github.com/klauspost/compress/zstd/fse_predefined.go
type tableIndex (line 36) | type tableIndex
constant tableLiteralLengths (line 40) | tableLiteralLengths tableIndex = 0
constant tableOffsets (line 41) | tableOffsets tableIndex = 1
constant tableMatchLengths (line 42) | tableMatchLengths tableIndex = 2
constant maxLiteralLengthSymbol (line 44) | maxLiteralLengthSymbol = 35
constant maxOffsetLengthSymbol (line 45) | maxOffsetLengthSymbol = 30
constant maxMatchLengthSymbol (line 46) | maxMatchLengthSymbol = 52
type baseOffset (line 50) | type baseOffset struct
function fillBase (line 56) | func fillBase(dst []baseOffset, base uint32, bits ...uint8) {
function initPredefined (line 75) | func initPredefined() {
FILE: vendor/github.com/klauspost/compress/zstd/hash.go
constant prime3bytes (line 8) | prime3bytes = 506832829
constant prime4bytes (line 9) | prime4bytes = 2654435761
constant prime5bytes (line 10) | prime5bytes = 889523592379
constant prime6bytes (line 11) | prime6bytes = 227718039650203
constant prime7bytes (line 12) | prime7bytes = 58295818150454627
constant prime8bytes (line 13) | prime8bytes = 0xcf1bbcdcb7a56463
function hashLen (line 20) | func hashLen(u uint64, length, mls uint8) uint32 {
FILE: vendor/github.com/klauspost/compress/zstd/history.go
type history (line 12) | type history struct
method reset (line 35) | func (h *history) reset() {
method freeHuffDecoder (line 48) | func (h *history) freeHuffDecoder() {
method setDict (line 57) | func (h *history) setDict(dict *dict) {
method append (line 73) | func (h *history) append(b []byte) {
method ensureBlock (line 96) | func (h *history) ensureBlock() {
method appendKeep (line 114) | func (h *history) appendKeep(b []byte) {
FILE: vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.go
constant prime1 (line 14) | prime1 uint64 = 11400714785074694791
constant prime2 (line 15) | prime2 uint64 = 14029467366897019727
constant prime3 (line 16) | prime3 uint64 = 1609587929392839161
constant prime4 (line 17) | prime4 uint64 = 9650029242287828579
constant prime5 (line 18) | prime5 uint64 = 2870177450012600261
type Digest (line 28) | type Digest struct
method Reset (line 46) | func (d *Digest) Reset() {
method Size (line 56) | func (d *Digest) Size() int { return 8 }
method BlockSize (line 59) | func (d *Digest) BlockSize() int { return 32 }
method Write (line 62) | func (d *Digest) Write(b []byte) (n int, err error) {
method Sum (line 100) | func (d *Digest) Sum(b []byte) []byte {
method Sum64 (line 116) | func (d *Digest) Sum64() uint64 {
method MarshalBinary (line 163) | func (d *Digest) MarshalBinary() ([]byte, error) {
method UnmarshalBinary (line 177) | func (d *Digest) UnmarshalBinary(b []byte) error {
function New (line 39) | func New() *Digest {
constant magic (line 158) | magic = "xxh\x06"
constant marshaledSize (line 159) | marshaledSize = len(magic) + 8*5 + 32
function appendUint64 (line 195) | func appendUint64(b []byte, x uint64) []byte {
function consumeUint64 (line 201) | func consumeUint64(b []byte) ([]byte, uint64) {
function u64 (line 206) | func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }
function u32 (line 207) | func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }
function round (line 209) | func round(acc, input uint64) uint64 {
function mergeRound (line 216) | func mergeRound(acc, val uint64) uint64 {
function rol1 (line 223) | func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) }
function rol7 (line 224) | func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) }
function rol11 (line 225) | func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }
function rol12 (line 226) | func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }
function rol18 (line 227) | func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }
function rol23 (line 228) | func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }
function rol27 (line 229) | func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }
function rol31 (line 230) | func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }
FILE: vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go
function Sum64 (line 13) | func Sum64(b []byte) uint64
function writeBlocks (line 16) | func writeBlocks(s *Digest, b []byte) int
FILE: vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.go
function Sum64 (line 7) | func Sum64(b []byte) uint64 {
function writeBlocks (line 64) | func writeBlocks(d *Digest, b []byte) int {
FILE: vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go
function Sum64String (line 4) | func Sum64String(s string) uint64 {
method WriteString (line 9) | func (d *Digest) WriteString(s string) (n int, err error) {
FILE: vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go
function matchLen (line 16) | func matchLen(a []byte, b []byte) int
FILE: vendor/github.com/klauspost/compress/zstd/matchlen_generic.go
function matchLen (line 17) | func matchLen(a, b []byte) (n int) {
FILE: vendor/github.com/klauspost/compress/zstd/seqdec.go
type seq (line 13) | type seq struct
method String (line 27) | func (s seq) String() string {
type seqVals (line 23) | type seqVals struct
type seqCompMode (line 37) | type seqCompMode
constant compModePredefined (line 40) | compModePredefined seqCompMode = iota
constant compModeRLE (line 41) | compModeRLE
constant compModeFSE (line 42) | compModeFSE
constant compModeRepeat (line 43) | compModeRepeat
type sequenceDec (line 46) | type sequenceDec struct
method init (line 54) | func (s *sequenceDec) init(br *bitReader) error {
type sequenceDecs (line 63) | type sequenceDecs struct
method initialize (line 80) | func (s *sequenceDecs) initialize(br *bitReader, hist *history, out []...
method freeDecoders (line 102) | func (s *sequenceDecs) freeDecoders() {
method execute (line 119) | func (s *sequenceDecs) execute(seqs []seqVals, hist []byte) error {
method decodeSync (line 221) | func (s *sequenceDecs) decodeSync(hist []byte) error {
method next (line 444) | func (s *sequenceDecs) next(br *bitReader, llState, mlState, ofState d...
method adjustOffset (line 463) | func (s *sequenceDecs) adjustOffset(offset, litLen int, offsetB uint8)...
function init (line 438) | func init() {
FILE: vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go
type decodeSyncAsmContext (line 13) | type decodeSyncAsmContext struct
function sequenceDecs_decodeSync_amd64 (line 38) | func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *...
function sequenceDecs_decodeSync_bmi2 (line 43) | func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *d...
function sequenceDecs_decodeSync_safe_amd64 (line 48) | func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ...
function sequenceDecs_decodeSync_safe_bmi2 (line 53) | func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, c...
method decodeSyncSimple (line 56) | func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
type decodeAsmContext (line 177) | type decodeAsmContext struct
constant noError (line 189) | noError = 0
constant errorMatchLenOfsMismatch (line 192) | errorMatchLenOfsMismatch = 1
constant errorMatchLenTooBig (line 195) | errorMatchLenTooBig = 2
constant errorMatchOffTooBig (line 198) | errorMatchOffTooBig = 3
constant errorNotEnoughLiterals (line 201) | errorNotEnoughLiterals = 4
constant errorNotEnoughSpace (line 204) | errorNotEnoughSpace = 5
constant errorOverread (line 207) | errorOverread = 6
function sequenceDecs_decode_amd64 (line 214) | func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *deco...
function sequenceDecs_decode_56_amd64 (line 221) | func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *d...
function sequenceDecs_decode_bmi2 (line 226) | func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decod...
function sequenceDecs_decode_56_bmi2 (line 231) | func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *de...
method decode (line 234) | func (s *sequenceDecs) decode(seqs []seqVals) error {
type executeAsmContext (line 313) | type executeAsmContext struct
function sequenceDecs_executeSimple_amd64 (line 331) | func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool
function sequenceDecs_executeSimple_safe_amd64 (line 336) | func sequenceDecs_executeSimple_safe_amd64(ctx *executeAsmContext) bool
method executeSimple (line 339) | func (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error {
FILE: vendor/github.com/klauspost/compress/zstd/seqdec_generic.go
method decodeSyncSimple (line 12) | func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) {
method decode (line 17) | func (s *sequenceDecs) decode(seqs []seqVals) error {
method executeSimple (line 162) | func (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error {
FILE: vendor/github.com/klauspost/compress/zstd/seqenc.go
type seqCoders (line 9) | type seqCoders struct
method swap (line 15) | func (s *seqCoders) swap(other *seqCoders) {
method setPrev (line 21) | func (s *seqCoders) setPrev(ll, ml, of *fseEncoder) {
function highBit (line 44) | func highBit(val uint32) (n uint32) {
constant maxLLCode (line 58) | maxLLCode = 35
function llCode (line 69) | func llCode(litLength uint32) uint8 {
constant maxMLCode (line 87) | maxMLCode = 52
function mlCode (line 101) | func mlCode(mlBase uint32) uint8 {
function ofCode (line 109) | func ofCode(offset uint32) uint8 {
FILE: vendor/github.com/klauspost/compress/zstd/simple_go124.go
function EncodeTo (line 20) | func EncodeTo(dst []byte, src []byte) []byte {
function DecodeTo (line 39) | func DecodeTo(dst []byte, src []byte) ([]byte, error) {
FILE: vendor/github.com/klauspost/compress/zstd/snappy.go
constant snappyTagLiteral (line 18) | snappyTagLiteral = 0x00
constant snappyTagCopy1 (line 19) | snappyTagCopy1 = 0x01
constant snappyTagCopy2 (line 20) | snappyTagCopy2 = 0x02
constant snappyTagCopy4 (line 21) | snappyTagCopy4 = 0x03
constant snappyChecksumSize (line 25) | snappyChecksumSize = 4
constant snappyMagicBody (line 26) | snappyMagicBody = "sNaPpY"
constant snappyMaxBlockSize (line 36) | snappyMaxBlockSize = 65536
constant snappyMaxEncodedLenOfMaxBlockSize (line 42) | snappyMaxEncodedLenOfMaxBlockSize = 76490
constant chunkTypeCompressedData (line 46) | chunkTypeCompressedData = 0x00
constant chunkTypeUncompressedData (line 47) | chunkTypeUncompressedData = 0x01
constant chunkTypePadding (line 48) | chunkTypePadding = 0xfe
constant chunkTypeStreamIdentifier (line 49) | chunkTypeStreamIdentifier = 0xff
type SnappyConverter (line 72) | type SnappyConverter struct
method Convert (line 82) | func (r *SnappyConverter) Convert(in io.Reader, w io.Writer) (int64, e...
method readFull (line 402) | func (r *SnappyConverter) readFull(p []byte, allowEOF bool) (ok bool) {
function decodeSnappy (line 286) | func decodeSnappy(blk *blockEnc, src []byte) error {
function snappyCRC (line 416) | func snappyCRC(b []byte) uint32 {
function snappyDecodedLen (line 423) | func snappyDecodedLen(src []byte) (blockLen, headerLen int, err error) {
FILE: vendor/github.com/klauspost/compress/zstd/zip.go
constant ZipMethodWinZip (line 14) | ZipMethodWinZip = 93
constant ZipMethodPKWare (line 19) | ZipMethodPKWare = 20
function newZipReader (line 31) | func newZipReader(opts ...DOption) func(r io.Reader) io.ReadCloser {
type pooledZipReader (line 55) | type pooledZipReader struct
method Read (line 61) | func (r *pooledZipReader) Read(p []byte) (n int, err error) {
method Close (line 76) | func (r *pooledZipReader) Close() error {
type pooledZipWriter (line 88) | type pooledZipWriter struct
method Write (line 94) | func (w *pooledZipWriter) Write(p []byte) (n int, err error) {
method Close (line 103) | func (w *pooledZipWriter) Close() error {
function ZipCompressor (line 117) | func ZipCompressor(opts ...EOption) func(w io.Writer) (io.WriteCloser, e...
function ZipDecompressor (line 139) | func ZipDecompressor(opts ...DOption) func(r io.Reader) io.ReadCloser {
FILE: vendor/github.com/klauspost/compress/zstd/zstd.go
constant debug (line 16) | debug = false
constant debugEncoder (line 19) | debugEncoder = debug
constant debugDecoder (line 22) | debugDecoder = debug
constant debugAsserts (line 25) | debugAsserts = debug || false
constant debugSequences (line 28) | debugSequences = false
constant debugMatches (line 31) | debugMatches = false
constant forcePreDef (line 34) | forcePreDef = false
constant zstdMinMatch (line 37) | zstdMinMatch = 3
constant fcsUnknown (line 40) | fcsUnknown = math.MaxUint64
function println (line 101) | func println(a ...any) {
function printf (line 107) | func printf(format string, a ...any) {
function load3232 (line 113) | func load3232(b []byte, i int32) uint32 {
function load6432 (line 117) | func load6432(b []byte, i int32) uint64 {
type byter (line 121) | type byter interface
FILE: vendor/github.com/mitchellh/go-homedir/homedir.go
function Dir (line 26) | func Dir() (string, error) {
function Expand (line 58) | func Expand(path string) (string, error) {
function Reset (line 83) | func Reset() {
function dirUnix (line 89) | func dirUnix() (string, error) {
function dirWindows (line 148) | func dirWindows() (string, error) {
FILE: vendor/github.com/morikuni/aec/aec.go
type EraseMode (line 6) | type EraseMode
function Up (line 38) | func Up(n uint) ANSI {
function Down (line 46) | func Down(n uint) ANSI {
function Right (line 54) | func Right(n uint) ANSI {
function Left (line 62) | func Left(n uint) ANSI {
function NextLine (line 70) | func NextLine(n uint) ANSI {
function PreviousLine (line 78) | func PreviousLine(n uint) ANSI {
function Column (line 86) | func Column(col uint) ANSI {
function Position (line 91) | func Position(row, col uint) ANSI {
function EraseDisplay (line 96) | func EraseDisplay(m EraseMode) ANSI {
function EraseLine (line 101) | func EraseLine(m EraseMode) ANSI {
function ScrollUp (line 106) | func ScrollUp(n int) ANSI {
function ScrollDown (line 114) | func ScrollDown(n int) ANSI {
function init (line 121) | func init() {
FILE: vendor/github.com/morikuni/aec/ansi.go
constant esc (line 8) | esc = "\x1b["
constant Reset (line 11) | Reset string = "\x1b[0m"
type ANSI (line 16) | type ANSI interface
type ansiImpl (line 26) | type ansiImpl
method With (line 33) | func (a *ansiImpl) With(ansi ...ANSI) ANSI {
method Apply (line 37) | func (a *ansiImpl) Apply(s string) string {
method String (line 41) | func (a *ansiImpl) String() string {
function newAnsi (line 28) | func newAnsi(s string) *ansiImpl {
function Apply (line 46) | func Apply(s string, ansi ...ANSI) string {
function concat (line 53) | func concat(ansi []ANSI) ANSI {
FILE: vendor/github.com/morikuni/aec/builder.go
type Builder (line 4) | type Builder struct
method With (line 17) | func (builder *Builder) With(a ...ANSI) *Builder {
method Up (line 22) | func (builder *Builder) Up(n uint) *Builder {
method Down (line 27) | func (builder *Builder) Down(n uint) *Builder {
method Right (line 32) | func (builder *Builder) Right(n uint) *Builder {
method Left (line 37) | func (builder *Builder) Left(n uint) *Builder {
method NextLine (line 42) | func (builder *Builder) NextLine(n uint) *Builder {
method PreviousLine (line 47) | func (builder *Builder) PreviousLine(n uint) *Builder {
method Column (line 52) | func (builder *Builder) Column(col uint) *Builder {
method Position (line 57) | func (builder *Builder) Position(row, col uint) *Builder {
method EraseDisplay (line 62) | func (builder *Builder) EraseDisplay(m EraseMode) *Builder {
method EraseLine (line 67) | func (builder *Builder) EraseLine(m EraseMode) *Builder {
method ScrollUp (line 72) | func (builder *Builder) ScrollUp(n int) *Builder {
method ScrollDown (line 77) | func (builder *Builder) ScrollDown(n int) *Builder {
method Save (line 82) | func (builder *Builder) Save() *Builder {
method Restore (line 87) | func (builder *Builder) Restore() *Builder {
method Hide (line 92) | func (builder *Builder) Hide() *Builder {
method Show (line 97) | func (builder *Builder) Show() *Builder {
method Report (line 102) | func (builder *Builder) Report() *Builder {
method Bold (line 107) | func (builder *Builder) Bold() *Builder {
method Faint (line 112) | func (builder *Builder) Faint() *Builder {
method Italic (line 117) | func (builder *Builder) Italic() *Builder {
method Underline (line 122) | func (builder *Builder) Underline() *Builder {
method BlinkSlow (line 127) | func (builder *Builder) BlinkSlow() *Builder {
method BlinkRapid (line 132) | func (builder *Builder) BlinkRapid() *Builder {
method Inverse (line 137) | func (builder *Builder) Inverse() *Builder {
method Conceal (line 142) | func (builder *Builder) Conceal() *Builder {
method CrossOut (line 147) | func (builder *Builder) CrossOut() *Builder {
method BlackF (line 152) | func (builder *Builder) BlackF() *Builder {
method RedF (line 157) | func (builder *Builder) RedF() *Builder {
method GreenF (line 162) | func (builder *Builder) GreenF() *Builder {
method YellowF (line 167) | func (builder *Builder) YellowF() *Builder {
method BlueF (line 172) | func (builder *Builder) BlueF() *Builder {
method MagentaF (line 177) | func (builder *Builder) MagentaF() *Builder {
method CyanF (line 182) | func (builder *Builder) CyanF() *Builder {
method WhiteF (line 187) | func (builder *Builder) WhiteF() *Builder {
method DefaultF (line 192) | func (builder *Builder) DefaultF() *Builder {
method BlackB (line 197) | func (builder *Builder) BlackB() *Builder {
method RedB (line 202) | func (builder *Builder) RedB() *Builder {
method GreenB (line 207) | func (builder *Builder) GreenB() *Builder {
method YellowB (line 212) | func (builder *Builder) YellowB() *Builder {
method BlueB (line 217) | func (builder *Builder) BlueB() *Builder {
method MagentaB (line 222) | func (builder *Bu
Copy disabled (too large)
Download .json
Condensed preview — 911 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,982K chars).
[
{
"path": ".DEREK.yml",
"chars": 2015,
"preview": "curators:\n - alexellis\n - welteki\n - rgee0\n\nfeatures:\n - dco_check\n - comments\n - pr_description_required\n - release_not"
},
{
"path": ".github/CODEOWNERS",
"chars": 10,
"preview": "@alexellis"
},
{
"path": ".github/FUNDING.yml",
"chars": 33,
"preview": "custom: [\"https://slicervm.com\"]\n"
},
{
"path": ".github/ISSUE_TEMPLATE/report-an-issue.md",
"chars": 486,
"preview": "---\nname: Report an issue\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Expected "
},
{
"path": ".github/ISSUE_TEMPLATE/request-a-feature.md",
"chars": 471,
"preview": "---\nname: Request a feature\nabout: Request a new feature or change in this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n-"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 1564,
"preview": "<!--- Provide a general summary of the issue in the Title above -->\n\n## Why do you need this?\n\n<!--- How has this issue "
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1669,
"preview": "<!--- Provide a general summary of the issue in the Title above -->\n\n## Why do you need this?\n<!--- Why is this change r"
},
{
"path": ".github/workflows/build.yaml",
"chars": 446,
"preview": "name: build\n\non:\n push:\n branches:\n - '*'\n pull_request:\n branches:\n - '*'\n\njobs:\n build:\n concurrency"
},
{
"path": ".github/workflows/publish.yaml",
"chars": 522,
"preview": "name: publish\n\non:\n push:\n tags:\n - '*'\n\njobs:\n publish:\n runs-on: ubuntu-latest\n steps:\n - uses: a"
},
{
"path": ".gitignore",
"chars": 84,
"preview": "k3sup\nbin/**\nkubeconfig\n.DS_Store\n.idea/\nmc\n/install.sh\n/*.json\n*.txt\n/bootstrap.sh\n"
},
{
"path": "EULA.md",
"chars": 10849,
"preview": "End User License Agreement (EULA) for K3sup Pro\n\nNote: K3sup CE is licensed under the MIT license, see LICENSE for detai"
},
{
"path": "LICENSE",
"chars": 1246,
"preview": "There are two editions of K3sup.\n\nK3sup Pro\n\nCopyright (c) 2025 Alex Ellis, OpenFaaS Ltd\n\nLicense: Proprietary - K3sup P"
},
{
"path": "Makefile",
"chars": 1225,
"preview": "Version := $(shell git describe --tags --dirty)\n# Version := \"dev\"\nGitCommit := $(shell git rev-parse HEAD)\nLDFLAGS := \""
},
{
"path": "README.md",
"chars": 46186,
"preview": "# k3sup 🚀 (said 'ketchup')\n\n<img src=\"docs/assets/k3sup.png\" width=\"20%\" alt=\"k3sup logo\">\n\nk3sup is a light-weight util"
},
{
"path": "cmd/get-config.go",
"chars": 4372,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\toperator \"github.com/alexellis/k3sup/pkg/"
},
{
"path": "cmd/get.go",
"chars": 374,
"preview": "package cmd\n\nimport (\n\t\"github.com/alexellis/k3sup/pkg\"\n\t\"github.com/spf13/cobra\"\n)\n\n// MakeGet creates the get parent c"
},
{
"path": "cmd/get_pro.go",
"chars": 6077,
"preview": "// Copyright Alex Ellis, OpenFaaS Ltd 2025\n// Inspired by update command in openfaas/faas-cli\npackage cmd\n\nimport (\n\t\"co"
},
{
"path": "cmd/install.go",
"chars": 17624,
"preview": "package cmd\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"github.co"
},
{
"path": "cmd/install_test.go",
"chars": 7974,
"preview": "package cmd\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/crypto/ssh\"\n)\n\n// To regenerate:\n/"
},
{
"path": "cmd/join.go",
"chars": 14782,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"path\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"errors\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\to"
},
{
"path": "cmd/join_test.go",
"chars": 4768,
"preview": "package cmd\n\nimport (\n\t\"testing\"\n)\n\ntype test struct {\n\ttitle string\n\tserverIP string\n\tjoinToken str"
},
{
"path": "cmd/node-token.go",
"chars": 3873,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"path\"\n\t\"strings\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\tssh \"github.com/alexell"
},
{
"path": "cmd/plan.go",
"chars": 5237,
"preview": "package cmd\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc"
},
{
"path": "cmd/pro.go",
"chars": 746,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/spf13/cobra\"\n)\n\nfunc MakePro() *cobra.Command {\n\tvar command = &cobra.Command"
},
{
"path": "cmd/ready.go",
"chars": 3649,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\texecute \"github.com/alexellis/go-execute/v2\"\n\t\"github.com/alexel"
},
{
"path": "cmd/update.go",
"chars": 891,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc MakeUpdate() *cobra.Co"
},
{
"path": "cmd/version.go",
"chars": 1041,
"preview": "package cmd\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/alexellis/k3sup/pkg\"\n\t\"github.com/morikuni/aec\"\n\t\"github.com/spf13/cobra\"\n)\n\n"
},
{
"path": "docs/assets/README.md",
"chars": 135,
"preview": "The assets in this directory are not licensed under the MIT license. Please contact support@openfaas.com if you would li"
},
{
"path": "get.sh",
"chars": 5432,
"preview": "#!/bin/bash\n\n# Copyright OpenFaaS Author(s) 2019\n#########################\n# Repo specific content #\n###################"
},
{
"path": "go.mod",
"chars": 1120,
"preview": "module github.com/alexellis/k3sup\n\ngo 1.25.6\n\nrequire (\n\tgithub.com/alexellis/arkade v0.0.0-20260304131458-e29d4142a4d5\n"
},
{
"path": "go.sum",
"chars": 8495,
"preview": "github.com/alexellis/arkade v0.0.0-20250818095951-5f1a8a0d86df h1:2G+jZF9Wn1o8abf70sIKWWeOvhEoBDgzJ0bxWtECHno=\ngithub.co"
},
{
"path": "hack/hashgen.sh",
"chars": 70,
"preview": "#!/bin/sh\n\nfor f in bin/k3sup*; do shasum -a 256 $f > $f.sha256; done\n"
},
{
"path": "hack/platform-tag.sh",
"chars": 238,
"preview": "#!/bin/sh\n\ngetPackage() {\n suffix=\"\"\n arch=$(uname -m)\n case $arch in\n \"aarch64\")\n suffix=\"-arm64\"\n ;;"
},
{
"path": "main.go",
"chars": 1101,
"preview": "package main\n\nimport (\n\t\"os\"\n\n\t\"github.com/alexellis/k3sup/cmd\"\n\t\"github.com/alexellis/k3sup/pkg\"\n\t\"github.com/spf13/cob"
},
{
"path": "pkg/operator/exec_operator.go",
"chars": 694,
"preview": "package ssh\n\nimport (\n\t\"context\"\n\n\tgoexecute \"github.com/alexellis/go-execute/v2\"\n)\n\n// ExecOperator executes commands o"
},
{
"path": "pkg/operator/operator.go",
"chars": 363,
"preview": "package ssh\n\n// CommandOperator executes a command on a machine to install k3sup\ntype CommandOperator interface {\n\tExecu"
},
{
"path": "pkg/operator/ssh_operator.go",
"chars": 1660,
"preview": "package ssh\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\n\t\"golang.org/x/crypto/ssh\"\n)\n\n// SSHOperator executes commands on a "
},
{
"path": "pkg/thanks.go",
"chars": 184,
"preview": "package pkg\n\n// SupportMessageShort is a tip shown to users after commands.\nconst SupportMessageShort = `Tip: Create clu"
},
{
"path": "vendor/github.com/alexellis/arkade/LICENSE",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2019 Alex Ellis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "vendor/github.com/alexellis/arkade/pkg/archive/untar.go",
"chars": 3142,
"preview": "package archive\n\nimport (\n\t\"archive/tar\"\n\tgzipc \"compress/gzip\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"str"
},
{
"path": "vendor/github.com/alexellis/arkade/pkg/archive/untar_nested.go",
"chars": 3578,
"preview": "package archive\n\nimport (\n\t\"archive/tar\"\n\t\"compress/gzip\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n)\n\n// Untar"
},
{
"path": "vendor/github.com/alexellis/arkade/pkg/archive/unzip.go",
"chars": 2120,
"preview": "// Copyright (c) arkade author(s) 2022. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the "
},
{
"path": "vendor/github.com/alexellis/arkade/pkg/env/env.go",
"chars": 1457,
"preview": "// Copyright (c) arkade author(s) 2022. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the "
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/.DEREK.yml",
"chars": 76,
"preview": "redirect: https://raw.githubusercontent.com/openfaas/faas/master/.DEREK.yml\n"
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/.gitignore",
"chars": 20,
"preview": "/go-execute\nmain.go\n"
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/LICENSE",
"chars": 1067,
"preview": "MIT License\n\nCopyright (c) 2023 Alex Ellis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/Makefile",
"chars": 23,
"preview": "all:\n\tgo test -v ./...\n"
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/README.md",
"chars": 4034,
"preview": "## go-execute\n\nA wrapper for Go's command execution packages.\n\n`go get github.com/alexellis/go-execute/v2`\n\n## Docs\n\nSee"
},
{
"path": "vendor/github.com/alexellis/go-execute/v2/exec.go",
"chars": 4811,
"preview": "package execute\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n)\n\ntype ExecTask struct {\n\t// Com"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/build.go",
"chars": 19883,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go",
"chars": 1066,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go",
"chars": 33288,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go",
"chars": 6934,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go",
"chars": 70432,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/containerd/stargz-snapshotter/estargz/types.go",
"chars": 12765,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "vendor/github.com/docker/cli/AUTHORS",
"chars": 36181,
"preview": "# File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT.\n# This file lists all contributors to the repository"
},
{
"path": "vendor/github.com/docker/cli/LICENSE",
"chars": 10765,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/docker/cli/NOTICE",
"chars": 635,
"preview": "Docker\nCopyright 2012-2017 Docker, Inc.\n\nThis product includes software developed at Docker, Inc. (https://www.docker.co"
},
{
"path": "vendor/github.com/docker/cli/cli/config/config.go",
"chars": 6007,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/dock"
},
{
"path": "vendor/github.com/docker/cli/cli/config/configfile/file.go",
"chars": 14489,
"preview": "package configfile\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings"
},
{
"path": "vendor/github.com/docker/cli/cli/config/configfile/file_unix.go",
"chars": 604,
"preview": "//go:build !windows\n\npackage configfile\n\nimport (\n\t\"os\"\n\t\"syscall\"\n)\n\n// copyFilePermissions copies file ownership and p"
},
{
"path": "vendor/github.com/docker/cli/cli/config/configfile/file_windows.go",
"chars": 97,
"preview": "package configfile\n\nfunc copyFilePermissions(src, dst string) {\n\t// TODO implement for Windows\n}\n"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/credentials.go",
"chars": 575,
"preview": "package credentials\n\nimport (\n\t\"github.com/docker/cli/cli/config/types\"\n)\n\n// Store is the interface that any credential"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/default_store.go",
"chars": 515,
"preview": "package credentials\n\nimport \"os/exec\"\n\n// DetectDefaultStore return the default credentials store for the platform if\n//"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go",
"chars": 85,
"preview": "package credentials\n\nfunc defaultCredentialsStore() string {\n\treturn \"osxkeychain\"\n}\n"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go",
"chars": 180,
"preview": "package credentials\n\nimport (\n\t\"os/exec\"\n)\n\nfunc defaultCredentialsStore() string {\n\tif _, err := exec.LookPath(\"pass\");"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go",
"chars": 116,
"preview": "//go:build !windows && !darwin && !linux\n\npackage credentials\n\nfunc defaultCredentialsStore() string {\n\treturn \"\"\n}\n"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go",
"chars": 81,
"preview": "package credentials\n\nfunc defaultCredentialsStore() string {\n\treturn \"wincred\"\n}\n"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/file_store.go",
"chars": 3786,
"preview": "package credentials\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"net/url\"\n\t\"os\"\n\t\"strings\"\n\t\"sync/atomic\"\n\n\t\"github.com/docker/cli/cli/conf"
},
{
"path": "vendor/github.com/docker/cli/cli/config/credentials/native_store.go",
"chars": 4325,
"preview": "package credentials\n\nimport (\n\t\"github.com/docker/cli/cli/config/types\"\n\t\"github.com/docker/docker-credential-helpers/cl"
},
{
"path": "vendor/github.com/docker/cli/cli/config/memorystore/store.go",
"chars": 3180,
"preview": "// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version t"
},
{
"path": "vendor/github.com/docker/cli/cli/config/types/authconfig.go",
"chars": 577,
"preview": "package types\n\n// AuthConfig contains authorization information for connecting to a Registry\ntype AuthConfig struct {\n\tU"
},
{
"path": "vendor/github.com/docker/distribution/LICENSE",
"chars": 11325,
"preview": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licens"
},
{
"path": "vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go",
"chars": 703,
"preview": "package challenge\n\nimport (\n\t\"net/url\"\n\t\"strings\"\n)\n\n// FROM: https://golang.org/src/net/http/http.go\n// Given a string "
},
{
"path": "vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go",
"chars": 5823,
"preview": "package challenge\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"sync\"\n)\n\n// Challenge carries information from a "
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/LICENSE",
"chars": 1058,
"preview": "Copyright (c) 2016 David Calavera\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this "
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/client/client.go",
"chars": 3178,
"preview": "package client\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/docker/docker-credential-helpers/cred"
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/client/command.go",
"chars": 1502,
"preview": "package client\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n)\n\n// Program is an interface to execute external programs.\ntype Program"
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go",
"chars": 5364,
"preview": "package credentials\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n)\n\n// Action defines the "
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/credentials/error.go",
"chars": 4444,
"preview": "package credentials\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\nconst (\n\t// ErrCredentialsNotFound standardizes the not found erro"
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/credentials/helper.go",
"chars": 509,
"preview": "package credentials\n\n// Helper is the interface a credentials store helper must implement.\ntype Helper interface {\n\t// A"
},
{
"path": "vendor/github.com/docker/docker-credential-helpers/credentials/version.go",
"chars": 399,
"preview": "package credentials\n\nvar (\n\t// Name is filled at linking time\n\tName = \"\"\n\n\t// Package is filled at linking time\n\tPackage"
},
{
"path": "vendor/github.com/google/go-containerregistry/LICENSE",
"chars": 11357,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/and/and_closer.go",
"chars": 1385,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/compression/compression.go",
"chars": 2970,
"preview": "// Copyright 2022 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/estargz/estargz.go",
"chars": 1801,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/gzip/zip.go",
"chars": 3609,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/redact/redact.go",
"chars": 2640,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/retry/retry.go",
"chars": 2741,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.go",
"chars": 4037,
"preview": "/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not u"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/verify/verify.go",
"chars": 3508,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/windows/windows.go",
"chars": 3337,
"preview": "// Copyright 2021 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/internal/zstd/zstd.go",
"chars": 3571,
"preview": "// Copyright 2022 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/README.md",
"chars": 12989,
"preview": "# `authn`\n\n[](https://godoc.org/g"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/anon.go",
"chars": 963,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/auth.go",
"chars": 1007,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/authn.go",
"chars": 4336,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/basic.go",
"chars": 917,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go",
"chars": 894,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/doc.go",
"chars": 723,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go",
"chars": 8631,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.go",
"chars": 1417,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/compression/compression.go",
"chars": 916,
"preview": "// Copyright 2022 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/append.go",
"chars": 3531,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/catalog.go",
"chars": 1154,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/config.go",
"chars": 842,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/copy.go",
"chars": 4798,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/delete.go",
"chars": 1040,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/digest.go",
"chars": 1522,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/doc.go",
"chars": 688,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/export.go",
"chars": 1544,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/filemap.go",
"chars": 2091,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/get.go",
"chars": 1945,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/list.go",
"chars": 1054,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go",
"chars": 1004,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/options.go",
"chars": 5164,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/pull.go",
"chars": 4394,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/push.go",
"chars": 2075,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/crane/tag.go",
"chars": 1177,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/legacy/config.go",
"chars": 1137,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/legacy/doc.go",
"chars": 778,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/README.md",
"chars": 423,
"preview": "# `legacy/tarball`\n\n[](h"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/doc.go",
"chars": 785,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/write.go",
"chars": 11407,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/logs/logs.go",
"chars": 1282,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/README.md",
"chars": 166,
"preview": "# `name`\n\n[](https://godoc.org/git"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/check.go",
"chars": 1629,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/digest.go",
"chars": 3388,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/doc.go",
"chars": 2101,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/errors.go",
"chars": 1373,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/options.go",
"chars": 2367,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/ref.go",
"chars": 2271,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/registry.go",
"chars": 4993,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/repository.go",
"chars": 4622,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/name/tag.go",
"chars": 3803,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/config.go",
"chars": 6238,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/doc.go",
"chars": 706,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.md",
"chars": 572,
"preview": "# `empty`\n\n[](https://godoc.or"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go",
"chars": 708,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go",
"chars": 1606,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go",
"chars": 1714,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/hash.go",
"chars": 3591,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/image.go",
"chars": 2005,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/index.go",
"chars": 1423,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layer.go",
"chars": 1363,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/README.md",
"chars": 337,
"preview": "# `layout`\n\n[](https://godoc."
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/blob.go",
"chars": 1110,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/doc.go",
"chars": 815,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/gc.go",
"chars": 3222,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/image.go",
"chars": 3178,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/index.go",
"chars": 3961,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go",
"chars": 864,
"preview": "// Copyright 2019 The original author or authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n/"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/options.go",
"chars": 1911,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go",
"chars": 930,
"preview": "// Copyright 2019 The original author or authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n/"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go",
"chars": 14073,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go",
"chars": 2585,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/match/match.go",
"chars": 2782,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.md",
"chars": 2171,
"preview": "# `mutate`\n\n[](https://godoc."
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.go",
"chars": 697,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.go",
"chars": 7016,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go",
"chars": 5467,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go",
"chars": 14615,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.go",
"chars": 5039,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.md",
"chars": 3390,
"preview": "# `partial`\n\n[](https://godo"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.go",
"chars": 5391,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.go",
"chars": 755,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go",
"chars": 993,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.go",
"chars": 4641,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.go",
"chars": 5911,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.go",
"chars": 11910,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/platform.go",
"chars": 3970,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/progress.go",
"chars": 896,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.md",
"chars": 4661,
"preview": "# `remote`\n\n[](https://godoc."
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.go",
"chars": 3676,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.go",
"chars": 2657,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go",
"chars": 934,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.go",
"chars": 6887,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.go",
"chars": 727,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.go",
"chars": 8921,
"preview": "// Copyright 2023 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.go",
"chars": 7487,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.go",
"chars": 7812,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.go",
"chars": 2443,
"preview": "// Copyright 2019 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.go",
"chars": 3727,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.go",
"chars": 2944,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.go",
"chars": 1323,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.go",
"chars": 11130,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.go",
"chars": 1854,
"preview": "// Copyright 2022 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.go",
"chars": 5557,
"preview": "// Copyright 2023 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go",
"chars": 12489,
"preview": "// Copyright 2023 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go",
"chars": 3712,
"preview": "// Copyright 2023 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.go",
"chars": 2760,
"preview": "// Copyright 2023 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.md",
"chars": 5625,
"preview": "# `transport`\n\n[](https://"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.go",
"chars": 2128,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go",
"chars": 11782,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.go",
"chars": 810,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.go",
"chars": 6234,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.go",
"chars": 2640,
"preview": "// Copyright 2020 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.go",
"chars": 6167,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
},
{
"path": "vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.go",
"chars": 2764,
"preview": "// Copyright 2018 Google LLC All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n"
}
]
// ... and 711 more files (download for full content)
About this extraction
This page contains the full source code of the alexellis/k3sup GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 911 files (10.7 MB), approximately 2.9M tokens, and a symbol index with 101911 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.