Copy disabled (too large)
Download .txt
Showing preview only (13,489K chars total). Download the full file to get everything.
Repository: containers/dnsname
Branch: main
Commit: bdc4ab85266a
Files: 763
Total size: 12.7 MB
Directory structure:
gitextract_sf87iksg/
├── .cirrus.yml
├── .github/
│ └── renovate.json5
├── .gitignore
├── CODE-OF-CONDUCT.md
├── LICENSE
├── Makefile
├── OWNERS
├── README.md
├── README_PODMAN.md
├── RELEASE_NOTES.md
├── SECURITY.md
├── ci/
│ └── Dockerfile
├── example/
│ └── foobar.conflist
├── go.mod
├── go.sum
├── hack/
│ ├── get_ci_vm.sh
│ └── tree_status.sh
├── plugins/
│ └── meta/
│ └── dnsname/
│ ├── config.go
│ ├── dnsname_suite_test.go
│ ├── dnsname_test.go
│ ├── files.go
│ ├── files_test.go
│ ├── main.go
│ ├── result.go
│ ├── service.go
│ └── version.go
└── vendor/
├── github.com/
│ ├── alexflint/
│ │ └── go-filemutex/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── filemutex_flock.go
│ │ └── filemutex_windows.go
│ ├── containernetworking/
│ │ ├── cni/
│ │ │ ├── LICENSE
│ │ │ └── pkg/
│ │ │ ├── skel/
│ │ │ │ └── skel.go
│ │ │ ├── types/
│ │ │ │ ├── 020/
│ │ │ │ │ └── types.go
│ │ │ │ ├── 040/
│ │ │ │ │ └── types.go
│ │ │ │ ├── 100/
│ │ │ │ │ └── types.go
│ │ │ │ ├── args.go
│ │ │ │ ├── create/
│ │ │ │ │ └── create.go
│ │ │ │ ├── internal/
│ │ │ │ │ ├── convert.go
│ │ │ │ │ └── create.go
│ │ │ │ └── types.go
│ │ │ ├── utils/
│ │ │ │ └── utils.go
│ │ │ └── version/
│ │ │ ├── conf.go
│ │ │ ├── plugin.go
│ │ │ ├── reconcile.go
│ │ │ └── version.go
│ │ └── plugins/
│ │ ├── LICENSE
│ │ ├── pkg/
│ │ │ ├── ns/
│ │ │ │ ├── README.md
│ │ │ │ └── ns_linux.go
│ │ │ └── testutils/
│ │ │ ├── bad_reader.go
│ │ │ ├── cmd.go
│ │ │ ├── dns.go
│ │ │ ├── netns_linux.go
│ │ │ └── ping.go
│ │ └── plugins/
│ │ └── ipam/
│ │ └── host-local/
│ │ └── backend/
│ │ ├── disk/
│ │ │ ├── backend.go
│ │ │ └── lock.go
│ │ └── store.go
│ ├── coreos/
│ │ └── go-iptables/
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── iptables/
│ │ ├── iptables.go
│ │ └── lock.go
│ ├── fsnotify/
│ │ └── fsnotify/
│ │ ├── .editorconfig
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fen.go
│ │ ├── fsnotify.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── inotify.go
│ │ ├── inotify_poller.go
│ │ ├── kqueue.go
│ │ ├── open_mode_bsd.go
│ │ ├── open_mode_darwin.go
│ │ └── windows.go
│ ├── nxadm/
│ │ └── tail/
│ │ ├── .gitignore
│ │ ├── CHANGES.md
│ │ ├── Dockerfile
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── ratelimiter/
│ │ │ ├── Licence
│ │ │ ├── leakybucket.go
│ │ │ ├── memory.go
│ │ │ └── storage.go
│ │ ├── tail.go
│ │ ├── tail_posix.go
│ │ ├── tail_windows.go
│ │ ├── util/
│ │ │ └── util.go
│ │ ├── watch/
│ │ │ ├── filechanges.go
│ │ │ ├── inotify.go
│ │ │ ├── inotify_tracker.go
│ │ │ ├── polling.go
│ │ │ └── watch.go
│ │ └── winfile/
│ │ └── winfile.go
│ ├── onsi/
│ │ ├── ginkgo/
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── RELEASING.md
│ │ │ ├── config/
│ │ │ │ └── config.go
│ │ │ ├── formatter/
│ │ │ │ └── formatter.go
│ │ │ ├── ginkgo_dsl.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── internal/
│ │ │ │ ├── codelocation/
│ │ │ │ │ └── code_location.go
│ │ │ │ ├── containernode/
│ │ │ │ │ └── container_node.go
│ │ │ │ ├── failer/
│ │ │ │ │ └── failer.go
│ │ │ │ ├── global/
│ │ │ │ │ └── init.go
│ │ │ │ ├── leafnodes/
│ │ │ │ │ ├── benchmarker.go
│ │ │ │ │ ├── interfaces.go
│ │ │ │ │ ├── it_node.go
│ │ │ │ │ ├── measure_node.go
│ │ │ │ │ ├── runner.go
│ │ │ │ │ ├── setup_nodes.go
│ │ │ │ │ ├── suite_nodes.go
│ │ │ │ │ ├── synchronized_after_suite_node.go
│ │ │ │ │ └── synchronized_before_suite_node.go
│ │ │ │ ├── remote/
│ │ │ │ │ ├── aggregator.go
│ │ │ │ │ ├── forwarding_reporter.go
│ │ │ │ │ ├── output_interceptor.go
│ │ │ │ │ ├── output_interceptor_unix.go
│ │ │ │ │ ├── output_interceptor_win.go
│ │ │ │ │ └── server.go
│ │ │ │ ├── spec/
│ │ │ │ │ ├── spec.go
│ │ │ │ │ └── specs.go
│ │ │ │ ├── spec_iterator/
│ │ │ │ │ ├── index_computer.go
│ │ │ │ │ ├── parallel_spec_iterator.go
│ │ │ │ │ ├── serial_spec_iterator.go
│ │ │ │ │ ├── sharded_parallel_spec_iterator.go
│ │ │ │ │ └── spec_iterator.go
│ │ │ │ ├── specrunner/
│ │ │ │ │ ├── random_id.go
│ │ │ │ │ └── spec_runner.go
│ │ │ │ ├── suite/
│ │ │ │ │ └── suite.go
│ │ │ │ ├── testingtproxy/
│ │ │ │ │ └── testing_t_proxy.go
│ │ │ │ └── writer/
│ │ │ │ ├── fake_writer.go
│ │ │ │ └── writer.go
│ │ │ ├── reporters/
│ │ │ │ ├── default_reporter.go
│ │ │ │ ├── fake_reporter.go
│ │ │ │ ├── junit_reporter.go
│ │ │ │ ├── reporter.go
│ │ │ │ ├── stenographer/
│ │ │ │ │ ├── console_logging.go
│ │ │ │ │ ├── fake_stenographer.go
│ │ │ │ │ ├── stenographer.go
│ │ │ │ │ └── support/
│ │ │ │ │ ├── go-colorable/
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── colorable_others.go
│ │ │ │ │ │ ├── colorable_windows.go
│ │ │ │ │ │ └── noncolorable.go
│ │ │ │ │ └── go-isatty/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── isatty_appengine.go
│ │ │ │ │ ├── isatty_bsd.go
│ │ │ │ │ ├── isatty_linux.go
│ │ │ │ │ ├── isatty_solaris.go
│ │ │ │ │ └── isatty_windows.go
│ │ │ │ └── teamcity_reporter.go
│ │ │ └── types/
│ │ │ ├── code_location.go
│ │ │ ├── deprecation_support.go
│ │ │ ├── synchronization.go
│ │ │ └── types.go
│ │ └── gomega/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── Dockerfile
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── RELEASING.md
│ │ ├── docker-compose.yaml
│ │ ├── format/
│ │ │ └── format.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── gomega_dsl.go
│ │ ├── internal/
│ │ │ ├── assertion.go
│ │ │ ├── async_assertion.go
│ │ │ ├── duration_bundle.go
│ │ │ └── gomega.go
│ │ ├── matchers/
│ │ │ ├── and.go
│ │ │ ├── assignable_to_type_of_matcher.go
│ │ │ ├── attributes_slice.go
│ │ │ ├── be_a_directory.go
│ │ │ ├── be_a_regular_file.go
│ │ │ ├── be_an_existing_file.go
│ │ │ ├── be_closed_matcher.go
│ │ │ ├── be_element_of_matcher.go
│ │ │ ├── be_empty_matcher.go
│ │ │ ├── be_equivalent_to_matcher.go
│ │ │ ├── be_false_matcher.go
│ │ │ ├── be_identical_to.go
│ │ │ ├── be_nil_matcher.go
│ │ │ ├── be_numerically_matcher.go
│ │ │ ├── be_sent_matcher.go
│ │ │ ├── be_temporally_matcher.go
│ │ │ ├── be_true_matcher.go
│ │ │ ├── be_zero_matcher.go
│ │ │ ├── consist_of.go
│ │ │ ├── contain_element_matcher.go
│ │ │ ├── contain_elements_matcher.go
│ │ │ ├── contain_substring_matcher.go
│ │ │ ├── equal_matcher.go
│ │ │ ├── have_cap_matcher.go
│ │ │ ├── have_field.go
│ │ │ ├── have_http_body_matcher.go
│ │ │ ├── have_http_header_with_value_matcher.go
│ │ │ ├── have_http_status_matcher.go
│ │ │ ├── have_key_matcher.go
│ │ │ ├── have_key_with_value_matcher.go
│ │ │ ├── have_len_matcher.go
│ │ │ ├── have_occurred_matcher.go
│ │ │ ├── have_prefix_matcher.go
│ │ │ ├── have_suffix_matcher.go
│ │ │ ├── match_error_matcher.go
│ │ │ ├── match_json_matcher.go
│ │ │ ├── match_regexp_matcher.go
│ │ │ ├── match_xml_matcher.go
│ │ │ ├── match_yaml_matcher.go
│ │ │ ├── not.go
│ │ │ ├── or.go
│ │ │ ├── panic_matcher.go
│ │ │ ├── receive_matcher.go
│ │ │ ├── satisfy_matcher.go
│ │ │ ├── semi_structured_data_support.go
│ │ │ ├── succeed_matcher.go
│ │ │ ├── support/
│ │ │ │ └── goraph/
│ │ │ │ ├── bipartitegraph/
│ │ │ │ │ ├── bipartitegraph.go
│ │ │ │ │ └── bipartitegraphmatching.go
│ │ │ │ ├── edge/
│ │ │ │ │ └── edge.go
│ │ │ │ ├── node/
│ │ │ │ │ └── node.go
│ │ │ │ └── util/
│ │ │ │ └── util.go
│ │ │ ├── type_support.go
│ │ │ └── with_transform.go
│ │ ├── matchers.go
│ │ └── types/
│ │ └── types.go
│ ├── pkg/
│ │ └── errors/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── errors.go
│ │ ├── go113.go
│ │ └── stack.go
│ └── vishvananda/
│ ├── netlink/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── addr.go
│ │ ├── addr_linux.go
│ │ ├── bpf_linux.go
│ │ ├── bridge_linux.go
│ │ ├── class.go
│ │ ├── class_linux.go
│ │ ├── conntrack_linux.go
│ │ ├── conntrack_unspecified.go
│ │ ├── devlink_linux.go
│ │ ├── filter.go
│ │ ├── filter_linux.go
│ │ ├── fou.go
│ │ ├── fou_linux.go
│ │ ├── fou_unspecified.go
│ │ ├── genetlink_linux.go
│ │ ├── genetlink_unspecified.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── gtp_linux.go
│ │ ├── handle_linux.go
│ │ ├── handle_unspecified.go
│ │ ├── inet_diag.go
│ │ ├── ioctl_linux.go
│ │ ├── ipset_linux.go
│ │ ├── link.go
│ │ ├── link_linux.go
│ │ ├── link_tuntap_linux.go
│ │ ├── neigh.go
│ │ ├── neigh_linux.go
│ │ ├── netlink.go
│ │ ├── netlink_linux.go
│ │ ├── netlink_unspecified.go
│ │ ├── netns_linux.go
│ │ ├── netns_unspecified.go
│ │ ├── nl/
│ │ │ ├── addr_linux.go
│ │ │ ├── bridge_linux.go
│ │ │ ├── conntrack_linux.go
│ │ │ ├── devlink_linux.go
│ │ │ ├── genetlink_linux.go
│ │ │ ├── ipset_linux.go
│ │ │ ├── link_linux.go
│ │ │ ├── lwt_linux.go
│ │ │ ├── mpls_linux.go
│ │ │ ├── nl_linux.go
│ │ │ ├── nl_unspecified.go
│ │ │ ├── parse_attr_linux.go
│ │ │ ├── rdma_link_linux.go
│ │ │ ├── route_linux.go
│ │ │ ├── seg6_linux.go
│ │ │ ├── seg6local_linux.go
│ │ │ ├── syscall.go
│ │ │ ├── tc_linux.go
│ │ │ ├── xfrm_linux.go
│ │ │ ├── xfrm_monitor_linux.go
│ │ │ ├── xfrm_policy_linux.go
│ │ │ └── xfrm_state_linux.go
│ │ ├── order.go
│ │ ├── protinfo.go
│ │ ├── protinfo_linux.go
│ │ ├── qdisc.go
│ │ ├── qdisc_linux.go
│ │ ├── rdma_link_linux.go
│ │ ├── route.go
│ │ ├── route_linux.go
│ │ ├── route_unspecified.go
│ │ ├── rule.go
│ │ ├── rule_linux.go
│ │ ├── socket.go
│ │ ├── socket_linux.go
│ │ ├── tcp.go
│ │ ├── tcp_linux.go
│ │ ├── xfrm.go
│ │ ├── xfrm_monitor_linux.go
│ │ ├── xfrm_policy.go
│ │ ├── xfrm_policy_linux.go
│ │ ├── xfrm_state.go
│ │ └── xfrm_state_linux.go
│ └── netns/
│ ├── LICENSE
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ ├── netns.go
│ ├── netns_linux.go
│ └── netns_unspecified.go
├── golang.org/
│ └── x/
│ ├── net/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── html/
│ │ ├── atom/
│ │ │ ├── atom.go
│ │ │ └── table.go
│ │ ├── charset/
│ │ │ └── charset.go
│ │ ├── const.go
│ │ ├── doc.go
│ │ ├── doctype.go
│ │ ├── entity.go
│ │ ├── escape.go
│ │ ├── foreign.go
│ │ ├── node.go
│ │ ├── parse.go
│ │ ├── render.go
│ │ └── token.go
│ ├── sys/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── internal/
│ │ │ └── unsafeheader/
│ │ │ └── unsafeheader.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_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
│ │ │ ├── bluetooth_linux.go
│ │ │ ├── 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
│ │ │ ├── epoll_zos.go
│ │ │ ├── fcntl.go
│ │ │ ├── fcntl_darwin.go
│ │ │ ├── fcntl_linux_32bit.go
│ │ │ ├── fdset.go
│ │ │ ├── fstatfs_zos.go
│ │ │ ├── gccgo.go
│ │ │ ├── gccgo_c.c
│ │ │ ├── gccgo_linux_amd64.go
│ │ │ ├── ifreq_linux.go
│ │ │ ├── ioctl.go
│ │ │ ├── ioctl_linux.go
│ │ │ ├── ioctl_zos.go
│ │ │ ├── mkall.sh
│ │ │ ├── mkerrors.sh
│ │ │ ├── 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
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_aix.go
│ │ │ ├── syscall_aix_ppc.go
│ │ │ ├── syscall_aix_ppc64.go
│ │ │ ├── syscall_bsd.go
│ │ │ ├── syscall_darwin.1_12.go
│ │ │ ├── syscall_darwin.1_13.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_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_mips64.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
│ │ │ ├── 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_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
│ │ │ ├── zsyscall_aix_ppc.go
│ │ │ ├── zsyscall_aix_ppc64.go
│ │ │ ├── zsyscall_aix_ppc64_gc.go
│ │ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ │ ├── zsyscall_darwin_amd64.1_13.go
│ │ │ ├── zsyscall_darwin_amd64.1_13.s
│ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ ├── zsyscall_darwin_amd64.s
│ │ │ ├── zsyscall_darwin_arm64.1_13.go
│ │ │ ├── zsyscall_darwin_arm64.1_13.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_amd64.go
│ │ │ ├── zsyscall_openbsd_arm.go
│ │ │ ├── zsyscall_openbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_mips64.go
│ │ │ ├── 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
│ │ │ ├── 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_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_illumos_amd64.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_solaris_amd64.go
│ │ │ └── ztypes_zos_s390x.go
│ │ └── windows/
│ │ ├── aliases.go
│ │ ├── dll_windows.go
│ │ ├── empty.s
│ │ ├── 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
│ └── text/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── encoding/
│ │ ├── charmap/
│ │ │ ├── charmap.go
│ │ │ └── tables.go
│ │ ├── encoding.go
│ │ ├── htmlindex/
│ │ │ ├── htmlindex.go
│ │ │ ├── map.go
│ │ │ └── tables.go
│ │ ├── internal/
│ │ │ ├── identifier/
│ │ │ │ ├── identifier.go
│ │ │ │ └── mib.go
│ │ │ └── internal.go
│ │ ├── japanese/
│ │ │ ├── all.go
│ │ │ ├── eucjp.go
│ │ │ ├── iso2022jp.go
│ │ │ ├── shiftjis.go
│ │ │ └── tables.go
│ │ ├── korean/
│ │ │ ├── euckr.go
│ │ │ └── tables.go
│ │ ├── simplifiedchinese/
│ │ │ ├── all.go
│ │ │ ├── gbk.go
│ │ │ ├── hzgb2312.go
│ │ │ └── tables.go
│ │ ├── traditionalchinese/
│ │ │ ├── big5.go
│ │ │ └── tables.go
│ │ └── unicode/
│ │ ├── override.go
│ │ └── unicode.go
│ ├── internal/
│ │ ├── language/
│ │ │ ├── common.go
│ │ │ ├── compact/
│ │ │ │ ├── compact.go
│ │ │ │ ├── language.go
│ │ │ │ ├── parents.go
│ │ │ │ ├── tables.go
│ │ │ │ └── tags.go
│ │ │ ├── compact.go
│ │ │ ├── compose.go
│ │ │ ├── coverage.go
│ │ │ ├── language.go
│ │ │ ├── lookup.go
│ │ │ ├── match.go
│ │ │ ├── parse.go
│ │ │ ├── tables.go
│ │ │ └── tags.go
│ │ ├── tag/
│ │ │ └── tag.go
│ │ └── utf8internal/
│ │ └── utf8internal.go
│ ├── language/
│ │ ├── coverage.go
│ │ ├── doc.go
│ │ ├── go1_1.go
│ │ ├── go1_2.go
│ │ ├── language.go
│ │ ├── match.go
│ │ ├── parse.go
│ │ ├── tables.go
│ │ └── tags.go
│ ├── runes/
│ │ ├── cond.go
│ │ └── runes.go
│ └── transform/
│ └── transform.go
├── gopkg.in/
│ ├── tomb.v1/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── tomb.go
│ └── yaml.v2/
│ ├── .travis.yml
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── NOTICE
│ ├── README.md
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── go.mod
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── modules.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .cirrus.yml
================================================
---
env:
GOPATH: "/var/tmp/go"
CIRRUS_WORKING_DIR: "${GOPATH}/src/github.com/containers/dnsname"
GOSRC: "$CIRRUS_WORKING_DIR"
CIRRUS_SHELL: "/bin/bash"
IMAGE_PROJECT: "libpod-218412"
HOME: "/root" # not set by default
GOCACHE: "${GOPATH}/cache"
# Make names more readable in github/cirrus-ci
FEDORA_NAME: "fedora-38"
DEBIAN_NAME: "debian-12"
# VM Images are maintained in the automation_images repo.
IMAGE_SUFFIX: "c20230517t144652z-f38f37d12"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}"
# Must be defined true when testing w/in containers
CONTAINER: "false"
gcp_credentials: ENCRYPTED[5ad247acfd6cfca94554b973d61a98a7882dfafbfcc1deb5faee8634cb3f8cf29720c88c243586d2975dd40885279db6]
# Default VM to use unless set or modified by task
gce_instance:
image_project: "${IMAGE_PROJECT}"
zone: "us-central1-c" # Required by Cirrus for the time being
cpu: 2
memory: "4Gb"
disk: 200 # Required for performance reasons
image_name: "${FEDORA_CACHE_IMAGE_NAME}"
# Update metadata on VM images referenced by this repository state
meta_task:
# see bors.toml
skip: $CIRRUS_BRANCH =~ ".*\.tmp"
container:
image: "quay.io/libpod/imgts:latest"
cpu: 1
memory: 1
env:
CONTAINER: true
# Space-separated list of images used by this repository state
IMGNAMES: |-
${FEDORA_CACHE_IMAGE_NAME}
${DEBIAN_CACHE_IMAGE_NAME}
BUILDID: "${CIRRUS_BUILD_ID}"
REPOREF: "${CIRRUS_REPO_NAME}"
GCPJSON: ENCRYPTED[35f6dca7928a3b676c05e0e6a6ce7f4ca3d347803e23b8d5d57ea8a22973248e2808e8726b9463b00b57e576c5ff0331]
GCPNAME: ENCRYPTED[f3890da8c780aaa352ae8d1e3c9fedffd0a233625c1b983e6754e609a92d5c814167ee53ef967896d66c73710c90465e]
GCPPROJECT: ENCRYPTED[e82537cfb95d6121717be1f23078a18b14de224de82ed2f72c0a8f0adc77b5c7e8ad394d10714214bccb9f010d65ac29]
CIRRUS_CLONE_DEPTH: 1 # source not used
script: /usr/local/bin/entrypoint.sh
validate_task:
validate_script:
- export PATH="$PATH:$GOPATH/bin"
- make validate
- make vendor
- ./hack/tree_status.sh
- make
test_task:
alias: test
depends_on:
- validate
matrix:
- name: $FEDORA_NAME
gce_instance:
image_name: ${FEDORA_CACHE_IMAGE_NAME}
- name: $DEBIAN_NAME
gce_instance:
image_name: ${DEBIAN_CACHE_IMAGE_NAME}
test_script:
- export PATH="$PATH:$GOPATH/bin"
- make
- make test
================================================
FILE: .github/renovate.json5
================================================
/*
Renovate is a service similar to GitHub Dependabot, but with
(fantastically) more configuration options. So many options
in fact, if you're new I recommend glossing over this cheat-sheet
prior to the official documentation:
https://www.augmentedmind.de/2021/07/25/renovate-bot-cheat-sheet
Configuration Update/Change Procedure:
1. Make changes
2. Manually validate changes (from repo-root):
podman run -it \
-v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \
docker.io/renovate/renovate:latest \
renovate-config-validator
3. Commit.
Configuration Reference:
https://docs.renovatebot.com/configuration-options/
Monitoring Dashboard:
https://app.renovatebot.com/dashboard#github/containers
Note: The Renovate bot will create/manage it's business on
branches named 'renovate/*'. Otherwise, and by
default, the only the copy of this file that matters
is the one on the `main` branch. No other branches
will be monitored or touched in any way.
*/
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
/*************************************************
****** Global/general configuration options *****
*************************************************/
// Re-use predefined sets of configuration options to DRY
"extends": [
// https://github.com/containers/automation/blob/main/renovate/defaults.json5
"github>containers/automation//renovate/defaults.json5"
],
// Permit automatic rebasing when base-branch changes by more than
// one commit.
"rebaseWhen": "behind-base-branch",
/*************************************************
*** Repository-specific configuration options ***
*************************************************/
// Don't leave dep. update. PRs "hanging", assign them to people.
"assignees": ["baude"],
}
================================================
FILE: .gitignore
================================================
bin/*
================================================
FILE: CODE-OF-CONDUCT.md
================================================
## The dnsname Project Community Code of Conduct
The dnsname project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).
================================================
FILE: 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: Makefile
================================================
export GOPROXY=https://proxy.golang.org
GO ?= go
EPOCH_TEST_COMMIT ?= 394c06f491fe9f1c28a410e3b0b91916a5119406
DESTDIR ?=
LIBEXECDIR ?= ${PREFIX}/libexec/cni
PREFIX ?= /usr/local
PROJECT := github.com/containers/dnsname
FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH)))
GOPKGDIR := $(FIRST_GOPATH)/src/$(PROJECT)
GOPKGBASEDIR ?= $(shell dirname "$(GOPKGDIR)")
SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z)
COMMIT_NO ?= $(shell git rev-parse HEAD 2> /dev/null || true)
GIT_COMMIT ?= $(if $(shell git status --porcelain --untracked-files=no),${COMMIT_NO}-dirty,${COMMIT_NO})
LDFLAGS_DNSNAME ?= -X main.gitCommit=$(GIT_COMMIT)
GO_BUILD=$(GO) build
# Go module support: set `-mod=vendor` to use the vendored sources
ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true)
GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor
endif
GOBIN := $(shell $(GO) env GOBIN)
ifeq ($(GOBIN),)
GOBIN := $(FIRST_GOPATH)/bin
endif
all: binaries
validate: install.tools gofmt .gitvalidation lint
gofmt:
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
git diff --exit-code
binaries:
$(GO_BUILD) -ldflags '$(LDFLAGS_DNSNAME)' -o bin/dnsname github.com/containers/dnsname/plugins/meta/dnsname
.PHONY: .gitvalidation
.gitvalidation:
GIT_CHECK_EXCLUDE="./vendor" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: install.tools
install.tools: .install.gitvalidation .install.ginkgo .install.golangci-lint
lint: .install.golangci-lint
./bin/golangci-lint run
define go-get
env GO111MODULE=off \
$(GO) get -u ${1}
endef
.install.ginkgo:
if [ ! -x "$(GOBIN)/ginkgo" ]; then \
$(call go-get,github.com/onsi/ginkgo/ginkgo); \
fi
.install.gitvalidation:
if [ ! -x "$(GOBIN)/git-validation" ]; then \
$(call go-get,github.com/vbatts/git-validation); \
fi
.install.golangci-lint:
if [ ! -x "./bin/golangci-lint" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.1 ; \
fi
install:
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(LIBEXECDIR)
install ${SELINUXOPT} -m 755 bin/dnsname $(DESTDIR)$(LIBEXECDIR)/dnsname
clean:
rm -fr bin/
test: .install.ginkgo
$(GO) test -v ./...
vendor:
export GO111MODULE=on \
$(GO) mod tidy && \
$(GO) mod vendor && \
$(GO) mod verify
.PHONY: vendor-in-container
vendor-in-container:
podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src docker.io/library/golang:1.13 make vendor
.PHONY: \
binaries \
test \
gofmt \
lint \
validate \
vendor
================================================
FILE: OWNERS
================================================
approvers:
- mheon
- baude
- mrunalp
- rhatdan
- TomSweeneyRedHat
- giuseppe
- vrothberg
- jwhonce
reviewers:
- mheon
- baude
- mrunalp
- rhatdan
- TomSweeneyRedHat
- giuseppe
- vrothberg
- jwhonce
================================================
FILE: README.md
================================================
# dnsname plugin
## IMPORTANT
As of 2023, this repository is no longer actively maintained. Our development efforts are happening in [netavark](https://github.com/containers/netavark/) and [aardvark-dns](https://github.com/containers/aardvark-dns/) that should provide a better alternative.
## Overview
This plugin sets up the use of dnsmasq on a given CNI network so that Pods can resolve each other by name. When configured,
the pod and its IP address are added to a network specific hosts file that dnsmasq reads in. Similarly, when a pod
is removed from the network, it will remove the entry from the hosts file. Each CNI network will have its own dnsmasq
instance.
The *dnsname* plugin was specifically designed for the [Podman](https://github.com/containers/podman) container engine.
Follow the [mini-tutorial](README_PODMAN.md) to use it with Podman.
## Usage
The dnsname plugin can be enabled in the cni network configuration file.
```
{
"cniVersion": "0.4.0",
"name": "cni-bridge-network",
"plugins": [
{
"type": "bridge",
"bridge": "cni0",
...
}
},
{
"type": "dnsname",
"domainName": "foobar.com",
"capabilities": {
"aliases": true
}
}
]
}
```
## DNSMasq configuration files
The dnsmasq service and its configuration files are considered to be very fluid and are not meant to survive a system
reboot. Therefore, files are stored in `/run/containers/cni/dnsname`, or under `$XDG_RUNTIME_DIR/containers/cni/dnsname` if
`XDG_RUNTIME_DIR` is specified. The plugin knows to recreate the necessary files if it detects they are not present.
## DNSMasq default configuration
Much like the implementation of DNSMasq for libvirt, this plugin will only set up dnsmasq to listen on the network
interfaces associated with the CNI network. The DNSMasq services are not configured or managed by systemd but rather
only by the plugin itself.
## Network aliases
The dnsname plugin is capable of not only adding the container name for DNS resolution but also adding network aliases. These
aliases are also added to the DNSMasq host file.
## Reporting issues
If you are using dnsname code compiled directly from github, then reporting bugs and problem to the dnsname github issues tracker
is appropriate. In the case that you are using code compiled and provided by a Linux distribution, you should file the problem
with their appropriate bug tracker (bugzilla/trackpad).
================================================
FILE: README_PODMAN.md
================================================
# Using the dnsname plugin with Podman
The *dnsname* plugin allows containers to resolve each other by name. The plugin adds each
container's name to an instance of a dnsmasq server. The plugin is enabled through adding it to a network's
CNI configuration. The containers will only be able to resolve each other if they are on the same CNI network.
This tutorial assumes you already have Podman, containernetworking-plugins, and a golang development environment installed.
## Install dnsmasq
Using your package manager, install the *dnsmasq* package. For Fedora, this would be:
`sudo dnf install dnsmasq`
### AppArmor
If your system uses AppArmor, it can prevent dnsmasq to open the necessary files. To fix this, add the following lines to `/etc/apparmor.d/local/usr.sbin.dnsmasq`:
```
# required by the dnsname plugin in podman
/run/containers/cni/dnsname/*/dnsmasq.conf r,
/run/containers/cni/dnsname/*/addnhosts r,
/run/containers/cni/dnsname/*/pidfile rw,
```
Then reload the main dnsmasq profile:
```
sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.dnsmasq
```
## Build and install
1. using git, clone the *github.com/containers/dnsname* repository.
2. make install PREFIX=/usr -- this will install the dnsname plugin into /usr/libexec/cni where
your CNI plugins should already exist.
## Configure a CNI network for Podman
1. Create a new network using `podman network create`. For example, `podman network create foobar` will suffice.
The following example [configuration file](example/foobar.conflist) shows a usable example for Podman.
2. (optional)+The configuration will be automatically enabled for newly created networks via
`podman network create`. If you want to add this feature to an exisiting network add the needed
lines to `/etc/cni/net.d/foobar.conflist` using your favorite editor. For example:
```
{
"cniVersion": "0.4.0",
"name": "foobar",
"plugins": [
...
{
"type": "dnsname",
"domainName": "dns.podman",
"capabilities": {
"aliases": true
}
}
]
}
```
## Example: container name resolution
In this test image, the nginx server will
respond with *podman rulez* on an http request.
**Note**: we use the --network foobar here.
```console
sudo podman run -dt --name web --network foobar quay.io/libpod/alpine_nginx:latest
5139d65d22135e9ecab511559d863754550894a32285befd94dab231017048c2
sudo podman run -it --name client --network foobar quay.io/libpod/alpine_nginx:latest curl http://web.dns.podman/
podman rulez
```
## Enabling name resolution on the default Podman network
After making sure the *dnsplugin* is functioning properly, you can add name resolution to your default Podman
network. This can be done two different ways:
1. Add the *dnsname* plugin as described in above to your default Podman network. This default network is
usually `/etc/cni/net.d/87-podman-bridge.conflist`.
================================================
FILE: RELEASE_NOTES.md
================================================
# Release Notes
## 1.3.1
- Fixed an issue where an incorrect use of `LDFLAGS` made `dnsname` unable to build in some packaging systems.
## 1.3.0
- Fixed a bug where errors when removing a container from `dnsname` could cause CNI to fail to clean up iptables rules for the container.
- Fixed a bug where `dnsname` would never remove unused configuration files for networks that no longer had containers present.
- If errors occur when running `dnsmasq`, the full error message is now displayed for debugging.
- The version number of `dnsname` is now displayed correctly.
## 1.2.0
- DNS Search domains required to use the `dnsname` plugin are now returned in the CNI response.
## 1.1.1
- Fixed a bug where network aliases support was nonfunctional.
## 1.1.0
- Added support for network aliases - multiple names for the same container.
## 1.0.0
- Initial release
================================================
FILE: SECURITY.md
================================================
## Security and Disclosure Information Policy for the dnsname Project
The dnsname Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.
================================================
FILE: ci/Dockerfile
================================================
FROM registry.fedoraproject.org/fedora:latest
RUN dnf update -y && dnf install -y golang make findutils && dnf -y clean all
================================================
FILE: example/foobar.conflist
================================================
{
"cniVersion": "0.4.0",
"name": "foobar",
"plugins": [
{
"type": "bridge",
"bridge": "cni-podman1",
"isGateway": true,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"type": "host-local",
"routes": [
{
"dst": "0.0.0.0/0"
}
],
"ranges": [
[
{
"subnet": "10.89.0.0/24"
}
]
]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
},
{
"type": "firewall",
"backend": ""
},
{
"type": "tuning"
},
{
"type": "dnsname",
"domainName": "dns.podman",
"capabilities": {
"aliases": true
}
}
]
}
================================================
FILE: go.mod
================================================
module github.com/containers/dnsname
go 1.13
require (
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v0.9.1
github.com/coreos/go-iptables v0.6.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.2
github.com/vishvananda/netlink v1.1.1-0.20210916161339-2c39f3491956
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
)
================================================
FILE: go.sum
================================================
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y=
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ=
github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw=
github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8=
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
github.com/coreos/go-iptables v0.6.0 h1:is9qnZMPYjLd8LYqmm/qlE+wwEgJIkTYdhV3rfZo4jk=
github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc=
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y=
github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
github.com/vishvananda/netlink v1.1.1-0.20210916161339-2c39f3491956 h1:2tjYQpM+MZB25iPeE20lI/PrUNrbN66Bd+P27TkVaxU=
github.com/vishvananda/netlink v1.1.1-0.20210916161339-2c39f3491956/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
================================================
FILE: hack/get_ci_vm.sh
================================================
#!/usr/bin/env bash
#
# For help and usage information, simply execute the script w/o any arguments.
#
# This script is intended to be run by Red Hat dnsname developers who need
# to debug problems specifically related to Cirrus-CI automated testing.
# It requires that you have been granted prior access to create VMs in
# google-cloud. For non-Red Hat contributors, VMs are available as-needed,
# with supervision upon request.
set -e
SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}")
SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH")
REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../")
# Help detect if we were called by get_ci_vm container
GET_CI_VM="${GET_CI_VM:-0}"
in_get_ci_vm() {
if ((GET_CI_VM==0)); then
echo "Error: $1 is not intended for use in this context"
exit 2
fi
}
# get_ci_vm APIv1 container entrypoint calls into this script
# to obtain required repo. specific configuration options.
if [[ "$1" == "--config" ]]; then
in_get_ci_vm "$1"
cat <<EOF
DESTDIR="/var/tmp/go/src/github.com/containers/dnsname"
UPSTREAM_REPO="https://github.com/containers/dnsname.git"
CI_ENVFILE="/etc/ci_environment"
GCLOUD_PROJECT="dnsname-8675309"
GCLOUD_IMGPROJECT="libpod-218412"
GCLOUD_CFG="dnsname"
GCLOUD_ZONE="${GCLOUD_ZONE:-us-central1-c}"
GCLOUD_CPUS="2"
GCLOUD_MEMORY="4Gb"
GCLOUD_DISK="200"
EOF
elif [[ "$1" == "--setup" ]]; then
in_get_ci_vm "$1"
# get_ci_vm container entrypoint calls us with this option on the
# Cirrus-CI environment instance, to perform repo.-specific setup.
echo "+ Setting up environment" > /dev/stderr
echo 'PATH=$PATH:$GOPATH/bin' > /etc/ci_environment
else
# Create and access VM for specified Cirrus-CI task
mkdir -p $HOME/.config/gcloud/ssh
podman run -it --rm \
--tz=local \
-e NAME="$USER" \
-e SRCDIR=/src \
-e GCLOUD_ZONE="$GCLOUD_ZONE" \
-e DEBUG="${DEBUG:-0}" \
-v $REPO_DIRPATH:/src:O \
-v $HOME/.config/gcloud:/root/.config/gcloud:z \
-v $HOME/.config/gcloud/ssh:/root/.ssh:z \
quay.io/libpod/get_ci_vm:latest "$@"
fi
================================================
FILE: hack/tree_status.sh
================================================
#!/bin/bash
set -e
SUGGESTION="${SUGGESTION:-sync the vendor.conf and commit all changes.}"
STATUS=$(git status --porcelain)
if [[ -z $STATUS ]]
then
echo "tree is clean"
else
echo "tree is dirty, please $SUGGESTION"
echo ""
echo "$STATUS"
exit 1
fi
================================================
FILE: plugins/meta/dnsname/config.go
================================================
package main
import (
"errors"
"os"
"path/filepath"
"github.com/containernetworking/cni/pkg/types"
)
const (
// confFileName is the name of the dns masq conf file
confFileName = "dnsmasq.conf"
// hostsFileName is the name of the addnhosts file
hostsFileName = "addnhosts"
// pidFileName is the file where the dnsmasq file is stored
pidFileName = "pidfile"
)
const dnsMasqTemplate = `## WARNING: THIS IS AN AUTOGENERATED FILE
## AND SHOULD NOT BE EDITED MANUALLY AS IT
## LIKELY TO AUTOMATICALLY BE REPLACED.
strict-order
local=/{{.Domain}}/
domain={{.Domain}}
expand-hosts
pid-file={{.PidFile}}
except-interface=lo
bind-dynamic
no-hosts
interface={{.NetworkInterface}}
addn-hosts={{.AddOnHostsFile}}`
var (
// ErrBinaryNotFound means that the dnsmasq binary was not found
ErrBinaryNotFound = errors.New("unable to locate dnsmasq in path")
// ErrNoIPAddressFound means that CNI was unable to resolve an IP address in the CNI configuration
ErrNoIPAddressFound = errors.New("no ip address was found in the network")
)
// DNSNameConf represents the cni config with the domain name attribute
type DNSNameConf struct {
types.NetConf
DomainName string `json:"domainName"`
RuntimeConfig struct { // The capability arg
Aliases map[string][]string `json:"aliases"`
} `json:"runtimeConfig,omitempty"`
}
// dnsNameFile describes the plugin's attributes
type dnsNameFile struct {
AddOnHostsFile string
Binary string
ConfigFile string
Domain string
NetworkInterface string
PidFile string
}
// dnsNameConfPath tells where we store the conf, pid, and hosts files
func dnsNameConfPath() string {
xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR")
if xdgRuntimeDir != "" {
return filepath.Join(xdgRuntimeDir, "containers/cni/dnsname")
}
return "/run/containers/cni/dnsname"
}
================================================
FILE: plugins/meta/dnsname/dnsname_suite_test.go
================================================
// Copyright 2019 dnsname authors
// Copyright 2017 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestTuning(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "plugins/meta/dnsname")
}
================================================
FILE: plugins/meta/dnsname/dnsname_test.go
================================================
package main
import (
"io/ioutil"
"os"
"path/filepath"
"reflect"
"syscall"
"time"
"github.com/containernetworking/cni/pkg/skel"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/plugins/pkg/ns"
"github.com/containernetworking/plugins/pkg/testutils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/vishvananda/netlink"
)
func cleanup(d dnsNameFile) error {
_ = d.stop()
return os.RemoveAll(filepath.Dir(d.PidFile))
}
var _ = Describe("dnsname tests", func() {
var originalNS, targetNS ns.NetNS
const IFNAME string = "dummy0"
fullConf := []byte(`{
"cniVersion": "0.4.0",
"name": "test",
"type": "dnsname",
"domainName": "foobar.io",
"prevResult": {
"cniVersion": "0.4.0",
"interfaces": [
{
"name": "dummy0",
"mac": "a6:a7:ca:6b:34:2e"
},
{
"name": "vetha0a83b38",
"mac": "9a:45:bd:b0:2d:dd"
},
{
"name": "eth0",
"mac": "ea:63:0e:63:3e:86",
"sandbox": "/var/run/netns/baude"
}
],
"ips": [
{
"version": "4",
"interface": 2,
"address": "10.88.8.5/24",
"gateway": "10.88.8.1"
}
],
"routes": [
{
"dst": "0.0.0.0/0"
}
]
}
}`)
BeforeEach(func() {
// Create a new NetNS so we don't modify the host
var err error
originalNS, err = testutils.NewNS()
Expect(err).NotTo(HaveOccurred())
err = originalNS.Do(func(ns.NetNS) error {
defer GinkgoRecover()
err = netlink.LinkAdd(&netlink.Dummy{
LinkAttrs: netlink.LinkAttrs{
Name: IFNAME,
},
})
Expect(err).NotTo(HaveOccurred())
_, err = netlink.LinkByName(IFNAME)
Expect(err).NotTo(HaveOccurred())
return nil
})
Expect(err).NotTo(HaveOccurred())
targetNS, err = testutils.NewNS()
Expect(err).NotTo(HaveOccurred())
})
AfterEach(func() {
Expect(originalNS.Close()).To(Succeed())
Expect(targetNS.Close()).To(Succeed())
})
It("dnsname add", func() {
args := &skel.CmdArgs{
ContainerID: "dummy",
Netns: targetNS.Path(),
IfName: IFNAME,
StdinData: fullConf,
}
err := originalNS.Do(func(ns.NetNS) error {
defer GinkgoRecover()
r, _, err := testutils.CmdAdd(targetNS.Path(), args.ContainerID, IFNAME, fullConf, func() error {
return cmdAdd(args)
})
Expect(err).NotTo(HaveOccurred())
result, err := current.GetResult(r)
Expect(err).NotTo(HaveOccurred())
// check that the dns search domain is set correctly
Expect(result.DNS.Search).To(Equal([]string{"foobar.io"}))
// Check that all configuration files are created
files, err := ioutil.ReadDir("/run/containers/cni/dnsname/test")
Expect(err).To(BeNil())
expectedFileNames := []string{"addnhosts", "dnsmasq.conf", "lock", "pidfile"}
var resultingFileNames []string
for _, f := range files {
resultingFileNames = append(resultingFileNames, f.Name())
}
Expect(reflect.DeepEqual(expectedFileNames, resultingFileNames)).To(BeTrue())
d, err := newDNSMasqFile("foobar.io", "dummy0", "test")
Expect(err).To(BeNil())
// Check that the dns masq instance is running
pid, err := d.getProcess()
Expect(err).To(BeNil())
// Send it a signal 0; if alive, error will be nil
err = pid.Signal(syscall.Signal(0))
Expect(err).To(BeNil())
// Stop the dnsmasq instance and clean up files in the filesystem
Expect(cleanup(d)).To(BeNil())
return nil
})
Expect(err).NotTo(HaveOccurred())
})
It("dnsname del", func() {
var (
dnsDead bool
counter int
)
args := &skel.CmdArgs{
ContainerID: "dummy",
Netns: targetNS.Path(),
IfName: IFNAME,
StdinData: fullConf,
}
err := originalNS.Do(func(ns.NetNS) error {
defer GinkgoRecover()
r, _, err := testutils.CmdAdd(targetNS.Path(), args.ContainerID, IFNAME, fullConf, func() error {
return cmdAdd(args)
})
Expect(err).NotTo(HaveOccurred())
_, err = current.GetResult(r)
Expect(err).NotTo(HaveOccurred())
d, err := newDNSMasqFile("foobar.io", "dummy0", "test")
Expect(err).To(BeNil())
pid, err := d.getProcess()
Expect(err).To(BeNil())
err = pid.Signal(syscall.Signal(0))
Expect(err).To(BeNil())
err = testutils.CmdDel(targetNS.Path(), args.ContainerID, IFNAME, func() error {
return cmdDel(args)
})
Expect(err).To(BeNil())
// Ensure the dnsmasq instance has been stopped on del
// It sometimes takes time for the dnsmasq pid to be killed
// check every .5 second for maximum of 10 tries
for {
err = pid.Signal(syscall.Signal(0))
if err != nil {
dnsDead = true
break
}
if counter == 10 {
break
}
counter++
time.Sleep(500 * time.Millisecond)
}
Expect(dnsDead).To(BeTrue())
// defer cleanup is case it does not work automatically
defer func() {
_ = cleanup(d)
}()
// Check that the configuration directory is deleted
_, err = ioutil.ReadDir("/run/containers/cni/dnsname/test")
Expect(os.IsNotExist(err)).To(BeTrue())
return nil
})
Expect(err).NotTo(HaveOccurred())
})
})
================================================
FILE: plugins/meta/dnsname/files.go
================================================
package main
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"net"
"os"
"strings"
"text/template"
"github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk"
"github.com/coreos/go-iptables/iptables"
"github.com/sirupsen/logrus"
)
// dnsNameLock embeds the CNI disk lock so we can hang methods from it
type dnsNameLock struct {
lock *disk.FileLock
}
// release unlocks and closes the disk lock.
func (m *dnsNameLock) release() error {
if err := m.lock.Unlock(); err != nil {
return err
}
return m.lock.Close()
}
// acquire locks the disk lock.
func (m *dnsNameLock) acquire() error {
return m.lock.Lock()
}
// getLock returns a dnsNameLock synchronizing the configuration directory for
// the domain.
func getLock(path string) (*dnsNameLock, error) {
l, err := disk.NewFileLock(path)
if err != nil {
return nil, err
}
return &dnsNameLock{l}, nil
}
// checkFromDNSMasqConfFile ensures that the dnsmasq conf file for
// the network interface exists or it creates it
func checkForDNSMasqConfFile(conf dnsNameFile) error {
if _, err := os.Stat(conf.ConfigFile); err == nil {
// the file already exists, we can proceed
return err
}
newConfig, err := generateDNSMasqConfig(conf)
if err != nil {
return err
}
ip, err := iptables.New()
if err != nil {
return err
}
args := []string{"-i", conf.NetworkInterface, "-p", "udp", "-m", "udp", "--dport", "53", "-j", "ACCEPT"}
exists, err := ip.Exists("filter", "INPUT", args...)
if err != nil {
return err
}
if !exists {
if err := ip.Insert("filter", "INPUT", 1, args...); err != nil {
return err
}
}
// Generate the template and compile it.
return ioutil.WriteFile(conf.ConfigFile, newConfig, 0700)
}
// generateDNSMasqConfig fills out the configuration file template for the dnsmasq service
func generateDNSMasqConfig(config dnsNameFile) ([]byte, error) {
var buf bytes.Buffer
templ, err := template.New("dnsmasq-conf-file").Parse(dnsMasqTemplate)
if err != nil {
return nil, err
}
if err := templ.Execute(&buf, config); err != nil {
return nil, err
}
buf.WriteByte('\n')
return buf.Bytes(), nil
}
// appendToFile appends a new entry to the dnsmasqs hosts file
func appendToFile(path, podname string, aliases []string, ips []*net.IPNet) error {
f, err := openFile(path)
if err != nil {
return err
}
defer func() {
if err := f.Close(); err != nil {
logrus.Errorf("failed to close file %q: %v", path, err)
}
}()
for _, ip := range ips {
entry := fmt.Sprintf("%s\t%s", ip.IP.String(), podname)
for _, alias := range aliases {
entry += fmt.Sprintf("\t%s", alias)
}
entry += "\n"
if _, err = f.WriteString(entry); err != nil {
return err
}
logrus.Debugf("appended %s: %s", path, entry)
}
return nil
}
// removeLineFromFile removes a given entry from the dnsmasq host file
func removeFromFile(path, podname string) (bool, error) {
var (
keepers []string
found bool
)
shouldHUP := false
backup := fmt.Sprintf("%s.old", path)
if err := os.Rename(path, backup); err != nil {
return shouldHUP, err
}
f, err := os.Open(backup)
if err != nil {
// if the open fails here, we need to revert things
renameFile(backup, path)
return shouldHUP, err
}
defer func() {
if err := f.Close(); err != nil {
logrus.Errorf("unable to close %q: %v", backup, err)
}
}()
oldFile := bufio.NewScanner(f)
// Iterate the old file
for oldFile.Scan() {
fields := strings.Fields(oldFile.Text())
// if the IP of the entry and the given IP dont match, it should
// go into the new file
if len(fields) > 1 && fields[1] != podname {
keepers = append(keepers, fmt.Sprintf("%s\n", oldFile.Text()))
continue
}
found = true
}
if !found {
// We never found a matching record; non-fatal
logrus.Debugf("a record for %s was never found in %s", podname, path)
}
fileLength, err := writeFile(path, keepers)
if err != nil {
renameFile(backup, path)
return shouldHUP, err
}
if fileLength > 0 {
shouldHUP = true
}
if err := os.Remove(backup); err != nil {
logrus.Errorf("unable to delete '%s': %q", backup, err)
}
return shouldHUP, nil
}
// renameFile renames a file to backup
func renameFile(oldpath, newpath string) {
if renameError := os.Rename(oldpath, newpath); renameError != nil {
logrus.Errorf("unable to restore %q to %q: %v", oldpath, newpath, renameError)
}
}
// writeFile writes a []string to the given path and returns the number
// of lines in the file
func writeFile(path string, content []string) (int, error) {
var counter int
f, err := openFile(path)
if err != nil {
return 0, err
}
defer func() {
if err := f.Close(); err != nil {
logrus.Errorf("unable to close %q: %v", path, err)
}
}()
for _, line := range content {
if _, err := f.WriteString(line); err != nil {
return 0, err
}
counter++
}
return counter, nil
}
// openFile opens a file for reading
func openFile(path string) (*os.File, error) {
return os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
}
================================================
FILE: plugins/meta/dnsname/files_test.go
================================================
package main
import (
"reflect"
"testing"
)
func Test_generateDNSMasqConfig(t *testing.T) {
testResult := `## WARNING: THIS IS AN AUTOGENERATED FILE
## AND SHOULD NOT BE EDITED MANUALLY AS IT
## LIKELY TO AUTOMATICALLY BE REPLACED.
strict-order
local=/foobar.org/
domain=foobar.org
expand-hosts
pid-file=/run/containers/cni/dnsname/cni0/pidfile
except-interface=lo
bind-dynamic
no-hosts
interface=cni0
addn-hosts=/run/containers/cni/dnsname/cni0/addnhosts
`
testConfig := dnsNameFile{
AddOnHostsFile: makePath("cni0", hostsFileName),
Binary: "/usr/bin/foo",
ConfigFile: makePath("cni0", confFileName),
Domain: "foobar.org",
NetworkInterface: "cni0",
PidFile: makePath("cni0", pidFileName),
}
type args struct {
config dnsNameFile
}
tests := []struct {
name string
args args
want []byte
wantErr bool
}{
{"pass", args{testConfig}, []byte(testResult), false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := generateDNSMasqConfig(tt.args.config)
if (err != nil) != tt.wantErr {
t.Errorf("generateDNSMasqConfig() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("generateDNSMasqConfig() got = '%v', want '%v'", string(got), string(tt.want))
}
})
}
}
================================================
FILE: plugins/meta/dnsname/main.go
================================================
// Copyright 2019 dnsname authors
// Copyright 2017 CNI 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.
// This is a post-setup plugin that establishes port forwarding - using iptables,
// from the host's network interface(s) to a pod's network interface.
//
// It is intended to be used as a chained CNI plugin, and determines the container
// IP from the previous result. If the result includes an IPv6 address, it will
// also be configured. (IPTables will not forward cross-family).
//
// This has one notable limitation: it does not perform any kind of reservation
// of the actual host port. If there is a service on the host, it will have all
// its traffic captured by the container. If another container also claims a given
// port, it will capture the traffic - it is last-write-wins.
package main
import (
"encoding/json"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/types"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/version"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
func cmdAdd(args *skel.CmdArgs) error {
if err := findDNSMasq(); err != nil {
return ErrBinaryNotFound
}
netConf, result, podname, err := parseConfig(args.StdinData, args.Args)
if err != nil {
return errors.Wrap(err, "failed to parse config")
}
if netConf.PrevResult == nil {
return errors.Errorf("must be called as chained plugin")
}
ips, err := getIPs(result)
if err != nil {
return err
}
dnsNameConf, err := newDNSMasqFile(netConf.DomainName, result.Interfaces[0].Name, netConf.Name)
if err != nil {
return err
}
domainBaseDir := filepath.Dir(dnsNameConf.PidFile)
// Check if the configuration file directory exists, else make it
if _, err := os.Stat(domainBaseDir); os.IsNotExist(err) {
if makeDirErr := os.MkdirAll(domainBaseDir, 0700); makeDirErr != nil {
return makeDirErr
}
}
// we use the configuration directory for our locking mechanism but read/write and hup
lock, err := getLock(domainBaseDir)
if err != nil {
return err
}
if err := lock.acquire(); err != nil {
return err
}
defer func() {
if err := lock.release(); err != nil {
logrus.Errorf("unable to release lock for %q: %v", dnsNameConf.AddOnHostsFile, err)
}
}()
if err := checkForDNSMasqConfFile(dnsNameConf); err != nil {
return err
}
aliases := netConf.RuntimeConfig.Aliases[netConf.Name]
if err := appendToFile(dnsNameConf.AddOnHostsFile, podname, aliases, ips); err != nil {
return err
}
// Now we need to HUP
if err := dnsNameConf.hup(); err != nil {
return err
}
nameservers, err := getInterfaceAddresses(dnsNameConf)
if err != nil {
return err
}
// keep anything that was passed in already
nameservers = append(nameservers, result.DNS.Nameservers...)
result.DNS.Nameservers = nameservers
// add dns search domain
result.DNS.Search = append(result.DNS.Search, netConf.DomainName)
// Pass through the previous result
return types.PrintResult(result, netConf.CNIVersion)
}
// Do not return an error, otherwise cni will stop
// and not invoke the following plugins del command.
func cmdDel(args *skel.CmdArgs) error {
if err := findDNSMasq(); err != nil {
logrus.Error(ErrBinaryNotFound)
return nil
}
netConf, result, podname, err := parseConfig(args.StdinData, args.Args)
if err != nil {
logrus.Error(errors.Wrap(err, "failed to parse config"))
return nil
} else if result == nil {
return nil
}
dnsNameConf, err := newDNSMasqFile(netConf.DomainName, result.Interfaces[0].Name, netConf.Name)
if err != nil {
logrus.Error(err)
return nil
}
domainBaseDir := filepath.Dir(dnsNameConf.PidFile)
lock, err := getLock(domainBaseDir)
if err != nil {
logrus.Error(err)
return nil
}
if err := lock.acquire(); err != nil {
logrus.Error(err)
return nil
}
defer func() {
// if the lock isn't given up by another process
if err := lock.release(); err != nil {
logrus.Errorf("unable to release lock for %q: %v", domainBaseDir, err)
}
}()
shouldHUP, err := removeFromFile(filepath.Join(domainBaseDir, hostsFileName), podname)
if err != nil {
logrus.Error(err)
return nil
}
if !shouldHUP {
// if there are no hosts, we should just stop the dnsmasq instance to not take
// system resources
err = dnsNameConf.stop()
if err != nil {
logrus.Error(err)
return nil
}
// remove the config directory
err = os.RemoveAll(domainBaseDir)
if err != nil {
logrus.Error(err)
}
return nil
}
// Now we need to HUP
err = dnsNameConf.hup()
if err != nil {
logrus.Error(err)
}
return nil
}
func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, getVersion())
}
func cmdCheck(args *skel.CmdArgs) error {
var (
conffiles []string
)
if err := findDNSMasq(); err != nil {
return ErrBinaryNotFound
}
netConf, result, _, err := parseConfig(args.StdinData, args.Args)
if err != nil {
return errors.Wrap(err, "failed to parse config")
}
// Ensure we have previous result.
if result == nil {
return errors.Errorf("Required prevResult missing")
}
dnsNameConf, err := newDNSMasqFile(netConf.DomainName, result.Interfaces[0].Name, netConf.Name)
if err != nil {
return err
}
domainBaseDir := filepath.Dir(dnsNameConf.PidFile)
lock, err := getLock(domainBaseDir)
if err != nil {
return err
}
if err := lock.acquire(); err != nil {
return err
}
defer func() {
// if the lock isn't given up by another process
if err := lock.release(); err != nil {
logrus.Errorf("unable to release lock for %q: %v", domainBaseDir, err)
}
}()
pid, err := dnsNameConf.getProcess()
if err != nil {
return err
}
// Ensure the dnsmasq instance is running
if !isRunning(pid) {
return errors.Errorf("dnsmasq instance not running")
}
// Above will make sure the pidfile exists
files, err := ioutil.ReadDir(dnsNameConfPath())
if err != nil {
return err
}
for _, f := range files {
conffiles = append(conffiles, f.Name())
}
if !stringInSlice("addnhosts", conffiles) {
return errors.Errorf("addnhost file missing from configuration")
}
if !stringInSlice("dnsmasq.conf", conffiles) {
return errors.Errorf("dnsmasq.conf file missing from configuration")
}
return nil
}
// stringInSlice is simple util to check for the presence of a string
// in a string slice
func stringInSlice(s string, slice []string) bool {
for _, sl := range slice {
if s == sl {
return true
}
}
return false
}
type podname struct {
types.CommonArgs
K8S_POD_NAME types.UnmarshallableString `json:"podname,omitempty"`
}
// parseConfig parses the supplied configuration (and prevResult) from stdin.
func parseConfig(stdin []byte, args string) (*DNSNameConf, *current.Result, string, error) {
conf := DNSNameConf{}
if err := json.Unmarshal(stdin, &conf); err != nil {
return nil, nil, "", errors.Wrap(err, "failed to parse network configuration")
}
// Parse previous result.
var result *current.Result
if conf.RawPrevResult != nil {
var err error
if err = version.ParsePrevResult(&conf.NetConf); err != nil {
return nil, nil, "", errors.Wrap(err, "could not parse prevResult")
}
result, err = current.NewResultFromResult(conf.PrevResult)
if err != nil {
return nil, nil, "", errors.Wrap(err, "could not convert result to current version")
}
}
e := podname{}
if err := types.LoadArgs(args, &e); err != nil {
return nil, nil, "", err
}
return &conf, result, string(e.K8S_POD_NAME), nil
}
func findDNSMasq() error {
_, err := exec.LookPath("dnsmasq")
return err
}
================================================
FILE: plugins/meta/dnsname/result.go
================================================
package main
import (
"net"
current "github.com/containernetworking/cni/pkg/types/100"
"github.com/pkg/errors"
)
// getIPs iterates a result and returns all the IP addresses
// associated with it
func getIPs(r *current.Result) ([]*net.IPNet, error) {
var (
ips []*net.IPNet
)
if len(r.IPs) < 1 {
return nil, ErrNoIPAddressFound
}
if len(r.IPs) == 1 {
return append(ips, &r.IPs[0].Address), nil
}
for _, ip := range r.IPs {
if ip.Address.IP != nil && ip.Interface != nil {
if isInterfaceIndexSandox(*ip.Interface, r) {
ips = append(ips, &ip.Address)
} else {
return nil, errors.Errorf("unable to check if interface has a sandbox due to index being out of range")
}
}
}
if len(ips) < 1 {
return nil, ErrNoIPAddressFound
}
return ips, nil
}
// isInterfaceIndexSandox determines if the given interface index has the sandbox
// attribute and the value is greater than 0
func isInterfaceIndexSandox(idx int, r *current.Result) bool {
if idx >= 0 && idx < len(r.Interfaces) {
return len(r.Interfaces[idx].Sandbox) > 0
}
return false
}
// getInterfaceAddresses gets all globalunicast IP addresses for a given
// interface
func getInterfaceAddresses(nameConf dnsNameFile) ([]string, error) {
var nameservers []string
nic, err := net.InterfaceByName(nameConf.NetworkInterface)
if err != nil {
return nil, err
}
addrs, err := nic.Addrs()
if err != nil {
return nil, err
}
for _, addr := range addrs {
ip, _, err := net.ParseCIDR(addr.String())
if err != nil {
return nil, err
}
if ip.IsGlobalUnicast() {
nameservers = append(nameservers, ip.String())
}
}
return nameservers, nil
}
================================================
FILE: plugins/meta/dnsname/service.go
================================================
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
"syscall"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
// newDNSMasqFile creates a new instance of a dnsNameFile
func newDNSMasqFile(domainName, networkInterface, networkName string) (dnsNameFile, error) {
dnsMasqBinary, err := exec.LookPath("dnsmasq")
if err != nil {
return dnsNameFile{}, errors.Errorf("the dnsmasq cni plugin requires the dnsmasq binary be in PATH")
}
masqConf := dnsNameFile{
ConfigFile: makePath(networkName, confFileName),
Domain: domainName,
PidFile: makePath(networkName, pidFileName),
NetworkInterface: networkInterface,
AddOnHostsFile: makePath(networkName, hostsFileName),
Binary: dnsMasqBinary,
}
return masqConf, nil
}
// hup sends a sighup to a running dnsmasq to reload its hosts file. if
// there is no instance of the dnsmasq, then it simply starts it.
func (d dnsNameFile) hup() error {
// First check for pidfile; if it does not exist, we just
// start the service
if _, err := os.Stat(d.PidFile); os.IsNotExist(err) {
return d.start()
}
pid, err := d.getProcess()
if err != nil {
return err
}
if !isRunning(pid) {
return d.start()
}
return pid.Signal(unix.SIGHUP)
}
// isRunning sends a signal 0 to the pid to determine if it
// responds or not
func isRunning(pid *os.Process) bool {
if err := pid.Signal(syscall.Signal(0)); err != nil {
return false
}
return true
}
// start starts the dnsmasq instance.
func (d dnsNameFile) start() error {
args := []string{
"-u",
"root",
fmt.Sprintf("--conf-file=%s", d.ConfigFile),
}
cmd := exec.Command(d.Binary, args...)
if b, err := cmd.CombinedOutput(); err != nil {
return errors.Wrapf(err, "dnsname error: dnsmasq failed with %q", b)
}
return nil
}
// stop stops the dnsmasq instance.
func (d dnsNameFile) stop() error {
pid, err := d.getProcess()
if err != nil {
return err
}
return pid.Kill()
}
// getProcess reads the PID for the dnsmasq instance and returns an
// *os.Process. Returns an error if the PID does not exist.
func (d dnsNameFile) getProcess() (*os.Process, error) {
pidFileContents, err := ioutil.ReadFile(d.PidFile)
if err != nil {
return nil, err
}
pid, err := strconv.Atoi(strings.TrimSpace(string(pidFileContents)))
if err != nil {
return nil, err
}
return os.FindProcess(pid)
}
// makePath formats a path name given a domain and suffix
func makePath(networkName, fileName string) string {
// the generic path for where conf, host, pid files are kept is:
// /run/containers/cni/dnsmasq/<network-name>/
return filepath.Join(dnsNameConfPath(), networkName, fileName)
}
================================================
FILE: plugins/meta/dnsname/version.go
================================================
package main
import "fmt"
// overwritten at build time
var gitCommit = "unknown"
const dnsnameVersion = "1.4.0-dev"
func getVersion() string {
return fmt.Sprintf(`CNI dnsname plugin
version: %s
commit: %s`, dnsnameVersion, gitCommit)
}
================================================
FILE: vendor/github.com/alexflint/go-filemutex/LICENSE
================================================
The MIT License
Copyright (c) 2010-2017 Alex Flint.
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/alexflint/go-filemutex/README.md
================================================
# FileMutex
FileMutex is similar to `sync.RWMutex`, but also synchronizes across processes.
On Linux, OSX, and other POSIX systems it uses the flock system call. On windows
it uses the LockFileEx and UnlockFileEx system calls.
```go
import (
"log"
"github.com/alexflint/go-filemutex"
)
func main() {
m, err := filemutex.New("/tmp/foo.lock")
if err != nil {
log.Fatalln("Directory did not exist or file could not created")
}
m.Lock() // Will block until lock can be acquired
// Code here is protected by the mutex
m.Unlock()
}
```
### Installation
go get github.com/alexflint/go-filemutex
Forked from https://github.com/golang/build/tree/master/cmd/builder/filemutex_*.go
================================================
FILE: vendor/github.com/alexflint/go-filemutex/filemutex_flock.go
================================================
// Copyright 2013 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.
// +build darwin dragonfly freebsd linux netbsd openbsd
package filemutex
import (
"syscall"
)
const (
mkdirPerm = 0750
)
// FileMutex is similar to sync.RWMutex, but also synchronizes across processes.
// This implementation is based on flock syscall.
type FileMutex struct {
fd int
}
func New(filename string) (*FileMutex, error) {
fd, err := syscall.Open(filename, syscall.O_CREAT|syscall.O_RDONLY, mkdirPerm)
if err != nil {
return nil, err
}
return &FileMutex{fd: fd}, nil
}
func (m *FileMutex) Lock() error {
if err := syscall.Flock(m.fd, syscall.LOCK_EX); err != nil {
return err
}
return nil
}
func (m *FileMutex) Unlock() error {
if err := syscall.Flock(m.fd, syscall.LOCK_UN); err != nil {
return err
}
return nil
}
func (m *FileMutex) RLock() error {
if err := syscall.Flock(m.fd, syscall.LOCK_SH); err != nil {
return err
}
return nil
}
func (m *FileMutex) RUnlock() error {
if err := syscall.Flock(m.fd, syscall.LOCK_UN); err != nil {
return err
}
return nil
}
// Close does an Unlock() combined with closing and unlinking the associated
// lock file. You should create a New() FileMutex for every Lock() attempt if
// using Close().
func (m *FileMutex) Close() error {
if err := syscall.Flock(m.fd, syscall.LOCK_UN); err != nil {
return err
}
return syscall.Close(m.fd)
}
================================================
FILE: vendor/github.com/alexflint/go-filemutex/filemutex_windows.go
================================================
// Copyright 2013 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 filemutex
import (
"syscall"
"unsafe"
)
var (
modkernel32 = syscall.NewLazyDLL("kernel32.dll")
procLockFileEx = modkernel32.NewProc("LockFileEx")
procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
)
const (
lockfileExclusiveLock = 2
)
func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) {
r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)))
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) {
r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(h), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)), 0)
if r1 == 0 {
if e1 != 0 {
err = error(e1)
} else {
err = syscall.EINVAL
}
}
return
}
// FileMutex is similar to sync.RWMutex, but also synchronizes across processes.
// This implementation is based on flock syscall.
type FileMutex struct {
fd syscall.Handle
}
func New(filename string) (*FileMutex, error) {
fd, err := syscall.CreateFile(&(syscall.StringToUTF16(filename)[0]), syscall.GENERIC_READ|syscall.GENERIC_WRITE,
syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE, nil, syscall.OPEN_ALWAYS, syscall.FILE_ATTRIBUTE_NORMAL, 0)
if err != nil {
return nil, err
}
return &FileMutex{fd: fd}, nil
}
func (m *FileMutex) Lock() error {
var ol syscall.Overlapped
if err := lockFileEx(m.fd, lockfileExclusiveLock, 0, 1, 0, &ol); err != nil {
return err
}
return nil
}
func (m *FileMutex) Unlock() error {
var ol syscall.Overlapped
if err := unlockFileEx(m.fd, 0, 1, 0, &ol); err != nil {
return err
}
return nil
}
func (m *FileMutex) RLock() error {
var ol syscall.Overlapped
if err := lockFileEx(m.fd, 0, 0, 1, 0, &ol); err != nil {
return err
}
return nil
}
func (m *FileMutex) RUnlock() error {
var ol syscall.Overlapped
if err := unlockFileEx(m.fd, 0, 1, 0, &ol); err != nil {
return err
}
return nil
}
// Close does an Unlock() combined with closing and unlinking the associated
// lock file. You should create a New() FileMutex for every Lock() attempt if
// using Close().
func (m *FileMutex) Close() error {
var ol syscall.Overlapped
if err := unlockFileEx(m.fd, 0, 1, 0, &ol); err != nil {
return err
}
return syscall.Close(m.fd)
}
================================================
FILE: vendor/github.com/containernetworking/cni/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/containernetworking/cni/pkg/skel/skel.go
================================================
// Copyright 2014-2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package skel provides skeleton code for a CNI plugin.
// In particular, it implements argument parsing and validation.
package skel
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"strings"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/utils"
"github.com/containernetworking/cni/pkg/version"
)
// CmdArgs captures all the arguments passed in to the plugin
// via both env vars and stdin
type CmdArgs struct {
ContainerID string
Netns string
IfName string
Args string
Path string
StdinData []byte
}
type dispatcher struct {
Getenv func(string) string
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
ConfVersionDecoder version.ConfigDecoder
VersionReconciler version.Reconciler
}
type reqForCmdEntry map[string]bool
func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Error) {
var cmd, contID, netns, ifName, args, path string
vars := []struct {
name string
val *string
reqForCmd reqForCmdEntry
}{
{
"CNI_COMMAND",
&cmd,
reqForCmdEntry{
"ADD": true,
"CHECK": true,
"DEL": true,
},
},
{
"CNI_CONTAINERID",
&contID,
reqForCmdEntry{
"ADD": true,
"CHECK": true,
"DEL": true,
},
},
{
"CNI_NETNS",
&netns,
reqForCmdEntry{
"ADD": true,
"CHECK": true,
"DEL": false,
},
},
{
"CNI_IFNAME",
&ifName,
reqForCmdEntry{
"ADD": true,
"CHECK": true,
"DEL": true,
},
},
{
"CNI_ARGS",
&args,
reqForCmdEntry{
"ADD": false,
"CHECK": false,
"DEL": false,
},
},
{
"CNI_PATH",
&path,
reqForCmdEntry{
"ADD": true,
"CHECK": true,
"DEL": true,
},
},
}
argsMissing := make([]string, 0)
for _, v := range vars {
*v.val = t.Getenv(v.name)
if *v.val == "" {
if v.reqForCmd[cmd] || v.name == "CNI_COMMAND" {
argsMissing = append(argsMissing, v.name)
}
}
}
if len(argsMissing) > 0 {
joined := strings.Join(argsMissing, ",")
return "", nil, types.NewError(types.ErrInvalidEnvironmentVariables, fmt.Sprintf("required env variables [%s] missing", joined), "")
}
if cmd == "VERSION" {
t.Stdin = bytes.NewReader(nil)
}
stdinData, err := ioutil.ReadAll(t.Stdin)
if err != nil {
return "", nil, types.NewError(types.ErrIOFailure, fmt.Sprintf("error reading from stdin: %v", err), "")
}
cmdArgs := &CmdArgs{
ContainerID: contID,
Netns: netns,
IfName: ifName,
Args: args,
Path: path,
StdinData: stdinData,
}
return cmd, cmdArgs, nil
}
func (t *dispatcher) checkVersionAndCall(cmdArgs *CmdArgs, pluginVersionInfo version.PluginInfo, toCall func(*CmdArgs) error) *types.Error {
configVersion, err := t.ConfVersionDecoder.Decode(cmdArgs.StdinData)
if err != nil {
return types.NewError(types.ErrDecodingFailure, err.Error(), "")
}
verErr := t.VersionReconciler.Check(configVersion, pluginVersionInfo)
if verErr != nil {
return types.NewError(types.ErrIncompatibleCNIVersion, "incompatible CNI versions", verErr.Details())
}
if err = toCall(cmdArgs); err != nil {
if e, ok := err.(*types.Error); ok {
// don't wrap Error in Error
return e
}
return types.NewError(types.ErrInternal, err.Error(), "")
}
return nil
}
func validateConfig(jsonBytes []byte) *types.Error {
var conf struct {
Name string `json:"name"`
}
if err := json.Unmarshal(jsonBytes, &conf); err != nil {
return types.NewError(types.ErrDecodingFailure, fmt.Sprintf("error unmarshall network config: %v", err), "")
}
if conf.Name == "" {
return types.NewError(types.ErrInvalidNetworkConfig, "missing network name", "")
}
if err := utils.ValidateNetworkName(conf.Name); err != nil {
return err
}
return nil
}
func (t *dispatcher) pluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) *types.Error {
cmd, cmdArgs, err := t.getCmdArgsFromEnv()
if err != nil {
// Print the about string to stderr when no command is set
if err.Code == types.ErrInvalidEnvironmentVariables && t.Getenv("CNI_COMMAND") == "" && about != "" {
_, _ = fmt.Fprintln(t.Stderr, about)
_, _ = fmt.Fprintf(t.Stderr, "CNI protocol versions supported: %s\n", strings.Join(versionInfo.SupportedVersions(), ", "))
return nil
}
return err
}
if cmd != "VERSION" {
if err = validateConfig(cmdArgs.StdinData); err != nil {
return err
}
if err = utils.ValidateContainerID(cmdArgs.ContainerID); err != nil {
return err
}
if err = utils.ValidateInterfaceName(cmdArgs.IfName); err != nil {
return err
}
}
switch cmd {
case "ADD":
err = t.checkVersionAndCall(cmdArgs, versionInfo, cmdAdd)
case "CHECK":
configVersion, err := t.ConfVersionDecoder.Decode(cmdArgs.StdinData)
if err != nil {
return types.NewError(types.ErrDecodingFailure, err.Error(), "")
}
if gtet, err := version.GreaterThanOrEqualTo(configVersion, "0.4.0"); err != nil {
return types.NewError(types.ErrDecodingFailure, err.Error(), "")
} else if !gtet {
return types.NewError(types.ErrIncompatibleCNIVersion, "config version does not allow CHECK", "")
}
for _, pluginVersion := range versionInfo.SupportedVersions() {
gtet, err := version.GreaterThanOrEqualTo(pluginVersion, configVersion)
if err != nil {
return types.NewError(types.ErrDecodingFailure, err.Error(), "")
} else if gtet {
if err := t.checkVersionAndCall(cmdArgs, versionInfo, cmdCheck); err != nil {
return err
}
return nil
}
}
return types.NewError(types.ErrIncompatibleCNIVersion, "plugin version does not allow CHECK", "")
case "DEL":
err = t.checkVersionAndCall(cmdArgs, versionInfo, cmdDel)
case "VERSION":
if err := versionInfo.Encode(t.Stdout); err != nil {
return types.NewError(types.ErrIOFailure, err.Error(), "")
}
default:
return types.NewError(types.ErrInvalidEnvironmentVariables, fmt.Sprintf("unknown CNI_COMMAND: %v", cmd), "")
}
return err
}
// PluginMainWithError is the core "main" for a plugin. It accepts
// callback functions for add, check, and del CNI commands and returns an error.
//
// The caller must also specify what CNI spec versions the plugin supports.
//
// It is the responsibility of the caller to check for non-nil error return.
//
// For a plugin to comply with the CNI spec, it must print any error to stdout
// as JSON and then exit with nonzero status code.
//
// To let this package automatically handle errors and call os.Exit(1) for you,
// use PluginMain() instead.
func PluginMainWithError(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) *types.Error {
return (&dispatcher{
Getenv: os.Getenv,
Stdin: os.Stdin,
Stdout: os.Stdout,
Stderr: os.Stderr,
}).pluginMain(cmdAdd, cmdCheck, cmdDel, versionInfo, about)
}
// PluginMain is the core "main" for a plugin which includes automatic error handling.
//
// The caller must also specify what CNI spec versions the plugin supports.
//
// The caller can specify an "about" string, which is printed on stderr
// when no CNI_COMMAND is specified. The recommended output is "CNI plugin <foo> v<version>"
//
// When an error occurs in either cmdAdd, cmdCheck, or cmdDel, PluginMain will print the error
// as JSON to stdout and call os.Exit(1).
//
// To have more control over error handling, use PluginMainWithError() instead.
func PluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, versionInfo version.PluginInfo, about string) {
if e := PluginMainWithError(cmdAdd, cmdCheck, cmdDel, versionInfo, about); e != nil {
if err := e.Print(); err != nil {
log.Print("Error writing error JSON to stdout: ", err)
}
os.Exit(1)
}
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/020/types.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types020
import (
"encoding/json"
"fmt"
"io"
"net"
"os"
"github.com/containernetworking/cni/pkg/types"
convert "github.com/containernetworking/cni/pkg/types/internal"
)
const ImplementedSpecVersion string = "0.2.0"
var supportedVersions = []string{"", "0.1.0", ImplementedSpecVersion}
// Register converters for all versions less than the implemented spec version
func init() {
convert.RegisterConverter("0.1.0", []string{ImplementedSpecVersion}, convertFrom010)
convert.RegisterConverter(ImplementedSpecVersion, []string{"0.1.0"}, convertTo010)
// Creator
convert.RegisterCreator(supportedVersions, NewResult)
}
// Compatibility types for CNI version 0.1.0 and 0.2.0
// NewResult creates a new Result object from JSON data. The JSON data
// must be compatible with the CNI versions implemented by this type.
func NewResult(data []byte) (types.Result, error) {
result := &Result{}
if err := json.Unmarshal(data, result); err != nil {
return nil, err
}
for _, v := range supportedVersions {
if result.CNIVersion == v {
if result.CNIVersion == "" {
result.CNIVersion = "0.1.0"
}
return result, nil
}
}
return nil, fmt.Errorf("result type supports %v but unmarshalled CNIVersion is %q",
supportedVersions, result.CNIVersion)
}
// GetResult converts the given Result object to the ImplementedSpecVersion
// and returns the concrete type or an error
func GetResult(r types.Result) (*Result, error) {
result020, err := convert.Convert(r, ImplementedSpecVersion)
if err != nil {
return nil, err
}
result, ok := result020.(*Result)
if !ok {
return nil, fmt.Errorf("failed to convert result")
}
return result, nil
}
func convertFrom010(from types.Result, toVersion string) (types.Result, error) {
if toVersion != "0.2.0" {
panic("only converts to version 0.2.0")
}
fromResult := from.(*Result)
return &Result{
CNIVersion: ImplementedSpecVersion,
IP4: fromResult.IP4.Copy(),
IP6: fromResult.IP6.Copy(),
DNS: *fromResult.DNS.Copy(),
}, nil
}
func convertTo010(from types.Result, toVersion string) (types.Result, error) {
if toVersion != "0.1.0" {
panic("only converts to version 0.1.0")
}
fromResult := from.(*Result)
return &Result{
CNIVersion: "0.1.0",
IP4: fromResult.IP4.Copy(),
IP6: fromResult.IP6.Copy(),
DNS: *fromResult.DNS.Copy(),
}, nil
}
// Result is what gets returned from the plugin (via stdout) to the caller
type Result struct {
CNIVersion string `json:"cniVersion,omitempty"`
IP4 *IPConfig `json:"ip4,omitempty"`
IP6 *IPConfig `json:"ip6,omitempty"`
DNS types.DNS `json:"dns,omitempty"`
}
func (r *Result) Version() string {
return r.CNIVersion
}
func (r *Result) GetAsVersion(version string) (types.Result, error) {
// If the creator of the result did not set the CNIVersion, assume it
// should be the highest spec version implemented by this Result
if r.CNIVersion == "" {
r.CNIVersion = ImplementedSpecVersion
}
return convert.Convert(r, version)
}
func (r *Result) Print() error {
return r.PrintTo(os.Stdout)
}
func (r *Result) PrintTo(writer io.Writer) error {
data, err := json.MarshalIndent(r, "", " ")
if err != nil {
return err
}
_, err = writer.Write(data)
return err
}
// IPConfig contains values necessary to configure an interface
type IPConfig struct {
IP net.IPNet
Gateway net.IP
Routes []types.Route
}
func (i *IPConfig) Copy() *IPConfig {
if i == nil {
return nil
}
var routes []types.Route
for _, fromRoute := range i.Routes {
routes = append(routes, *fromRoute.Copy())
}
return &IPConfig{
IP: i.IP,
Gateway: i.Gateway,
Routes: routes,
}
}
// net.IPNet is not JSON (un)marshallable so this duality is needed
// for our custom IPNet type
// JSON (un)marshallable types
type ipConfig struct {
IP types.IPNet `json:"ip"`
Gateway net.IP `json:"gateway,omitempty"`
Routes []types.Route `json:"routes,omitempty"`
}
func (c *IPConfig) MarshalJSON() ([]byte, error) {
ipc := ipConfig{
IP: types.IPNet(c.IP),
Gateway: c.Gateway,
Routes: c.Routes,
}
return json.Marshal(ipc)
}
func (c *IPConfig) UnmarshalJSON(data []byte) error {
ipc := ipConfig{}
if err := json.Unmarshal(data, &ipc); err != nil {
return err
}
c.IP = net.IPNet(ipc.IP)
c.Gateway = ipc.Gateway
c.Routes = ipc.Routes
return nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/040/types.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types040
import (
"encoding/json"
"fmt"
"io"
"net"
"os"
"github.com/containernetworking/cni/pkg/types"
types020 "github.com/containernetworking/cni/pkg/types/020"
convert "github.com/containernetworking/cni/pkg/types/internal"
)
const ImplementedSpecVersion string = "0.4.0"
var supportedVersions = []string{"0.3.0", "0.3.1", ImplementedSpecVersion}
// Register converters for all versions less than the implemented spec version
func init() {
// Up-converters
convert.RegisterConverter("0.1.0", supportedVersions, convertFrom02x)
convert.RegisterConverter("0.2.0", supportedVersions, convertFrom02x)
convert.RegisterConverter("0.3.0", supportedVersions, convertInternal)
convert.RegisterConverter("0.3.1", supportedVersions, convertInternal)
// Down-converters
convert.RegisterConverter("0.4.0", []string{"0.3.0", "0.3.1"}, convertInternal)
convert.RegisterConverter("0.4.0", []string{"0.1.0", "0.2.0"}, convertTo02x)
convert.RegisterConverter("0.3.1", []string{"0.1.0", "0.2.0"}, convertTo02x)
convert.RegisterConverter("0.3.0", []string{"0.1.0", "0.2.0"}, convertTo02x)
// Creator
convert.RegisterCreator(supportedVersions, NewResult)
}
func NewResult(data []byte) (types.Result, error) {
result := &Result{}
if err := json.Unmarshal(data, result); err != nil {
return nil, err
}
for _, v := range supportedVersions {
if result.CNIVersion == v {
return result, nil
}
}
return nil, fmt.Errorf("result type supports %v but unmarshalled CNIVersion is %q",
supportedVersions, result.CNIVersion)
}
func GetResult(r types.Result) (*Result, error) {
resultCurrent, err := r.GetAsVersion(ImplementedSpecVersion)
if err != nil {
return nil, err
}
result, ok := resultCurrent.(*Result)
if !ok {
return nil, fmt.Errorf("failed to convert result")
}
return result, nil
}
func NewResultFromResult(result types.Result) (*Result, error) {
newResult, err := convert.Convert(result, ImplementedSpecVersion)
if err != nil {
return nil, err
}
return newResult.(*Result), nil
}
// Result is what gets returned from the plugin (via stdout) to the caller
type Result struct {
CNIVersion string `json:"cniVersion,omitempty"`
Interfaces []*Interface `json:"interfaces,omitempty"`
IPs []*IPConfig `json:"ips,omitempty"`
Routes []*types.Route `json:"routes,omitempty"`
DNS types.DNS `json:"dns,omitempty"`
}
func convert020IPConfig(from *types020.IPConfig, ipVersion string) *IPConfig {
return &IPConfig{
Version: ipVersion,
Address: from.IP,
Gateway: from.Gateway,
}
}
func convertFrom02x(from types.Result, toVersion string) (types.Result, error) {
fromResult := from.(*types020.Result)
toResult := &Result{
CNIVersion: toVersion,
DNS: *fromResult.DNS.Copy(),
Routes: []*types.Route{},
}
if fromResult.IP4 != nil {
toResult.IPs = append(toResult.IPs, convert020IPConfig(fromResult.IP4, "4"))
for _, fromRoute := range fromResult.IP4.Routes {
toResult.Routes = append(toResult.Routes, fromRoute.Copy())
}
}
if fromResult.IP6 != nil {
toResult.IPs = append(toResult.IPs, convert020IPConfig(fromResult.IP6, "6"))
for _, fromRoute := range fromResult.IP6.Routes {
toResult.Routes = append(toResult.Routes, fromRoute.Copy())
}
}
return toResult, nil
}
func convertInternal(from types.Result, toVersion string) (types.Result, error) {
fromResult := from.(*Result)
toResult := &Result{
CNIVersion: toVersion,
DNS: *fromResult.DNS.Copy(),
Routes: []*types.Route{},
}
for _, fromIntf := range fromResult.Interfaces {
toResult.Interfaces = append(toResult.Interfaces, fromIntf.Copy())
}
for _, fromIPC := range fromResult.IPs {
toResult.IPs = append(toResult.IPs, fromIPC.Copy())
}
for _, fromRoute := range fromResult.Routes {
toResult.Routes = append(toResult.Routes, fromRoute.Copy())
}
return toResult, nil
}
func convertTo02x(from types.Result, toVersion string) (types.Result, error) {
fromResult := from.(*Result)
toResult := &types020.Result{
CNIVersion: toVersion,
DNS: *fromResult.DNS.Copy(),
}
for _, fromIP := range fromResult.IPs {
// Only convert the first IP address of each version as 0.2.0
// and earlier cannot handle multiple IP addresses
if fromIP.Version == "4" && toResult.IP4 == nil {
toResult.IP4 = &types020.IPConfig{
IP: fromIP.Address,
Gateway: fromIP.Gateway,
}
} else if fromIP.Version == "6" && toResult.IP6 == nil {
toResult.IP6 = &types020.IPConfig{
IP: fromIP.Address,
Gateway: fromIP.Gateway,
}
}
if toResult.IP4 != nil && toResult.IP6 != nil {
break
}
}
for _, fromRoute := range fromResult.Routes {
is4 := fromRoute.Dst.IP.To4() != nil
if is4 && toResult.IP4 != nil {
toResult.IP4.Routes = append(toResult.IP4.Routes, types.Route{
Dst: fromRoute.Dst,
GW: fromRoute.GW,
})
} else if !is4 && toResult.IP6 != nil {
toResult.IP6.Routes = append(toResult.IP6.Routes, types.Route{
Dst: fromRoute.Dst,
GW: fromRoute.GW,
})
}
}
// 0.2.0 and earlier require at least one IP address in the Result
if toResult.IP4 == nil && toResult.IP6 == nil {
return nil, fmt.Errorf("cannot convert: no valid IP addresses")
}
return toResult, nil
}
func (r *Result) Version() string {
return r.CNIVersion
}
func (r *Result) GetAsVersion(version string) (types.Result, error) {
// If the creator of the result did not set the CNIVersion, assume it
// should be the highest spec version implemented by this Result
if r.CNIVersion == "" {
r.CNIVersion = ImplementedSpecVersion
}
return convert.Convert(r, version)
}
func (r *Result) Print() error {
return r.PrintTo(os.Stdout)
}
func (r *Result) PrintTo(writer io.Writer) error {
data, err := json.MarshalIndent(r, "", " ")
if err != nil {
return err
}
_, err = writer.Write(data)
return err
}
// Interface contains values about the created interfaces
type Interface struct {
Name string `json:"name"`
Mac string `json:"mac,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
}
func (i *Interface) String() string {
return fmt.Sprintf("%+v", *i)
}
func (i *Interface) Copy() *Interface {
if i == nil {
return nil
}
newIntf := *i
return &newIntf
}
// Int returns a pointer to the int value passed in. Used to
// set the IPConfig.Interface field.
func Int(v int) *int {
return &v
}
// IPConfig contains values necessary to configure an IP address on an interface
type IPConfig struct {
// IP version, either "4" or "6"
Version string
// Index into Result structs Interfaces list
Interface *int
Address net.IPNet
Gateway net.IP
}
func (i *IPConfig) String() string {
return fmt.Sprintf("%+v", *i)
}
func (i *IPConfig) Copy() *IPConfig {
if i == nil {
return nil
}
ipc := &IPConfig{
Version: i.Version,
Address: i.Address,
Gateway: i.Gateway,
}
if i.Interface != nil {
intf := *i.Interface
ipc.Interface = &intf
}
return ipc
}
// JSON (un)marshallable types
type ipConfig struct {
Version string `json:"version"`
Interface *int `json:"interface,omitempty"`
Address types.IPNet `json:"address"`
Gateway net.IP `json:"gateway,omitempty"`
}
func (c *IPConfig) MarshalJSON() ([]byte, error) {
ipc := ipConfig{
Version: c.Version,
Interface: c.Interface,
Address: types.IPNet(c.Address),
Gateway: c.Gateway,
}
return json.Marshal(ipc)
}
func (c *IPConfig) UnmarshalJSON(data []byte) error {
ipc := ipConfig{}
if err := json.Unmarshal(data, &ipc); err != nil {
return err
}
c.Version = ipc.Version
c.Interface = ipc.Interface
c.Address = net.IPNet(ipc.Address)
c.Gateway = ipc.Gateway
return nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/100/types.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types100
import (
"encoding/json"
"fmt"
"io"
"net"
"os"
"github.com/containernetworking/cni/pkg/types"
types040 "github.com/containernetworking/cni/pkg/types/040"
convert "github.com/containernetworking/cni/pkg/types/internal"
)
const ImplementedSpecVersion string = "1.0.0"
var supportedVersions = []string{ImplementedSpecVersion}
// Register converters for all versions less than the implemented spec version
func init() {
// Up-converters
convert.RegisterConverter("0.1.0", supportedVersions, convertFrom02x)
convert.RegisterConverter("0.2.0", supportedVersions, convertFrom02x)
convert.RegisterConverter("0.3.0", supportedVersions, convertFrom04x)
convert.RegisterConverter("0.3.1", supportedVersions, convertFrom04x)
convert.RegisterConverter("0.4.0", supportedVersions, convertFrom04x)
// Down-converters
convert.RegisterConverter("1.0.0", []string{"0.3.0", "0.3.1", "0.4.0"}, convertTo04x)
convert.RegisterConverter("1.0.0", []string{"0.1.0", "0.2.0"}, convertTo02x)
// Creator
convert.RegisterCreator(supportedVersions, NewResult)
}
func NewResult(data []byte) (types.Result, error) {
result := &Result{}
if err := json.Unmarshal(data, result); err != nil {
return nil, err
}
for _, v := range supportedVersions {
if result.CNIVersion == v {
return result, nil
}
}
return nil, fmt.Errorf("result type supports %v but unmarshalled CNIVersion is %q",
supportedVersions, result.CNIVersion)
}
func GetResult(r types.Result) (*Result, error) {
resultCurrent, err := r.GetAsVersion(ImplementedSpecVersion)
if err != nil {
return nil, err
}
result, ok := resultCurrent.(*Result)
if !ok {
return nil, fmt.Errorf("failed to convert result")
}
return result, nil
}
func NewResultFromResult(result types.Result) (*Result, error) {
newResult, err := convert.Convert(result, ImplementedSpecVersion)
if err != nil {
return nil, err
}
return newResult.(*Result), nil
}
// Result is what gets returned from the plugin (via stdout) to the caller
type Result struct {
CNIVersion string `json:"cniVersion,omitempty"`
Interfaces []*Interface `json:"interfaces,omitempty"`
IPs []*IPConfig `json:"ips,omitempty"`
Routes []*types.Route `json:"routes,omitempty"`
DNS types.DNS `json:"dns,omitempty"`
}
func convertFrom02x(from types.Result, toVersion string) (types.Result, error) {
result040, err := convert.Convert(from, "0.4.0")
if err != nil {
return nil, err
}
result100, err := convertFrom04x(result040, ImplementedSpecVersion)
if err != nil {
return nil, err
}
return result100, nil
}
func convertIPConfigFrom040(from *types040.IPConfig) *IPConfig {
to := &IPConfig{
Address: from.Address,
Gateway: from.Gateway,
}
if from.Interface != nil {
intf := *from.Interface
to.Interface = &intf
}
return to
}
func convertInterfaceFrom040(from *types040.Interface) *Interface {
return &Interface{
Name: from.Name,
Mac: from.Mac,
Sandbox: from.Sandbox,
}
}
func convertFrom04x(from types.Result, toVersion string) (types.Result, error) {
fromResult := from.(*types040.Result)
toResult := &Result{
CNIVersion: toVersion,
DNS: *fromResult.DNS.Copy(),
Routes: []*types.Route{},
}
for _, fromIntf := range fromResult.Interfaces {
toResult.Interfaces = append(toResult.Interfaces, convertInterfaceFrom040(fromIntf))
}
for _, fromIPC := range fromResult.IPs {
toResult.IPs = append(toResult.IPs, convertIPConfigFrom040(fromIPC))
}
for _, fromRoute := range fromResult.Routes {
toResult.Routes = append(toResult.Routes, fromRoute.Copy())
}
return toResult, nil
}
func convertIPConfigTo040(from *IPConfig) *types040.IPConfig {
version := "6"
if from.Address.IP.To4() != nil {
version = "4"
}
to := &types040.IPConfig{
Version: version,
Address: from.Address,
Gateway: from.Gateway,
}
if from.Interface != nil {
intf := *from.Interface
to.Interface = &intf
}
return to
}
func convertInterfaceTo040(from *Interface) *types040.Interface {
return &types040.Interface{
Name: from.Name,
Mac: from.Mac,
Sandbox: from.Sandbox,
}
}
func convertTo04x(from types.Result, toVersion string) (types.Result, error) {
fromResult := from.(*Result)
toResult := &types040.Result{
CNIVersion: toVersion,
DNS: *fromResult.DNS.Copy(),
Routes: []*types.Route{},
}
for _, fromIntf := range fromResult.Interfaces {
toResult.Interfaces = append(toResult.Interfaces, convertInterfaceTo040(fromIntf))
}
for _, fromIPC := range fromResult.IPs {
toResult.IPs = append(toResult.IPs, convertIPConfigTo040(fromIPC))
}
for _, fromRoute := range fromResult.Routes {
toResult.Routes = append(toResult.Routes, fromRoute.Copy())
}
return toResult, nil
}
func convertTo02x(from types.Result, toVersion string) (types.Result, error) {
// First convert to 0.4.0
result040, err := convertTo04x(from, "0.4.0")
if err != nil {
return nil, err
}
result02x, err := convert.Convert(result040, toVersion)
if err != nil {
return nil, err
}
return result02x, nil
}
func (r *Result) Version() string {
return r.CNIVersion
}
func (r *Result) GetAsVersion(version string) (types.Result, error) {
// If the creator of the result did not set the CNIVersion, assume it
// should be the highest spec version implemented by this Result
if r.CNIVersion == "" {
r.CNIVersion = ImplementedSpecVersion
}
return convert.Convert(r, version)
}
func (r *Result) Print() error {
return r.PrintTo(os.Stdout)
}
func (r *Result) PrintTo(writer io.Writer) error {
data, err := json.MarshalIndent(r, "", " ")
if err != nil {
return err
}
_, err = writer.Write(data)
return err
}
// Interface contains values about the created interfaces
type Interface struct {
Name string `json:"name"`
Mac string `json:"mac,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
}
func (i *Interface) String() string {
return fmt.Sprintf("%+v", *i)
}
func (i *Interface) Copy() *Interface {
if i == nil {
return nil
}
newIntf := *i
return &newIntf
}
// Int returns a pointer to the int value passed in. Used to
// set the IPConfig.Interface field.
func Int(v int) *int {
return &v
}
// IPConfig contains values necessary to configure an IP address on an interface
type IPConfig struct {
// Index into Result structs Interfaces list
Interface *int
Address net.IPNet
Gateway net.IP
}
func (i *IPConfig) String() string {
return fmt.Sprintf("%+v", *i)
}
func (i *IPConfig) Copy() *IPConfig {
if i == nil {
return nil
}
ipc := &IPConfig{
Address: i.Address,
Gateway: i.Gateway,
}
if i.Interface != nil {
intf := *i.Interface
ipc.Interface = &intf
}
return ipc
}
// JSON (un)marshallable types
type ipConfig struct {
Interface *int `json:"interface,omitempty"`
Address types.IPNet `json:"address"`
Gateway net.IP `json:"gateway,omitempty"`
}
func (c *IPConfig) MarshalJSON() ([]byte, error) {
ipc := ipConfig{
Interface: c.Interface,
Address: types.IPNet(c.Address),
Gateway: c.Gateway,
}
return json.Marshal(ipc)
}
func (c *IPConfig) UnmarshalJSON(data []byte) error {
ipc := ipConfig{}
if err := json.Unmarshal(data, &ipc); err != nil {
return err
}
c.Interface = ipc.Interface
c.Address = net.IPNet(ipc.Address)
c.Gateway = ipc.Gateway
return nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/args.go
================================================
// Copyright 2015 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"encoding"
"fmt"
"reflect"
"strings"
)
// UnmarshallableBool typedef for builtin bool
// because builtin type's methods can't be declared
type UnmarshallableBool bool
// UnmarshalText implements the encoding.TextUnmarshaler interface.
// Returns boolean true if the string is "1" or "[Tt]rue"
// Returns boolean false if the string is "0" or "[Ff]alse"
func (b *UnmarshallableBool) UnmarshalText(data []byte) error {
s := strings.ToLower(string(data))
switch s {
case "1", "true":
*b = true
case "0", "false":
*b = false
default:
return fmt.Errorf("boolean unmarshal error: invalid input %s", s)
}
return nil
}
// UnmarshallableString typedef for builtin string
type UnmarshallableString string
// UnmarshalText implements the encoding.TextUnmarshaler interface.
// Returns the string
func (s *UnmarshallableString) UnmarshalText(data []byte) error {
*s = UnmarshallableString(data)
return nil
}
// CommonArgs contains the IgnoreUnknown argument
// and must be embedded by all Arg structs
type CommonArgs struct {
IgnoreUnknown UnmarshallableBool `json:"ignoreunknown,omitempty"`
}
// GetKeyField is a helper function to receive Values
// Values that represent a pointer to a struct
func GetKeyField(keyString string, v reflect.Value) reflect.Value {
return v.Elem().FieldByName(keyString)
}
// UnmarshalableArgsError is used to indicate error unmarshalling args
// from the args-string in the form "K=V;K2=V2;..."
type UnmarshalableArgsError struct {
error
}
// LoadArgs parses args from a string in the form "K=V;K2=V2;..."
func LoadArgs(args string, container interface{}) error {
if args == "" {
return nil
}
containerValue := reflect.ValueOf(container)
pairs := strings.Split(args, ";")
unknownArgs := []string{}
for _, pair := range pairs {
kv := strings.Split(pair, "=")
if len(kv) != 2 {
return fmt.Errorf("ARGS: invalid pair %q", pair)
}
keyString := kv[0]
valueString := kv[1]
keyField := GetKeyField(keyString, containerValue)
if !keyField.IsValid() {
unknownArgs = append(unknownArgs, pair)
continue
}
var keyFieldInterface interface{}
switch {
case keyField.Kind() == reflect.Ptr:
keyField.Set(reflect.New(keyField.Type().Elem()))
keyFieldInterface = keyField.Interface()
case keyField.CanAddr() && keyField.Addr().CanInterface():
keyFieldInterface = keyField.Addr().Interface()
default:
return UnmarshalableArgsError{fmt.Errorf("field '%s' has no valid interface", keyString)}
}
u, ok := keyFieldInterface.(encoding.TextUnmarshaler)
if !ok {
return UnmarshalableArgsError{fmt.Errorf(
"ARGS: cannot unmarshal into field '%s' - type '%s' does not implement encoding.TextUnmarshaler",
keyString, reflect.TypeOf(keyFieldInterface))}
}
err := u.UnmarshalText([]byte(valueString))
if err != nil {
return fmt.Errorf("ARGS: error parsing value of pair %q: %w", pair, err)
}
}
isIgnoreUnknown := GetKeyField("IgnoreUnknown", containerValue).Bool()
if len(unknownArgs) > 0 && !isIgnoreUnknown {
return fmt.Errorf("ARGS: unknown args %q", unknownArgs)
}
return nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/create/create.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package create
import (
"encoding/json"
"fmt"
"github.com/containernetworking/cni/pkg/types"
convert "github.com/containernetworking/cni/pkg/types/internal"
)
// DecodeVersion returns the CNI version from CNI configuration or result JSON,
// or an error if the operation could not be performed.
func DecodeVersion(jsonBytes []byte) (string, error) {
var conf struct {
CNIVersion string `json:"cniVersion"`
}
err := json.Unmarshal(jsonBytes, &conf)
if err != nil {
return "", fmt.Errorf("decoding version from network config: %w", err)
}
if conf.CNIVersion == "" {
return "0.1.0", nil
}
return conf.CNIVersion, nil
}
// Create creates a CNI Result using the given JSON with the expected
// version, or an error if the creation could not be performed
func Create(version string, bytes []byte) (types.Result, error) {
return convert.Create(version, bytes)
}
// CreateFromBytes creates a CNI Result from the given JSON, automatically
// detecting the CNI spec version of the result. An error is returned if the
// operation could not be performed.
func CreateFromBytes(bytes []byte) (types.Result, error) {
version, err := DecodeVersion(bytes)
if err != nil {
return nil, err
}
return convert.Create(version, bytes)
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/internal/convert.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package convert
import (
"fmt"
"github.com/containernetworking/cni/pkg/types"
)
// ConvertFn should convert from the given arbitrary Result type into a
// Result implementing CNI specification version passed in toVersion.
// The function is guaranteed to be passed a Result type matching the
// fromVersion it was registered with, and is guaranteed to be
// passed a toVersion matching one of the toVersions it was registered with.
type ConvertFn func(from types.Result, toVersion string) (types.Result, error)
type converter struct {
// fromVersion is the CNI Result spec version that convertFn accepts
fromVersion string
// toVersions is a list of versions that convertFn can convert to
toVersions []string
convertFn ConvertFn
}
var converters []*converter
func findConverter(fromVersion, toVersion string) *converter {
for _, c := range converters {
if c.fromVersion == fromVersion {
for _, v := range c.toVersions {
if v == toVersion {
return c
}
}
}
}
return nil
}
// Convert converts a CNI Result to the requested CNI specification version,
// or returns an error if the conversion could not be performed or failed
func Convert(from types.Result, toVersion string) (types.Result, error) {
if toVersion == "" {
toVersion = "0.1.0"
}
fromVersion := from.Version()
// Shortcut for same version
if fromVersion == toVersion {
return from, nil
}
// Otherwise find the right converter
c := findConverter(fromVersion, toVersion)
if c == nil {
return nil, fmt.Errorf("no converter for CNI result version %s to %s",
fromVersion, toVersion)
}
return c.convertFn(from, toVersion)
}
// RegisterConverter registers a CNI Result converter. SHOULD NOT BE CALLED
// EXCEPT FROM CNI ITSELF.
func RegisterConverter(fromVersion string, toVersions []string, convertFn ConvertFn) {
// Make sure there is no converter already registered for these
// from and to versions
for _, v := range toVersions {
if findConverter(fromVersion, v) != nil {
panic(fmt.Sprintf("converter already registered for %s to %s",
fromVersion, v))
}
}
converters = append(converters, &converter{
fromVersion: fromVersion,
toVersions: toVersions,
convertFn: convertFn,
})
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/internal/create.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package convert
import (
"fmt"
"github.com/containernetworking/cni/pkg/types"
)
type ResultFactoryFunc func([]byte) (types.Result, error)
type creator struct {
// CNI Result spec versions that createFn can create a Result for
versions []string
createFn ResultFactoryFunc
}
var creators []*creator
func findCreator(version string) *creator {
for _, c := range creators {
for _, v := range c.versions {
if v == version {
return c
}
}
}
return nil
}
// Create creates a CNI Result using the given JSON, or an error if the creation
// could not be performed
func Create(version string, bytes []byte) (types.Result, error) {
if c := findCreator(version); c != nil {
return c.createFn(bytes)
}
return nil, fmt.Errorf("unsupported CNI result version %q", version)
}
// RegisterCreator registers a CNI Result creator. SHOULD NOT BE CALLED
// EXCEPT FROM CNI ITSELF.
func RegisterCreator(versions []string, createFn ResultFactoryFunc) {
// Make sure there is no creator already registered for these versions
for _, v := range versions {
if findCreator(v) != nil {
panic(fmt.Sprintf("creator already registered for %s", v))
}
}
creators = append(creators, &creator{
versions: versions,
createFn: createFn,
})
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/types/types.go
================================================
// Copyright 2015 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"encoding/json"
"fmt"
"io"
"net"
"os"
)
// like net.IPNet but adds JSON marshalling and unmarshalling
type IPNet net.IPNet
// ParseCIDR takes a string like "10.2.3.1/24" and
// return IPNet with "10.2.3.1" and /24 mask
func ParseCIDR(s string) (*net.IPNet, error) {
ip, ipn, err := net.ParseCIDR(s)
if err != nil {
return nil, err
}
ipn.IP = ip
return ipn, nil
}
func (n IPNet) MarshalJSON() ([]byte, error) {
return json.Marshal((*net.IPNet)(&n).String())
}
func (n *IPNet) UnmarshalJSON(data []byte) error {
var s string
if err := json.Unmarshal(data, &s); err != nil {
return err
}
tmp, err := ParseCIDR(s)
if err != nil {
return err
}
*n = IPNet(*tmp)
return nil
}
// NetConf describes a network.
type NetConf struct {
CNIVersion string `json:"cniVersion,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Capabilities map[string]bool `json:"capabilities,omitempty"`
IPAM IPAM `json:"ipam,omitempty"`
DNS DNS `json:"dns"`
RawPrevResult map[string]interface{} `json:"prevResult,omitempty"`
PrevResult Result `json:"-"`
}
type IPAM struct {
Type string `json:"type,omitempty"`
}
// NetConfList describes an ordered list of networks.
type NetConfList struct {
CNIVersion string `json:"cniVersion,omitempty"`
Name string `json:"name,omitempty"`
DisableCheck bool `json:"disableCheck,omitempty"`
Plugins []*NetConf `json:"plugins,omitempty"`
}
// Result is an interface that provides the result of plugin execution
type Result interface {
// The highest CNI specification result version the result supports
// without having to convert
Version() string
// Returns the result converted into the requested CNI specification
// result version, or an error if conversion failed
GetAsVersion(version string) (Result, error)
// Prints the result in JSON format to stdout
Print() error
// Prints the result in JSON format to provided writer
PrintTo(writer io.Writer) error
}
func PrintResult(result Result, version string) error {
newResult, err := result.GetAsVersion(version)
if err != nil {
return err
}
return newResult.Print()
}
// DNS contains values interesting for DNS resolvers
type DNS struct {
Nameservers []string `json:"nameservers,omitempty"`
Domain string `json:"domain,omitempty"`
Search []string `json:"search,omitempty"`
Options []string `json:"options,omitempty"`
}
func (d *DNS) Copy() *DNS {
if d == nil {
return nil
}
to := &DNS{Domain: d.Domain}
for _, ns := range d.Nameservers {
to.Nameservers = append(to.Nameservers, ns)
}
for _, s := range d.Search {
to.Search = append(to.Search, s)
}
for _, o := range d.Options {
to.Options = append(to.Options, o)
}
return to
}
type Route struct {
Dst net.IPNet
GW net.IP
}
func (r *Route) String() string {
return fmt.Sprintf("%+v", *r)
}
func (r *Route) Copy() *Route {
if r == nil {
return nil
}
return &Route{
Dst: r.Dst,
GW: r.GW,
}
}
// Well known error codes
// see https://github.com/containernetworking/cni/blob/master/SPEC.md#well-known-error-codes
const (
ErrUnknown uint = iota // 0
ErrIncompatibleCNIVersion // 1
ErrUnsupportedField // 2
ErrUnknownContainer // 3
ErrInvalidEnvironmentVariables // 4
ErrIOFailure // 5
ErrDecodingFailure // 6
ErrInvalidNetworkConfig // 7
ErrTryAgainLater uint = 11
ErrInternal uint = 999
)
type Error struct {
Code uint `json:"code"`
Msg string `json:"msg"`
Details string `json:"details,omitempty"`
}
func NewError(code uint, msg, details string) *Error {
return &Error{
Code: code,
Msg: msg,
Details: details,
}
}
func (e *Error) Error() string {
details := ""
if e.Details != "" {
details = fmt.Sprintf("; %v", e.Details)
}
return fmt.Sprintf("%v%v", e.Msg, details)
}
func (e *Error) Print() error {
return prettyPrint(e)
}
// net.IPNet is not JSON (un)marshallable so this duality is needed
// for our custom IPNet type
// JSON (un)marshallable types
type route struct {
Dst IPNet `json:"dst"`
GW net.IP `json:"gw,omitempty"`
}
func (r *Route) UnmarshalJSON(data []byte) error {
rt := route{}
if err := json.Unmarshal(data, &rt); err != nil {
return err
}
r.Dst = net.IPNet(rt.Dst)
r.GW = rt.GW
return nil
}
func (r Route) MarshalJSON() ([]byte, error) {
rt := route{
Dst: IPNet(r.Dst),
GW: r.GW,
}
return json.Marshal(rt)
}
func prettyPrint(obj interface{}) error {
data, err := json.MarshalIndent(obj, "", " ")
if err != nil {
return err
}
_, err = os.Stdout.Write(data)
return err
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/utils/utils.go
================================================
// Copyright 2019 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package utils
import (
"bytes"
"fmt"
"regexp"
"unicode"
"github.com/containernetworking/cni/pkg/types"
)
const (
// cniValidNameChars is the regexp used to validate valid characters in
// containerID and networkName
cniValidNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.\-]`
// maxInterfaceNameLength is the length max of a valid interface name
maxInterfaceNameLength = 15
)
var cniReg = regexp.MustCompile(`^` + cniValidNameChars + `*$`)
// ValidateContainerID will validate that the supplied containerID is not empty does not contain invalid characters
func ValidateContainerID(containerID string) *types.Error {
if containerID == "" {
return types.NewError(types.ErrUnknownContainer, "missing containerID", "")
}
if !cniReg.MatchString(containerID) {
return types.NewError(types.ErrInvalidEnvironmentVariables, "invalid characters in containerID", containerID)
}
return nil
}
// ValidateNetworkName will validate that the supplied networkName does not contain invalid characters
func ValidateNetworkName(networkName string) *types.Error {
if networkName == "" {
return types.NewError(types.ErrInvalidNetworkConfig, "missing network name:", "")
}
if !cniReg.MatchString(networkName) {
return types.NewError(types.ErrInvalidNetworkConfig, "invalid characters found in network name", networkName)
}
return nil
}
// ValidateInterfaceName will validate the interface name based on the three rules below
// 1. The name must not be empty
// 2. The name must be less than 16 characters
// 3. The name must not be "." or ".."
// 3. The name must not contain / or : or any whitespace characters
// ref to https://github.com/torvalds/linux/blob/master/net/core/dev.c#L1024
func ValidateInterfaceName(ifName string) *types.Error {
if len(ifName) == 0 {
return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is empty", "")
}
if len(ifName) > maxInterfaceNameLength {
return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is too long", fmt.Sprintf("interface name should be less than %d characters", maxInterfaceNameLength+1))
}
if ifName == "." || ifName == ".." {
return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is . or ..", "")
}
for _, r := range bytes.Runes([]byte(ifName)) {
if r == '/' || r == ':' || unicode.IsSpace(r) {
return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name contains / or : or whitespace characters", "")
}
}
return nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/version/conf.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package version
import (
"github.com/containernetworking/cni/pkg/types/create"
)
// ConfigDecoder can decode the CNI version available in network config data
type ConfigDecoder struct{}
func (*ConfigDecoder) Decode(jsonBytes []byte) (string, error) {
return create.DecodeVersion(jsonBytes)
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/version/plugin.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package version
import (
"encoding/json"
"fmt"
"io"
"strconv"
"strings"
)
// PluginInfo reports information about CNI versioning
type PluginInfo interface {
// SupportedVersions returns one or more CNI spec versions that the plugin
// supports. If input is provided in one of these versions, then the plugin
// promises to use the same CNI version in its response
SupportedVersions() []string
// Encode writes this CNI version information as JSON to the given Writer
Encode(io.Writer) error
}
type pluginInfo struct {
CNIVersion_ string `json:"cniVersion"`
SupportedVersions_ []string `json:"supportedVersions,omitempty"`
}
// pluginInfo implements the PluginInfo interface
var _ PluginInfo = &pluginInfo{}
func (p *pluginInfo) Encode(w io.Writer) error {
return json.NewEncoder(w).Encode(p)
}
func (p *pluginInfo) SupportedVersions() []string {
return p.SupportedVersions_
}
// PluginSupports returns a new PluginInfo that will report the given versions
// as supported
func PluginSupports(supportedVersions ...string) PluginInfo {
if len(supportedVersions) < 1 {
panic("programmer error: you must support at least one version")
}
return &pluginInfo{
CNIVersion_: Current(),
SupportedVersions_: supportedVersions,
}
}
// PluginDecoder can decode the response returned by a plugin's VERSION command
type PluginDecoder struct{}
func (*PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) {
var info pluginInfo
err := json.Unmarshal(jsonBytes, &info)
if err != nil {
return nil, fmt.Errorf("decoding version info: %w", err)
}
if info.CNIVersion_ == "" {
return nil, fmt.Errorf("decoding version info: missing field cniVersion")
}
if len(info.SupportedVersions_) == 0 {
if info.CNIVersion_ == "0.2.0" {
return PluginSupports("0.1.0", "0.2.0"), nil
}
return nil, fmt.Errorf("decoding version info: missing field supportedVersions")
}
return &info, nil
}
// ParseVersion parses a version string like "3.0.1" or "0.4.5" into major,
// minor, and micro numbers or returns an error
func ParseVersion(version string) (int, int, int, error) {
var major, minor, micro int
if version == "" { // special case: no version declared == v0.1.0
return 0, 1, 0, nil
}
parts := strings.Split(version, ".")
if len(parts) >= 4 {
return -1, -1, -1, fmt.Errorf("invalid version %q: too many parts", version)
}
major, err := strconv.Atoi(parts[0])
if err != nil {
return -1, -1, -1, fmt.Errorf("failed to convert major version part %q: %w", parts[0], err)
}
if len(parts) >= 2 {
minor, err = strconv.Atoi(parts[1])
if err != nil {
return -1, -1, -1, fmt.Errorf("failed to convert minor version part %q: %w", parts[1], err)
}
}
if len(parts) >= 3 {
micro, err = strconv.Atoi(parts[2])
if err != nil {
return -1, -1, -1, fmt.Errorf("failed to convert micro version part %q: %w", parts[2], err)
}
}
return major, minor, micro, nil
}
// GreaterThanOrEqualTo takes two string versions, parses them into major/minor/micro
// numbers, and compares them to determine whether the first version is greater
// than or equal to the second
func GreaterThanOrEqualTo(version, otherVersion string) (bool, error) {
firstMajor, firstMinor, firstMicro, err := ParseVersion(version)
if err != nil {
return false, err
}
secondMajor, secondMinor, secondMicro, err := ParseVersion(otherVersion)
if err != nil {
return false, err
}
if firstMajor > secondMajor {
return true, nil
} else if firstMajor == secondMajor {
if firstMinor > secondMinor {
return true, nil
} else if firstMinor == secondMinor && firstMicro >= secondMicro {
return true, nil
}
}
return false, nil
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/version/reconcile.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package version
import "fmt"
type ErrorIncompatible struct {
Config string
Supported []string
}
func (e *ErrorIncompatible) Details() string {
return fmt.Sprintf("config is %q, plugin supports %q", e.Config, e.Supported)
}
func (e *ErrorIncompatible) Error() string {
return fmt.Sprintf("incompatible CNI versions: %s", e.Details())
}
type Reconciler struct{}
func (r *Reconciler) Check(configVersion string, pluginInfo PluginInfo) *ErrorIncompatible {
return r.CheckRaw(configVersion, pluginInfo.SupportedVersions())
}
func (*Reconciler) CheckRaw(configVersion string, supportedVersions []string) *ErrorIncompatible {
for _, supportedVersion := range supportedVersions {
if configVersion == supportedVersion {
return nil
}
}
return &ErrorIncompatible{
Config: configVersion,
Supported: supportedVersions,
}
}
================================================
FILE: vendor/github.com/containernetworking/cni/pkg/version/version.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package version
import (
"encoding/json"
"fmt"
"github.com/containernetworking/cni/pkg/types"
types100 "github.com/containernetworking/cni/pkg/types/100"
"github.com/containernetworking/cni/pkg/types/create"
)
// Current reports the version of the CNI spec implemented by this library
func Current() string {
return types100.ImplementedSpecVersion
}
// Legacy PluginInfo describes a plugin that is backwards compatible with the
// CNI spec version 0.1.0. In particular, a runtime compiled against the 0.1.0
// library ought to work correctly with a plugin that reports support for
// Legacy versions.
//
// Any future CNI spec versions which meet this definition should be added to
// this list.
var Legacy = PluginSupports("0.1.0", "0.2.0")
var All = PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0", "1.0.0")
// VersionsFrom returns a list of versions starting from min, inclusive
func VersionsStartingFrom(min string) PluginInfo {
out := []string{}
// cheat, just assume ordered
ok := false
for _, v := range All.SupportedVersions() {
if !ok && v == min {
ok = true
}
if ok {
out = append(out, v)
}
}
return PluginSupports(out...)
}
// Finds a Result object matching the requested version (if any) and asks
// that object to parse the plugin result, returning an error if parsing failed.
func NewResult(version string, resultBytes []byte) (types.Result, error) {
return create.Create(version, resultBytes)
}
// ParsePrevResult parses a prevResult in a NetConf structure and sets
// the NetConf's PrevResult member to the parsed Result object.
func ParsePrevResult(conf *types.NetConf) error {
if conf.RawPrevResult == nil {
return nil
}
// Prior to 1.0.0, Result types may not marshal a CNIVersion. Since the
// result version must match the config version, if the Result's version
// is empty, inject the config version.
if ver, ok := conf.RawPrevResult["CNIVersion"]; !ok || ver == "" {
conf.RawPrevResult["CNIVersion"] = conf.CNIVersion
}
resultBytes, err := json.Marshal(conf.RawPrevResult)
if err != nil {
return fmt.Errorf("could not serialize prevResult: %w", err)
}
conf.RawPrevResult = nil
conf.PrevResult, err = create.Create(conf.CNIVersion, resultBytes)
if err != nil {
return fmt.Errorf("could not parse prevResult: %w", err)
}
return nil
}
================================================
FILE: vendor/github.com/containernetworking/plugins/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/containernetworking/plugins/pkg/ns/README.md
================================================
### Namespaces, Threads, and Go
On Linux each OS thread can have a different network namespace. Go's thread scheduling model switches goroutines between OS threads based on OS thread load and whether the goroutine would block other goroutines. This can result in a goroutine switching network namespaces without notice and lead to errors in your code.
### Namespace Switching
Switching namespaces with the `ns.Set()` method is not recommended without additional strategies to prevent unexpected namespace changes when your goroutines switch OS threads.
Go provides the `runtime.LockOSThread()` function to ensure a specific goroutine executes on its current OS thread and prevents any other goroutine from running in that thread until the locked one exits. Careful usage of `LockOSThread()` and goroutines can provide good control over which network namespace a given goroutine executes in.
For example, you cannot rely on the `ns.Set()` namespace being the current namespace after the `Set()` call unless you do two things. First, the goroutine calling `Set()` must have previously called `LockOSThread()`. Second, you must ensure `runtime.UnlockOSThread()` is not called somewhere in-between. You also cannot rely on the initial network namespace remaining the current network namespace if any other code in your program switches namespaces, unless you have already called `LockOSThread()` in that goroutine. Note that `LockOSThread()` prevents the Go scheduler from optimally scheduling goroutines for best performance, so `LockOSThread()` should only be used in small, isolated goroutines that release the lock quickly.
### Do() The Recommended Thing
The `ns.Do()` method provides **partial** control over network namespaces for you by implementing these strategies. All code dependent on a particular network namespace (including the root namespace) should be wrapped in the `ns.Do()` method to ensure the correct namespace is selected for the duration of your code. For example:
```go
err = targetNs.Do(func(hostNs ns.NetNS) error {
dummy := &netlink.Dummy{
LinkAttrs: netlink.LinkAttrs{
Name: "dummy0",
},
}
return netlink.LinkAdd(dummy)
})
```
Note this requirement to wrap every network call is very onerous - any libraries you call might call out to network services such as DNS, and all such calls need to be protected after you call `ns.Do()`. All goroutines spawned from within the `ns.Do` will not inherit the new namespace. The CNI plugins all exit very soon after calling `ns.Do()` which helps to minimize the problem.
When a new thread is spawned in Linux, it inherits the namespace of its parent. In versions of go **prior to 1.10**, if the runtime spawns a new OS thread, it picks the parent randomly. If the chosen parent thread has been moved to a new namespace (even temporarily), the new OS thread will be permanently "stuck in the wrong namespace", and goroutines will non-deterministically switch namespaces as they are rescheduled.
In short, **there was no safe way to change network namespaces, even temporarily, from within a long-lived, multithreaded Go process**. If you wish to do this, you must use go 1.10 or greater.
### Creating network namespaces
Earlier versions of this library managed namespace creation, but as CNI does not actually utilize this feature (and it was essentially unmaintained), it was removed. If you're writing a container runtime, you should implement namespace management yourself. However, there are some gotchas when doing so, especially around handling `/var/run/netns`. A reasonably correct reference implementation, borrowed from `rkt`, can be found in `pkg/testutils/netns_linux.go` if you're in need of a source of inspiration.
### Further Reading
- https://github.com/golang/go/wiki/LockOSThread
- http://morsmachine.dk/go-scheduler
- https://github.com/containernetworking/cni/issues/262
- https://golang.org/pkg/runtime/
- https://www.weave.works/blog/linux-namespaces-and-go-don-t-mix
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/ns/ns_linux.go
================================================
// Copyright 2015-2017 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package ns
import (
"fmt"
"os"
"runtime"
"sync"
"syscall"
"golang.org/x/sys/unix"
)
// Returns an object representing the current OS thread's network namespace
func GetCurrentNS() (NetNS, error) {
// Lock the thread in case other goroutine executes in it and changes its
// network namespace after getCurrentThreadNetNSPath(), otherwise it might
// return an unexpected network namespace.
runtime.LockOSThread()
defer runtime.UnlockOSThread()
return GetNS(getCurrentThreadNetNSPath())
}
func getCurrentThreadNetNSPath() string {
// /proc/self/ns/net returns the namespace of the main thread, not
// of whatever thread this goroutine is running on. Make sure we
// use the thread's net namespace since the thread is switching around
return fmt.Sprintf("/proc/%d/task/%d/ns/net", os.Getpid(), unix.Gettid())
}
func (ns *netNS) Close() error {
if err := ns.errorIfClosed(); err != nil {
return err
}
if err := ns.file.Close(); err != nil {
return fmt.Errorf("Failed to close %q: %v", ns.file.Name(), err)
}
ns.closed = true
return nil
}
func (ns *netNS) Set() error {
if err := ns.errorIfClosed(); err != nil {
return err
}
if err := unix.Setns(int(ns.Fd()), unix.CLONE_NEWNET); err != nil {
return fmt.Errorf("Error switching to ns %v: %v", ns.file.Name(), err)
}
return nil
}
type NetNS interface {
// Executes the passed closure in this object's network namespace,
// attempting to restore the original namespace before returning.
// However, since each OS thread can have a different network namespace,
// and Go's thread scheduling is highly variable, callers cannot
// guarantee any specific namespace is set unless operations that
// require that namespace are wrapped with Do(). Also, no code called
// from Do() should call runtime.UnlockOSThread(), or the risk
// of executing code in an incorrect namespace will be greater. See
// https://github.com/golang/go/wiki/LockOSThread for further details.
Do(toRun func(NetNS) error) error
// Sets the current network namespace to this object's network namespace.
// Note that since Go's thread scheduling is highly variable, callers
// cannot guarantee the requested namespace will be the current namespace
// after this function is called; to ensure this wrap operations that
// require the namespace with Do() instead.
Set() error
// Returns the filesystem path representing this object's network namespace
Path() string
// Returns a file descriptor representing this object's network namespace
Fd() uintptr
// Cleans up this instance of the network namespace; if this instance
// is the last user the namespace will be destroyed
Close() error
}
type netNS struct {
file *os.File
closed bool
}
// netNS implements the NetNS interface
var _ NetNS = &netNS{}
const (
// https://github.com/torvalds/linux/blob/master/include/uapi/linux/magic.h
NSFS_MAGIC = 0x6e736673
PROCFS_MAGIC = 0x9fa0
)
type NSPathNotExistErr struct{ msg string }
func (e NSPathNotExistErr) Error() string { return e.msg }
type NSPathNotNSErr struct{ msg string }
func (e NSPathNotNSErr) Error() string { return e.msg }
func IsNSorErr(nspath string) error {
stat := syscall.Statfs_t{}
if err := syscall.Statfs(nspath, &stat); err != nil {
if os.IsNotExist(err) {
err = NSPathNotExistErr{msg: fmt.Sprintf("failed to Statfs %q: %v", nspath, err)}
} else {
err = fmt.Errorf("failed to Statfs %q: %v", nspath, err)
}
return err
}
switch stat.Type {
case PROCFS_MAGIC, NSFS_MAGIC:
return nil
default:
return NSPathNotNSErr{msg: fmt.Sprintf("unknown FS magic on %q: %x", nspath, stat.Type)}
}
}
// Returns an object representing the namespace referred to by @path
func GetNS(nspath string) (NetNS, error) {
err := IsNSorErr(nspath)
if err != nil {
return nil, err
}
fd, err := os.Open(nspath)
if err != nil {
return nil, err
}
return &netNS{file: fd}, nil
}
func (ns *netNS) Path() string {
return ns.file.Name()
}
func (ns *netNS) Fd() uintptr {
return ns.file.Fd()
}
func (ns *netNS) errorIfClosed() error {
if ns.closed {
return fmt.Errorf("%q has already been closed", ns.file.Name())
}
return nil
}
func (ns *netNS) Do(toRun func(NetNS) error) error {
if err := ns.errorIfClosed(); err != nil {
return err
}
containedCall := func(hostNS NetNS) error {
threadNS, err := GetCurrentNS()
if err != nil {
return fmt.Errorf("failed to open current netns: %v", err)
}
defer threadNS.Close()
// switch to target namespace
if err = ns.Set(); err != nil {
return fmt.Errorf("error switching to ns %v: %v", ns.file.Name(), err)
}
defer func() {
err := threadNS.Set() // switch back
if err == nil {
// Unlock the current thread only when we successfully switched back
// to the original namespace; otherwise leave the thread locked which
// will force the runtime to scrap the current thread, that is maybe
// not as optimal but at least always safe to do.
runtime.UnlockOSThread()
}
}()
return toRun(hostNS)
}
// save a handle to current network namespace
hostNS, err := GetCurrentNS()
if err != nil {
return fmt.Errorf("Failed to open current namespace: %v", err)
}
defer hostNS.Close()
var wg sync.WaitGroup
wg.Add(1)
// Start the callback in a new green thread so that if we later fail
// to switch the namespace back to the original one, we can safely
// leave the thread locked to die without a risk of the current thread
// left lingering with incorrect namespace.
var innerError error
go func() {
defer wg.Done()
runtime.LockOSThread()
innerError = containedCall(hostNS)
}()
wg.Wait()
return innerError
}
// WithNetNSPath executes the passed closure under the given network
// namespace, restoring the original namespace afterwards.
func WithNetNSPath(nspath string, toRun func(NetNS) error) error {
ns, err := GetNS(nspath)
if err != nil {
return err
}
defer ns.Close()
return ns.Do(toRun)
}
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/bad_reader.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testutils
import "errors"
// BadReader is an io.Reader which always errors
type BadReader struct {
Error error
}
func (r *BadReader) Read(buffer []byte) (int, error) {
if r.Error != nil {
return 0, r.Error
}
return 0, errors.New("banana")
}
func (r *BadReader) Close() error {
return nil
}
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/cmd.go
================================================
// Copyright 2016 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testutils
import (
"io/ioutil"
"os"
"github.com/containernetworking/cni/pkg/skel"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/version"
)
func envCleanup() {
os.Unsetenv("CNI_COMMAND")
os.Unsetenv("CNI_PATH")
os.Unsetenv("CNI_NETNS")
os.Unsetenv("CNI_IFNAME")
os.Unsetenv("CNI_CONTAINERID")
}
func CmdAdd(cniNetns, cniContainerID, cniIfname string, conf []byte, f func() error) (types.Result, []byte, error) {
os.Setenv("CNI_COMMAND", "ADD")
os.Setenv("CNI_PATH", os.Getenv("PATH"))
os.Setenv("CNI_NETNS", cniNetns)
os.Setenv("CNI_IFNAME", cniIfname)
os.Setenv("CNI_CONTAINERID", cniContainerID)
defer envCleanup()
// Redirect stdout to capture plugin result
oldStdout := os.Stdout
r, w, err := os.Pipe()
if err != nil {
return nil, nil, err
}
os.Stdout = w
err = f()
w.Close()
var out []byte
if err == nil {
out, err = ioutil.ReadAll(r)
}
os.Stdout = oldStdout
// Return errors after restoring stdout so Ginkgo will correctly
// emit verbose error information on stdout
if err != nil {
return nil, nil, err
}
// Plugin must return result in same version as specified in netconf
versionDecoder := &version.ConfigDecoder{}
confVersion, err := versionDecoder.Decode(conf)
if err != nil {
return nil, nil, err
}
result, err := version.NewResult(confVersion, out)
if err != nil {
return nil, nil, err
}
return result, out, nil
}
func CmdAddWithArgs(args *skel.CmdArgs, f func() error) (types.Result, []byte, error) {
return CmdAdd(args.Netns, args.ContainerID, args.IfName, args.StdinData, f)
}
func CmdCheck(cniNetns, cniContainerID, cniIfname string, conf []byte, f func() error) error {
os.Setenv("CNI_COMMAND", "CHECK")
os.Setenv("CNI_PATH", os.Getenv("PATH"))
os.Setenv("CNI_NETNS", cniNetns)
os.Setenv("CNI_IFNAME", cniIfname)
os.Setenv("CNI_CONTAINERID", cniContainerID)
defer envCleanup()
return f()
}
func CmdCheckWithArgs(args *skel.CmdArgs, f func() error) error {
return CmdCheck(args.Netns, args.ContainerID, args.IfName, args.StdinData, f)
}
func CmdDel(cniNetns, cniContainerID, cniIfname string, f func() error) error {
os.Setenv("CNI_COMMAND", "DEL")
os.Setenv("CNI_PATH", os.Getenv("PATH"))
os.Setenv("CNI_NETNS", cniNetns)
os.Setenv("CNI_IFNAME", cniIfname)
os.Setenv("CNI_CONTAINERID", cniContainerID)
defer envCleanup()
return f()
}
func CmdDelWithArgs(args *skel.CmdArgs, f func() error) error {
return CmdDel(args.Netns, args.ContainerID, args.IfName, f)
}
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/dns.go
================================================
// Copyright 2019 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testutils
import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/containernetworking/cni/pkg/types"
)
// TmpResolvConf will create a temporary file and write the provided DNS settings to
// it in the resolv.conf format. It returns the path of the created temporary file or
// an error if any occurs while creating/writing the file. It is the caller's
// responsibility to remove the file.
func TmpResolvConf(dnsConf types.DNS) (string, error) {
f, err := ioutil.TempFile("", "cni_test_resolv.conf")
if err != nil {
return "", fmt.Errorf("failed to get temp file for CNI test resolv.conf: %v", err)
}
defer f.Close()
path := f.Name()
defer func() {
if err != nil {
os.RemoveAll(path)
}
}()
// see "man 5 resolv.conf" for the format of resolv.conf
var resolvConfLines []string
for _, nameserver := range dnsConf.Nameservers {
resolvConfLines = append(resolvConfLines, fmt.Sprintf("nameserver %s", nameserver))
}
resolvConfLines = append(resolvConfLines, fmt.Sprintf("domain %s", dnsConf.Domain))
resolvConfLines = append(resolvConfLines, fmt.Sprintf("search %s", strings.Join(dnsConf.Search, " ")))
resolvConfLines = append(resolvConfLines, fmt.Sprintf("options %s", strings.Join(dnsConf.Options, " ")))
resolvConf := strings.Join(resolvConfLines, "\n")
_, err = f.Write([]byte(resolvConf))
if err != nil {
return "", fmt.Errorf("failed to write temp resolv.conf for CNI test: %v", err)
}
return path, err
}
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/netns_linux.go
================================================
// Copyright 2018 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testutils
import (
"crypto/rand"
"fmt"
"os"
"path"
"runtime"
"strings"
"sync"
"syscall"
"github.com/containernetworking/plugins/pkg/ns"
"golang.org/x/sys/unix"
)
func getNsRunDir() string {
xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR")
/// If XDG_RUNTIME_DIR is set, check if the current user owns /var/run. If
// the owner is different, we are most likely running in a user namespace.
// In that case use $XDG_RUNTIME_DIR/netns as runtime dir.
if xdgRuntimeDir != "" {
if s, err := os.Stat("/var/run"); err == nil {
st, ok := s.Sys().(*syscall.Stat_t)
if ok && int(st.Uid) != os.Geteuid() {
return path.Join(xdgRuntimeDir, "netns")
}
}
}
return "/var/run/netns"
}
// Creates a new persistent (bind-mounted) network namespace and returns an object
// representing that namespace, without switching to it.
func NewNS() (ns.NetNS, error) {
nsRunDir := getNsRunDir()
b := make([]byte, 16)
_, err := rand.Reader.Read(b)
if err != nil {
return nil, fmt.Errorf("failed to generate random netns name: %v", err)
}
// Create the directory for mounting network namespaces
// This needs to be a shared mountpoint in case it is mounted in to
// other namespaces (containers)
err = os.MkdirAll(nsRunDir, 0755)
if err != nil {
return nil, err
}
// Remount the namespace directory shared. This will fail if it is not
// already a mountpoint, so bind-mount it on to itself to "upgrade" it
// to a mountpoint.
err = unix.Mount("", nsRunDir, "none", unix.MS_SHARED|unix.MS_REC, "")
if err != nil {
if err != unix.EINVAL {
return nil, fmt.Errorf("mount --make-rshared %s failed: %q", nsRunDir, err)
}
// Recursively remount /var/run/netns on itself. The recursive flag is
// so that any existing netns bindmounts are carried over.
err = unix.Mount(nsRunDir, nsRunDir, "none", unix.MS_BIND|unix.MS_REC, "")
if err != nil {
return nil, fmt.Errorf("mount --rbind %s %s failed: %q", nsRunDir, nsRunDir, err)
}
// Now we can make it shared
err = unix.Mount("", nsRunDir, "none", unix.MS_SHARED|unix.MS_REC, "")
if err != nil {
return nil, fmt.Errorf("mount --make-rshared %s failed: %q", nsRunDir, err)
}
}
nsName := fmt.Sprintf("cnitest-%x-%x-%x-%x-%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
// create an empty file at the mount point
nsPath := path.Join(nsRunDir, nsName)
mountPointFd, err := os.Create(nsPath)
if err != nil {
return nil, err
}
mountPointFd.Close()
// Ensure the mount point is cleaned up on errors; if the namespace
// was successfully mounted this will have no effect because the file
// is in-use
defer os.RemoveAll(nsPath)
var wg sync.WaitGroup
wg.Add(1)
// do namespace work in a dedicated goroutine, so that we can safely
// Lock/Unlock OSThread without upsetting the lock/unlock state of
// the caller of this function
go (func() {
defer wg.Done()
runtime.LockOSThread()
// Don't unlock. By not unlocking, golang will kill the OS thread when the
// goroutine is done (for go1.10+)
var origNS ns.NetNS
origNS, err = ns.GetNS(getCurrentThreadNetNSPath())
if err != nil {
return
}
defer origNS.Close()
// create a new netns on the current thread
err = unix.Unshare(unix.CLONE_NEWNET)
if err != nil {
return
}
// Put this thread back to the orig ns, since it might get reused (pre go1.10)
defer origNS.Set()
// bind mount the netns from the current thread (from /proc) onto the
// mount point. This causes the namespace to persist, even when there
// are no threads in the ns.
err = unix.Mount(getCurrentThreadNetNSPath(), nsPath, "none", unix.MS_BIND, "")
if err != nil {
err = fmt.Errorf("failed to bind mount ns at %s: %v", nsPath, err)
}
})()
wg.Wait()
if err != nil {
return nil, fmt.Errorf("failed to create namespace: %v", err)
}
return ns.GetNS(nsPath)
}
// UnmountNS unmounts the NS held by the netns object
func UnmountNS(ns ns.NetNS) error {
nsPath := ns.Path()
// Only unmount if it's been bind-mounted (don't touch namespaces in /proc...)
if strings.HasPrefix(nsPath, getNsRunDir()) {
if err := unix.Unmount(nsPath, 0); err != nil {
return fmt.Errorf("failed to unmount NS: at %s: %v", nsPath, err)
}
if err := os.Remove(nsPath); err != nil {
return fmt.Errorf("failed to remove ns path %s: %v", nsPath, err)
}
}
return nil
}
// getCurrentThreadNetNSPath copied from pkg/ns
func getCurrentThreadNetNSPath() string {
// /proc/self/ns/net returns the namespace of the main thread, not
// of whatever thread this goroutine is running on. Make sure we
// use the thread's net namespace since the thread is switching around
return fmt.Sprintf("/proc/%d/task/%d/ns/net", os.Getpid(), unix.Gettid())
}
================================================
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/ping.go
================================================
// Copyright 2017 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package testutils
import (
"bytes"
"fmt"
"os/exec"
"strconv"
"syscall"
)
// Ping shells out to the `ping` command. Returns nil if successful.
func Ping(saddr, daddr string, isV6 bool, timeoutSec int) error {
args := []string{
"-c", "1",
"-W", strconv.Itoa(timeoutSec),
"-I", saddr,
daddr,
}
bin := "ping"
if isV6 {
bin = "ping6"
}
cmd := exec.Command(bin, args...)
var stderr bytes.Buffer
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
switch e := err.(type) {
case *exec.ExitError:
return fmt.Errorf("%v exit status %d: %s",
args, e.Sys().(syscall.WaitStatus).ExitStatus(),
stderr.String())
default:
return err
}
}
return nil
}
================================================
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/backend.go
================================================
// Copyright 2015 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package disk
import (
"io/ioutil"
"net"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/containernetworking/plugins/plugins/ipam/host-local/backend"
)
const lastIPFilePrefix = "last_reserved_ip."
const LineBreak = "\r\n"
var defaultDataDir = "/var/lib/cni/networks"
// Store is a simple disk-backed store that creates one file per IP
// address in a given directory. The contents of the file are the container ID.
type Store struct {
*FileLock
dataDir string
}
// Store implements the Store interface
var _ backend.Store = &Store{}
func New(network, dataDir string) (*Store, error) {
if dataDir == "" {
dataDir = defaultDataDir
}
dir := filepath.Join(dataDir, network)
if err := os.MkdirAll(dir, 0755); err != nil {
return nil, err
}
lk, err := NewFileLock(dir)
if err != nil {
return nil, err
}
return &Store{lk, dir}, nil
}
func (s *Store) Reserve(id string, ifname string, ip net.IP, rangeID string) (bool, error) {
fname := GetEscapedPath(s.dataDir, ip.String())
f, err := os.OpenFile(fname, os.O_RDWR|os.O_EXCL|os.O_CREATE, 0644)
if os.IsExist(err) {
return false, nil
}
if err != nil {
return false, err
}
if _, err := f.WriteString(strings.TrimSpace(id) + LineBreak + ifname); err != nil {
f.Close()
os.Remove(f.Name())
return false, err
}
if err := f.Close(); err != nil {
os.Remove(f.Name())
return false, err
}
// store the reserved ip in lastIPFile
ipfile := GetEscapedPath(s.dataDir, lastIPFilePrefix+rangeID)
err = ioutil.WriteFile(ipfile, []byte(ip.String()), 0644)
if err != nil {
return false, err
}
return true, nil
}
// LastReservedIP returns the last reserved IP if exists
func (s *Store) LastReservedIP(rangeID string) (net.IP, error) {
ipfile := GetEscapedPath(s.dataDir, lastIPFilePrefix+rangeID)
data, err := ioutil.ReadFile(ipfile)
if err != nil {
return nil, err
}
return net.ParseIP(string(data)), nil
}
func (s *Store) Release(ip net.IP) error {
return os.Remove(GetEscapedPath(s.dataDir, ip.String()))
}
func (s *Store) FindByKey(id string, ifname string, match string) (bool, error) {
found := false
err := filepath.Walk(s.dataDir, func(path string, info os.FileInfo, err error) error {
if err != nil || info.IsDir() {
return nil
}
data, err := ioutil.ReadFile(path)
if err != nil {
return nil
}
if strings.TrimSpace(string(data)) == match {
found = true
}
return nil
})
return found, err
}
func (s *Store) FindByID(id string, ifname string) bool {
s.Lock()
defer s.Unlock()
found := false
match := strings.TrimSpace(id) + LineBreak + ifname
found, err := s.FindByKey(id, ifname, match)
// Match anything created by this id
if !found && err == nil {
match := strings.TrimSpace(id)
found, err = s.FindByKey(id, ifname, match)
}
return found
}
func (s *Store) ReleaseByKey(id string, ifname string, match string) (bool, error) {
found := false
err := filepath.Walk(s.dataDir, func(path string, info os.FileInfo, err error) error {
if err != nil || info.IsDir() {
return nil
}
data, err := ioutil.ReadFile(path)
if err != nil {
return nil
}
if strings.TrimSpace(string(data)) == match {
if err := os.Remove(path); err != nil {
return nil
}
found = true
}
return nil
})
return found, err
}
// N.B. This function eats errors to be tolerant and
// release as much as possible
func (s *Store) ReleaseByID(id string, ifname string) error {
found := false
match := strings.TrimSpace(id) + LineBreak + ifname
found, err := s.ReleaseByKey(id, ifname, match)
// For backwards compatibility, look for files written by a previous version
if !found && err == nil {
match := strings.TrimSpace(id)
found, err = s.ReleaseByKey(id, ifname, match)
}
return err
}
// GetByID returns the IPs which have been allocated to the specific ID
func (s *Store) GetByID(id string, ifname string) []net.IP {
var ips []net.IP
match := strings.TrimSpace(id) + LineBreak + ifname
// matchOld for backwards compatibility
matchOld := strings.TrimSpace(id)
// walk through all ips in this network to get the ones which belong to a specific ID
_ = filepath.Walk(s.dataDir, func(path string, info os.FileInfo, err error) error {
if err != nil || info.IsDir() {
return nil
}
data, err := ioutil.ReadFile(path)
if err != nil {
return nil
}
if strings.TrimSpace(string(data)) == match || strings.TrimSpace(string(data)) == matchOld {
_, ipString := filepath.Split(path)
if ip := net.ParseIP(ipString); ip != nil {
ips = append(ips, ip)
}
}
return nil
})
return ips
}
func GetEscapedPath(dataDir string, fname string) string {
if runtime.GOOS == "windows" {
fname = strings.Replace(fname, ":", "_", -1)
}
return filepath.Join(dataDir, fname)
}
================================================
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/lock.go
================================================
// Copyright 2015 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package disk
import (
"github.com/alexflint/go-filemutex"
"os"
"path"
)
// FileLock wraps os.File to be used as a lock using flock
type FileLock struct {
f *filemutex.FileMutex
}
// NewFileLock opens file/dir at path and returns unlocked FileLock object
func NewFileLock(lockPath string) (*FileLock, error) {
fi, err := os.Stat(lockPath)
if err != nil {
return nil, err
}
if fi.IsDir() {
lockPath = path.Join(lockPath, "lock")
}
f, err := filemutex.New(lockPath)
if err != nil {
return nil, err
}
return &FileLock{f}, nil
}
func (l *FileLock) Close() error {
return l.f.Close()
}
// Lock acquires an exclusive lock
func (l *FileLock) Lock() error {
return l.f.Lock()
}
// Unlock releases the lock
func (l *FileLock) Unlock() error {
return l.f.Unlock()
}
================================================
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/store.go
================================================
// Copyright 2015 CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package backend
import "net"
type Store interface {
Lock() error
Unlock() error
Close() error
Reserve(id string, ifname string, ip net.IP, rangeID string) (bool, error)
LastReservedIP(rangeID string) (net.IP, error)
Release(ip net.IP) error
ReleaseByID(id string, ifname string) error
GetByID(id string, ifname string) []net.IP
}
================================================
FILE: vendor/github.com/coreos/go-iptables/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 L
gitextract_sf87iksg/
├── .cirrus.yml
├── .github/
│ └── renovate.json5
├── .gitignore
├── CODE-OF-CONDUCT.md
├── LICENSE
├── Makefile
├── OWNERS
├── README.md
├── README_PODMAN.md
├── RELEASE_NOTES.md
├── SECURITY.md
├── ci/
│ └── Dockerfile
├── example/
│ └── foobar.conflist
├── go.mod
├── go.sum
├── hack/
│ ├── get_ci_vm.sh
│ └── tree_status.sh
├── plugins/
│ └── meta/
│ └── dnsname/
│ ├── config.go
│ ├── dnsname_suite_test.go
│ ├── dnsname_test.go
│ ├── files.go
│ ├── files_test.go
│ ├── main.go
│ ├── result.go
│ ├── service.go
│ └── version.go
└── vendor/
├── github.com/
│ ├── alexflint/
│ │ └── go-filemutex/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── filemutex_flock.go
│ │ └── filemutex_windows.go
│ ├── containernetworking/
│ │ ├── cni/
│ │ │ ├── LICENSE
│ │ │ └── pkg/
│ │ │ ├── skel/
│ │ │ │ └── skel.go
│ │ │ ├── types/
│ │ │ │ ├── 020/
│ │ │ │ │ └── types.go
│ │ │ │ ├── 040/
│ │ │ │ │ └── types.go
│ │ │ │ ├── 100/
│ │ │ │ │ └── types.go
│ │ │ │ ├── args.go
│ │ │ │ ├── create/
│ │ │ │ │ └── create.go
│ │ │ │ ├── internal/
│ │ │ │ │ ├── convert.go
│ │ │ │ │ └── create.go
│ │ │ │ └── types.go
│ │ │ ├── utils/
│ │ │ │ └── utils.go
│ │ │ └── version/
│ │ │ ├── conf.go
│ │ │ ├── plugin.go
│ │ │ ├── reconcile.go
│ │ │ └── version.go
│ │ └── plugins/
│ │ ├── LICENSE
│ │ ├── pkg/
│ │ │ ├── ns/
│ │ │ │ ├── README.md
│ │ │ │ └── ns_linux.go
│ │ │ └── testutils/
│ │ │ ├── bad_reader.go
│ │ │ ├── cmd.go
│ │ │ ├── dns.go
│ │ │ ├── netns_linux.go
│ │ │ └── ping.go
│ │ └── plugins/
│ │ └── ipam/
│ │ └── host-local/
│ │ └── backend/
│ │ ├── disk/
│ │ │ ├── backend.go
│ │ │ └── lock.go
│ │ └── store.go
│ ├── coreos/
│ │ └── go-iptables/
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── iptables/
│ │ ├── iptables.go
│ │ └── lock.go
│ ├── fsnotify/
│ │ └── fsnotify/
│ │ ├── .editorconfig
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fen.go
│ │ ├── fsnotify.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── inotify.go
│ │ ├── inotify_poller.go
│ │ ├── kqueue.go
│ │ ├── open_mode_bsd.go
│ │ ├── open_mode_darwin.go
│ │ └── windows.go
│ ├── nxadm/
│ │ └── tail/
│ │ ├── .gitignore
│ │ ├── CHANGES.md
│ │ ├── Dockerfile
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── ratelimiter/
│ │ │ ├── Licence
│ │ │ ├── leakybucket.go
│ │ │ ├── memory.go
│ │ │ └── storage.go
│ │ ├── tail.go
│ │ ├── tail_posix.go
│ │ ├── tail_windows.go
│ │ ├── util/
│ │ │ └── util.go
│ │ ├── watch/
│ │ │ ├── filechanges.go
│ │ │ ├── inotify.go
│ │ │ ├── inotify_tracker.go
│ │ │ ├── polling.go
│ │ │ └── watch.go
│ │ └── winfile/
│ │ └── winfile.go
│ ├── onsi/
│ │ ├── ginkgo/
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── RELEASING.md
│ │ │ ├── config/
│ │ │ │ └── config.go
│ │ │ ├── formatter/
│ │ │ │ └── formatter.go
│ │ │ ├── ginkgo_dsl.go
│ │ │ ├── go.mod
│ │ │ ├── go.sum
│ │ │ ├── internal/
│ │ │ │ ├── codelocation/
│ │ │ │ │ └── code_location.go
│ │ │ │ ├── containernode/
│ │ │ │ │ └── container_node.go
│ │ │ │ ├── failer/
│ │ │ │ │ └── failer.go
│ │ │ │ ├── global/
│ │ │ │ │ └── init.go
│ │ │ │ ├── leafnodes/
│ │ │ │ │ ├── benchmarker.go
│ │ │ │ │ ├── interfaces.go
│ │ │ │ │ ├── it_node.go
│ │ │ │ │ ├── measure_node.go
│ │ │ │ │ ├── runner.go
│ │ │ │ │ ├── setup_nodes.go
│ │ │ │ │ ├── suite_nodes.go
│ │ │ │ │ ├── synchronized_after_suite_node.go
│ │ │ │ │ └── synchronized_before_suite_node.go
│ │ │ │ ├── remote/
│ │ │ │ │ ├── aggregator.go
│ │ │ │ │ ├── forwarding_reporter.go
│ │ │ │ │ ├── output_interceptor.go
│ │ │ │ │ ├── output_interceptor_unix.go
│ │ │ │ │ ├── output_interceptor_win.go
│ │ │ │ │ └── server.go
│ │ │ │ ├── spec/
│ │ │ │ │ ├── spec.go
│ │ │ │ │ └── specs.go
│ │ │ │ ├── spec_iterator/
│ │ │ │ │ ├── index_computer.go
│ │ │ │ │ ├── parallel_spec_iterator.go
│ │ │ │ │ ├── serial_spec_iterator.go
│ │ │ │ │ ├── sharded_parallel_spec_iterator.go
│ │ │ │ │ └── spec_iterator.go
│ │ │ │ ├── specrunner/
│ │ │ │ │ ├── random_id.go
│ │ │ │ │ └── spec_runner.go
│ │ │ │ ├── suite/
│ │ │ │ │ └── suite.go
│ │ │ │ ├── testingtproxy/
│ │ │ │ │ └── testing_t_proxy.go
│ │ │ │ └── writer/
│ │ │ │ ├── fake_writer.go
│ │ │ │ └── writer.go
│ │ │ ├── reporters/
│ │ │ │ ├── default_reporter.go
│ │ │ │ ├── fake_reporter.go
│ │ │ │ ├── junit_reporter.go
│ │ │ │ ├── reporter.go
│ │ │ │ ├── stenographer/
│ │ │ │ │ ├── console_logging.go
│ │ │ │ │ ├── fake_stenographer.go
│ │ │ │ │ ├── stenographer.go
│ │ │ │ │ └── support/
│ │ │ │ │ ├── go-colorable/
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── colorable_others.go
│ │ │ │ │ │ ├── colorable_windows.go
│ │ │ │ │ │ └── noncolorable.go
│ │ │ │ │ └── go-isatty/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── isatty_appengine.go
│ │ │ │ │ ├── isatty_bsd.go
│ │ │ │ │ ├── isatty_linux.go
│ │ │ │ │ ├── isatty_solaris.go
│ │ │ │ │ └── isatty_windows.go
│ │ │ │ └── teamcity_reporter.go
│ │ │ └── types/
│ │ │ ├── code_location.go
│ │ │ ├── deprecation_support.go
│ │ │ ├── synchronization.go
│ │ │ └── types.go
│ │ └── gomega/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── Dockerfile
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── RELEASING.md
│ │ ├── docker-compose.yaml
│ │ ├── format/
│ │ │ └── format.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── gomega_dsl.go
│ │ ├── internal/
│ │ │ ├── assertion.go
│ │ │ ├── async_assertion.go
│ │ │ ├── duration_bundle.go
│ │ │ └── gomega.go
│ │ ├── matchers/
│ │ │ ├── and.go
│ │ │ ├── assignable_to_type_of_matcher.go
│ │ │ ├── attributes_slice.go
│ │ │ ├── be_a_directory.go
│ │ │ ├── be_a_regular_file.go
│ │ │ ├── be_an_existing_file.go
│ │ │ ├── be_closed_matcher.go
│ │ │ ├── be_element_of_matcher.go
│ │ │ ├── be_empty_matcher.go
│ │ │ ├── be_equivalent_to_matcher.go
│ │ │ ├── be_false_matcher.go
│ │ │ ├── be_identical_to.go
│ │ │ ├── be_nil_matcher.go
│ │ │ ├── be_numerically_matcher.go
│ │ │ ├── be_sent_matcher.go
│ │ │ ├── be_temporally_matcher.go
│ │ │ ├── be_true_matcher.go
│ │ │ ├── be_zero_matcher.go
│ │ │ ├── consist_of.go
│ │ │ ├── contain_element_matcher.go
│ │ │ ├── contain_elements_matcher.go
│ │ │ ├── contain_substring_matcher.go
│ │ │ ├── equal_matcher.go
│ │ │ ├── have_cap_matcher.go
│ │ │ ├── have_field.go
│ │ │ ├── have_http_body_matcher.go
│ │ │ ├── have_http_header_with_value_matcher.go
│ │ │ ├── have_http_status_matcher.go
│ │ │ ├── have_key_matcher.go
│ │ │ ├── have_key_with_value_matcher.go
│ │ │ ├── have_len_matcher.go
│ │ │ ├── have_occurred_matcher.go
│ │ │ ├── have_prefix_matcher.go
│ │ │ ├── have_suffix_matcher.go
│ │ │ ├── match_error_matcher.go
│ │ │ ├── match_json_matcher.go
│ │ │ ├── match_regexp_matcher.go
│ │ │ ├── match_xml_matcher.go
│ │ │ ├── match_yaml_matcher.go
│ │ │ ├── not.go
│ │ │ ├── or.go
│ │ │ ├── panic_matcher.go
│ │ │ ├── receive_matcher.go
│ │ │ ├── satisfy_matcher.go
│ │ │ ├── semi_structured_data_support.go
│ │ │ ├── succeed_matcher.go
│ │ │ ├── support/
│ │ │ │ └── goraph/
│ │ │ │ ├── bipartitegraph/
│ │ │ │ │ ├── bipartitegraph.go
│ │ │ │ │ └── bipartitegraphmatching.go
│ │ │ │ ├── edge/
│ │ │ │ │ └── edge.go
│ │ │ │ ├── node/
│ │ │ │ │ └── node.go
│ │ │ │ └── util/
│ │ │ │ └── util.go
│ │ │ ├── type_support.go
│ │ │ └── with_transform.go
│ │ ├── matchers.go
│ │ └── types/
│ │ └── types.go
│ ├── pkg/
│ │ └── errors/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── errors.go
│ │ ├── go113.go
│ │ └── stack.go
│ └── vishvananda/
│ ├── netlink/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── addr.go
│ │ ├── addr_linux.go
│ │ ├── bpf_linux.go
│ │ ├── bridge_linux.go
│ │ ├── class.go
│ │ ├── class_linux.go
│ │ ├── conntrack_linux.go
│ │ ├── conntrack_unspecified.go
│ │ ├── devlink_linux.go
│ │ ├── filter.go
│ │ ├── filter_linux.go
│ │ ├── fou.go
│ │ ├── fou_linux.go
│ │ ├── fou_unspecified.go
│ │ ├── genetlink_linux.go
│ │ ├── genetlink_unspecified.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── gtp_linux.go
│ │ ├── handle_linux.go
│ │ ├── handle_unspecified.go
│ │ ├── inet_diag.go
│ │ ├── ioctl_linux.go
│ │ ├── ipset_linux.go
│ │ ├── link.go
│ │ ├── link_linux.go
│ │ ├── link_tuntap_linux.go
│ │ ├── neigh.go
│ │ ├── neigh_linux.go
│ │ ├── netlink.go
│ │ ├── netlink_linux.go
│ │ ├── netlink_unspecified.go
│ │ ├── netns_linux.go
│ │ ├── netns_unspecified.go
│ │ ├── nl/
│ │ │ ├── addr_linux.go
│ │ │ ├── bridge_linux.go
│ │ │ ├── conntrack_linux.go
│ │ │ ├── devlink_linux.go
│ │ │ ├── genetlink_linux.go
│ │ │ ├── ipset_linux.go
│ │ │ ├── link_linux.go
│ │ │ ├── lwt_linux.go
│ │ │ ├── mpls_linux.go
│ │ │ ├── nl_linux.go
│ │ │ ├── nl_unspecified.go
│ │ │ ├── parse_attr_linux.go
│ │ │ ├── rdma_link_linux.go
│ │ │ ├── route_linux.go
│ │ │ ├── seg6_linux.go
│ │ │ ├── seg6local_linux.go
│ │ │ ├── syscall.go
│ │ │ ├── tc_linux.go
│ │ │ ├── xfrm_linux.go
│ │ │ ├── xfrm_monitor_linux.go
│ │ │ ├── xfrm_policy_linux.go
│ │ │ └── xfrm_state_linux.go
│ │ ├── order.go
│ │ ├── protinfo.go
│ │ ├── protinfo_linux.go
│ │ ├── qdisc.go
│ │ ├── qdisc_linux.go
│ │ ├── rdma_link_linux.go
│ │ ├── route.go
│ │ ├── route_linux.go
│ │ ├── route_unspecified.go
│ │ ├── rule.go
│ │ ├── rule_linux.go
│ │ ├── socket.go
│ │ ├── socket_linux.go
│ │ ├── tcp.go
│ │ ├── tcp_linux.go
│ │ ├── xfrm.go
│ │ ├── xfrm_monitor_linux.go
│ │ ├── xfrm_policy.go
│ │ ├── xfrm_policy_linux.go
│ │ ├── xfrm_state.go
│ │ └── xfrm_state_linux.go
│ └── netns/
│ ├── LICENSE
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ ├── netns.go
│ ├── netns_linux.go
│ └── netns_unspecified.go
├── golang.org/
│ └── x/
│ ├── net/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── html/
│ │ ├── atom/
│ │ │ ├── atom.go
│ │ │ └── table.go
│ │ ├── charset/
│ │ │ └── charset.go
│ │ ├── const.go
│ │ ├── doc.go
│ │ ├── doctype.go
│ │ ├── entity.go
│ │ ├── escape.go
│ │ ├── foreign.go
│ │ ├── node.go
│ │ ├── parse.go
│ │ ├── render.go
│ │ └── token.go
│ ├── sys/
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── internal/
│ │ │ └── unsafeheader/
│ │ │ └── unsafeheader.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_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
│ │ │ ├── bluetooth_linux.go
│ │ │ ├── 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
│ │ │ ├── epoll_zos.go
│ │ │ ├── fcntl.go
│ │ │ ├── fcntl_darwin.go
│ │ │ ├── fcntl_linux_32bit.go
│ │ │ ├── fdset.go
│ │ │ ├── fstatfs_zos.go
│ │ │ ├── gccgo.go
│ │ │ ├── gccgo_c.c
│ │ │ ├── gccgo_linux_amd64.go
│ │ │ ├── ifreq_linux.go
│ │ │ ├── ioctl.go
│ │ │ ├── ioctl_linux.go
│ │ │ ├── ioctl_zos.go
│ │ │ ├── mkall.sh
│ │ │ ├── mkerrors.sh
│ │ │ ├── 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
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_aix.go
│ │ │ ├── syscall_aix_ppc.go
│ │ │ ├── syscall_aix_ppc64.go
│ │ │ ├── syscall_bsd.go
│ │ │ ├── syscall_darwin.1_12.go
│ │ │ ├── syscall_darwin.1_13.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_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_mips64.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
│ │ │ ├── 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_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
│ │ │ ├── zsyscall_aix_ppc.go
│ │ │ ├── zsyscall_aix_ppc64.go
│ │ │ ├── zsyscall_aix_ppc64_gc.go
│ │ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ │ ├── zsyscall_darwin_amd64.1_13.go
│ │ │ ├── zsyscall_darwin_amd64.1_13.s
│ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ ├── zsyscall_darwin_amd64.s
│ │ │ ├── zsyscall_darwin_arm64.1_13.go
│ │ │ ├── zsyscall_darwin_arm64.1_13.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_amd64.go
│ │ │ ├── zsyscall_openbsd_arm.go
│ │ │ ├── zsyscall_openbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_mips64.go
│ │ │ ├── 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
│ │ │ ├── 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_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_illumos_amd64.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_solaris_amd64.go
│ │ │ └── ztypes_zos_s390x.go
│ │ └── windows/
│ │ ├── aliases.go
│ │ ├── dll_windows.go
│ │ ├── empty.s
│ │ ├── 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
│ └── text/
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── encoding/
│ │ ├── charmap/
│ │ │ ├── charmap.go
│ │ │ └── tables.go
│ │ ├── encoding.go
│ │ ├── htmlindex/
│ │ │ ├── htmlindex.go
│ │ │ ├── map.go
│ │ │ └── tables.go
│ │ ├── internal/
│ │ │ ├── identifier/
│ │ │ │ ├── identifier.go
│ │ │ │ └── mib.go
│ │ │ └── internal.go
│ │ ├── japanese/
│ │ │ ├── all.go
│ │ │ ├── eucjp.go
│ │ │ ├── iso2022jp.go
│ │ │ ├── shiftjis.go
│ │ │ └── tables.go
│ │ ├── korean/
│ │ │ ├── euckr.go
│ │ │ └── tables.go
│ │ ├── simplifiedchinese/
│ │ │ ├── all.go
│ │ │ ├── gbk.go
│ │ │ ├── hzgb2312.go
│ │ │ └── tables.go
│ │ ├── traditionalchinese/
│ │ │ ├── big5.go
│ │ │ └── tables.go
│ │ └── unicode/
│ │ ├── override.go
│ │ └── unicode.go
│ ├── internal/
│ │ ├── language/
│ │ │ ├── common.go
│ │ │ ├── compact/
│ │ │ │ ├── compact.go
│ │ │ │ ├── language.go
│ │ │ │ ├── parents.go
│ │ │ │ ├── tables.go
│ │ │ │ └── tags.go
│ │ │ ├── compact.go
│ │ │ ├── compose.go
│ │ │ ├── coverage.go
│ │ │ ├── language.go
│ │ │ ├── lookup.go
│ │ │ ├── match.go
│ │ │ ├── parse.go
│ │ │ ├── tables.go
│ │ │ └── tags.go
│ │ ├── tag/
│ │ │ └── tag.go
│ │ └── utf8internal/
│ │ └── utf8internal.go
│ ├── language/
│ │ ├── coverage.go
│ │ ├── doc.go
│ │ ├── go1_1.go
│ │ ├── go1_2.go
│ │ ├── language.go
│ │ ├── match.go
│ │ ├── parse.go
│ │ ├── tables.go
│ │ └── tags.go
│ ├── runes/
│ │ ├── cond.go
│ │ └── runes.go
│ └── transform/
│ └── transform.go
├── gopkg.in/
│ ├── tomb.v1/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── tomb.go
│ └── yaml.v2/
│ ├── .travis.yml
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── NOTICE
│ ├── README.md
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── go.mod
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── modules.txt
Showing preview only (7,965K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (94670 symbols across 612 files)
FILE: plugins/meta/dnsname/config.go
constant confFileName (line 13) | confFileName = "dnsmasq.conf"
constant hostsFileName (line 15) | hostsFileName = "addnhosts"
constant pidFileName (line 17) | pidFileName = "pidfile"
constant dnsMasqTemplate (line 20) | dnsMasqTemplate = `## WARNING: THIS IS AN AUTOGENERATED FILE
type DNSNameConf (line 42) | type DNSNameConf struct
type dnsNameFile (line 51) | type dnsNameFile struct
function dnsNameConfPath (line 61) | func dnsNameConfPath() string {
FILE: plugins/meta/dnsname/dnsname_suite_test.go
function TestTuning (line 25) | func TestTuning(t *testing.T) {
FILE: plugins/meta/dnsname/dnsname_test.go
function cleanup (line 20) | func cleanup(d dnsNameFile) error {
FILE: plugins/meta/dnsname/files.go
type dnsNameLock (line 19) | type dnsNameLock struct
method release (line 24) | func (m *dnsNameLock) release() error {
method acquire (line 32) | func (m *dnsNameLock) acquire() error {
function getLock (line 38) | func getLock(path string) (*dnsNameLock, error) {
function checkForDNSMasqConfFile (line 48) | func checkForDNSMasqConfFile(conf dnsNameFile) error {
function generateDNSMasqConfig (line 76) | func generateDNSMasqConfig(config dnsNameFile) ([]byte, error) {
function appendToFile (line 90) | func appendToFile(path, podname string, aliases []string, ips []*net.IPN...
function removeFromFile (line 115) | func removeFromFile(path, podname string) (bool, error) {
function renameFile (line 168) | func renameFile(oldpath, newpath string) {
function writeFile (line 176) | func writeFile(path string, content []string) (int, error) {
function openFile (line 198) | func openFile(path string) (*os.File, error) {
FILE: plugins/meta/dnsname/files_test.go
function Test_generateDNSMasqConfig (line 8) | func Test_generateDNSMasqConfig(t *testing.T) {
FILE: plugins/meta/dnsname/main.go
function cmdAdd (line 44) | func cmdAdd(args *skel.CmdArgs) error {
function cmdDel (line 109) | func cmdDel(args *skel.CmdArgs) error {
function main (line 170) | func main() {
function cmdCheck (line 174) | func cmdCheck(args *skel.CmdArgs) error {
function stringInSlice (line 237) | func stringInSlice(s string, slice []string) bool {
type podname (line 246) | type podname struct
function parseConfig (line 252) | func parseConfig(stdin []byte, args string) (*DNSNameConf, *current.Resu...
function findDNSMasq (line 277) | func findDNSMasq() error {
FILE: plugins/meta/dnsname/result.go
function getIPs (line 12) | func getIPs(r *current.Result) ([]*net.IPNet, error) {
function isInterfaceIndexSandox (line 39) | func isInterfaceIndexSandox(idx int, r *current.Result) bool {
function getInterfaceAddresses (line 48) | func getInterfaceAddresses(nameConf dnsNameFile) ([]string, error) {
FILE: plugins/meta/dnsname/service.go
function newDNSMasqFile (line 18) | func newDNSMasqFile(domainName, networkInterface, networkName string) (d...
method hup (line 36) | func (d dnsNameFile) hup() error {
function isRunning (line 54) | func isRunning(pid *os.Process) bool {
method start (line 62) | func (d dnsNameFile) start() error {
method stop (line 76) | func (d dnsNameFile) stop() error {
method getProcess (line 86) | func (d dnsNameFile) getProcess() (*os.Process, error) {
function makePath (line 99) | func makePath(networkName, fileName string) string {
FILE: plugins/meta/dnsname/version.go
constant dnsnameVersion (line 8) | dnsnameVersion = "1.4.0-dev"
function getVersion (line 10) | func getVersion() string {
FILE: vendor/github.com/alexflint/go-filemutex/filemutex_flock.go
constant mkdirPerm (line 14) | mkdirPerm = 0750
type FileMutex (line 19) | type FileMutex struct
method Lock (line 31) | func (m *FileMutex) Lock() error {
method Unlock (line 38) | func (m *FileMutex) Unlock() error {
method RLock (line 45) | func (m *FileMutex) RLock() error {
method RUnlock (line 52) | func (m *FileMutex) RUnlock() error {
method Close (line 62) | func (m *FileMutex) Close() error {
function New (line 23) | func New(filename string) (*FileMutex, error) {
FILE: vendor/github.com/alexflint/go-filemutex/filemutex_windows.go
constant lockfileExclusiveLock (line 19) | lockfileExclusiveLock = 2
function lockFileEx (line 22) | func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uin...
function unlockFileEx (line 34) | func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ...
type FileMutex (line 48) | type FileMutex struct
method Lock (line 61) | func (m *FileMutex) Lock() error {
method Unlock (line 69) | func (m *FileMutex) Unlock() error {
method RLock (line 77) | func (m *FileMutex) RLock() error {
method RUnlock (line 85) | func (m *FileMutex) RUnlock() error {
method Close (line 96) | func (m *FileMutex) Close() error {
function New (line 52) | func New(filename string) (*FileMutex, error) {
FILE: vendor/github.com/containernetworking/cni/pkg/skel/skel.go
type CmdArgs (line 36) | type CmdArgs struct
type dispatcher (line 45) | type dispatcher struct
method getCmdArgsFromEnv (line 57) | func (t *dispatcher) getCmdArgsFromEnv() (string, *CmdArgs, *types.Err...
method checkVersionAndCall (line 156) | func (t *dispatcher) checkVersionAndCall(cmdArgs *CmdArgs, pluginVersi...
method pluginMain (line 193) | func (t *dispatcher) pluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdAr...
type reqForCmdEntry (line 55) | type reqForCmdEntry
function validateConfig (line 177) | func validateConfig(jsonBytes []byte) *types.Error {
function PluginMainWithError (line 267) | func PluginMainWithError(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error...
function PluginMain (line 287) | func PluginMain(cmdAdd, cmdCheck, cmdDel func(_ *CmdArgs) error, version...
FILE: vendor/github.com/containernetworking/cni/pkg/types/020/types.go
constant ImplementedSpecVersion (line 28) | ImplementedSpecVersion string = "0.2.0"
function init (line 33) | func init() {
function NewResult (line 45) | func NewResult(data []byte) (types.Result, error) {
function GetResult (line 64) | func GetResult(r types.Result) (*Result, error) {
function convertFrom010 (line 76) | func convertFrom010(from types.Result, toVersion string) (types.Result, ...
function convertTo010 (line 89) | func convertTo010(from types.Result, toVersion string) (types.Result, er...
type Result (line 103) | type Result struct
method Version (line 110) | func (r *Result) Version() string {
method GetAsVersion (line 114) | func (r *Result) GetAsVersion(version string) (types.Result, error) {
method Print (line 123) | func (r *Result) Print() error {
method PrintTo (line 127) | func (r *Result) PrintTo(writer io.Writer) error {
type IPConfig (line 137) | type IPConfig struct
method Copy (line 143) | func (i *IPConfig) Copy() *IPConfig {
method MarshalJSON (line 169) | func (c *IPConfig) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 179) | func (c *IPConfig) UnmarshalJSON(data []byte) error {
type ipConfig (line 163) | type ipConfig struct
FILE: vendor/github.com/containernetworking/cni/pkg/types/040/types.go
constant ImplementedSpecVersion (line 29) | ImplementedSpecVersion string = "0.4.0"
function init (line 34) | func init() {
function NewResult (line 51) | func NewResult(data []byte) (types.Result, error) {
function GetResult (line 65) | func GetResult(r types.Result) (*Result, error) {
function NewResultFromResult (line 77) | func NewResultFromResult(result types.Result) (*Result, error) {
type Result (line 86) | type Result struct
method Version (line 194) | func (r *Result) Version() string {
method GetAsVersion (line 198) | func (r *Result) GetAsVersion(version string) (types.Result, error) {
method Print (line 207) | func (r *Result) Print() error {
method PrintTo (line 211) | func (r *Result) PrintTo(writer io.Writer) error {
function convert020IPConfig (line 94) | func convert020IPConfig(from *types020.IPConfig, ipVersion string) *IPCo...
function convertFrom02x (line 102) | func convertFrom02x(from types.Result, toVersion string) (types.Result, ...
function convertInternal (line 126) | func convertInternal(from types.Result, toVersion string) (types.Result,...
function convertTo02x (line 145) | func convertTo02x(from types.Result, toVersion string) (types.Result, er...
type Interface (line 221) | type Interface struct
method String (line 227) | func (i *Interface) String() string {
method Copy (line 231) | func (i *Interface) Copy() *Interface {
function Int (line 241) | func Int(v int) *int {
type IPConfig (line 246) | type IPConfig struct
method String (line 255) | func (i *IPConfig) String() string {
method Copy (line 259) | func (i *IPConfig) Copy() *IPConfig {
method MarshalJSON (line 284) | func (c *IPConfig) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 295) | func (c *IPConfig) UnmarshalJSON(data []byte) error {
type ipConfig (line 277) | type ipConfig struct
FILE: vendor/github.com/containernetworking/cni/pkg/types/100/types.go
constant ImplementedSpecVersion (line 29) | ImplementedSpecVersion string = "1.0.0"
function init (line 34) | func init() {
function NewResult (line 50) | func NewResult(data []byte) (types.Result, error) {
function GetResult (line 64) | func GetResult(r types.Result) (*Result, error) {
function NewResultFromResult (line 76) | func NewResultFromResult(result types.Result) (*Result, error) {
type Result (line 85) | type Result struct
method Version (line 201) | func (r *Result) Version() string {
method GetAsVersion (line 205) | func (r *Result) GetAsVersion(version string) (types.Result, error) {
method Print (line 214) | func (r *Result) Print() error {
method PrintTo (line 218) | func (r *Result) PrintTo(writer io.Writer) error {
function convertFrom02x (line 93) | func convertFrom02x(from types.Result, toVersion string) (types.Result, ...
function convertIPConfigFrom040 (line 105) | func convertIPConfigFrom040(from *types040.IPConfig) *IPConfig {
function convertInterfaceFrom040 (line 117) | func convertInterfaceFrom040(from *types040.Interface) *Interface {
function convertFrom04x (line 125) | func convertFrom04x(from types.Result, toVersion string) (types.Result, ...
function convertIPConfigTo040 (line 144) | func convertIPConfigTo040(from *IPConfig) *types040.IPConfig {
function convertInterfaceTo040 (line 161) | func convertInterfaceTo040(from *Interface) *types040.Interface {
function convertTo04x (line 169) | func convertTo04x(from types.Result, toVersion string) (types.Result, er...
function convertTo02x (line 188) | func convertTo02x(from types.Result, toVersion string) (types.Result, er...
type Interface (line 228) | type Interface struct
method String (line 234) | func (i *Interface) String() string {
method Copy (line 238) | func (i *Interface) Copy() *Interface {
function Int (line 248) | func Int(v int) *int {
type IPConfig (line 253) | type IPConfig struct
method String (line 260) | func (i *IPConfig) String() string {
method Copy (line 264) | func (i *IPConfig) Copy() *IPConfig {
method MarshalJSON (line 287) | func (c *IPConfig) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 297) | func (c *IPConfig) UnmarshalJSON(data []byte) error {
type ipConfig (line 281) | type ipConfig struct
FILE: vendor/github.com/containernetworking/cni/pkg/types/args.go
type UnmarshallableBool (line 26) | type UnmarshallableBool
method UnmarshalText (line 31) | func (b *UnmarshallableBool) UnmarshalText(data []byte) error {
type UnmarshallableString (line 45) | type UnmarshallableString
method UnmarshalText (line 49) | func (s *UnmarshallableString) UnmarshalText(data []byte) error {
type CommonArgs (line 56) | type CommonArgs struct
function GetKeyField (line 62) | func GetKeyField(keyString string, v reflect.Value) reflect.Value {
type UnmarshalableArgsError (line 68) | type UnmarshalableArgsError struct
function LoadArgs (line 73) | func LoadArgs(args string, container interface{}) error {
FILE: vendor/github.com/containernetworking/cni/pkg/types/create/create.go
function DecodeVersion (line 27) | func DecodeVersion(jsonBytes []byte) (string, error) {
function Create (line 43) | func Create(version string, bytes []byte) (types.Result, error) {
function CreateFromBytes (line 50) | func CreateFromBytes(bytes []byte) (types.Result, error) {
FILE: vendor/github.com/containernetworking/cni/pkg/types/internal/convert.go
type ConvertFn (line 28) | type ConvertFn
type converter (line 30) | type converter struct
function findConverter (line 40) | func findConverter(fromVersion, toVersion string) *converter {
function Convert (line 55) | func Convert(from types.Result, toVersion string) (types.Result, error) {
function RegisterConverter (line 78) | func RegisterConverter(fromVersion string, toVersions []string, convertF...
FILE: vendor/github.com/containernetworking/cni/pkg/types/internal/create.go
type ResultFactoryFunc (line 23) | type ResultFactoryFunc
type creator (line 25) | type creator struct
function findCreator (line 33) | func findCreator(version string) *creator {
function Create (line 46) | func Create(version string, bytes []byte) (types.Result, error) {
function RegisterCreator (line 55) | func RegisterCreator(versions []string, createFn ResultFactoryFunc) {
FILE: vendor/github.com/containernetworking/cni/pkg/types/types.go
type IPNet (line 26) | type IPNet
method MarshalJSON (line 40) | func (n IPNet) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 44) | func (n *IPNet) UnmarshalJSON(data []byte) error {
function ParseCIDR (line 30) | func ParseCIDR(s string) (*net.IPNet, error) {
type NetConf (line 60) | type NetConf struct
type IPAM (line 73) | type IPAM struct
type NetConfList (line 78) | type NetConfList struct
type Result (line 87) | type Result interface
function PrintResult (line 103) | func PrintResult(result Result, version string) error {
type DNS (line 112) | type DNS struct
method Copy (line 119) | func (d *DNS) Copy() *DNS {
type Route (line 137) | type Route struct
method String (line 142) | func (r *Route) String() string {
method Copy (line 146) | func (r *Route) Copy() *Route {
method UnmarshalJSON (line 207) | func (r *Route) UnmarshalJSON(data []byte) error {
method MarshalJSON (line 218) | func (r Route) MarshalJSON() ([]byte, error) {
constant ErrUnknown (line 160) | ErrUnknown uint = iota
constant ErrIncompatibleCNIVersion (line 161) | ErrIncompatibleCNIVersion
constant ErrUnsupportedField (line 162) | ErrUnsupportedField
constant ErrUnknownContainer (line 163) | ErrUnknownContainer
constant ErrInvalidEnvironmentVariables (line 164) | ErrInvalidEnvironmentVariables
constant ErrIOFailure (line 165) | ErrIOFailure
constant ErrDecodingFailure (line 166) | ErrDecodingFailure
constant ErrInvalidNetworkConfig (line 167) | ErrInvalidNetworkConfig
constant ErrTryAgainLater (line 168) | ErrTryAgainLater uint = 11
constant ErrInternal (line 169) | ErrInternal uint = 999
type Error (line 172) | type Error struct
method Error (line 186) | func (e *Error) Error() string {
method Print (line 194) | func (e *Error) Print() error {
function NewError (line 178) | func NewError(code uint, msg, details string) *Error {
type route (line 202) | type route struct
function prettyPrint (line 227) | func prettyPrint(obj interface{}) error {
FILE: vendor/github.com/containernetworking/cni/pkg/utils/utils.go
constant cniValidNameChars (line 29) | cniValidNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.\-]`
constant maxInterfaceNameLength (line 32) | maxInterfaceNameLength = 15
function ValidateContainerID (line 38) | func ValidateContainerID(containerID string) *types.Error {
function ValidateNetworkName (line 50) | func ValidateNetworkName(networkName string) *types.Error {
function ValidateInterfaceName (line 67) | func ValidateInterfaceName(ifName string) *types.Error {
FILE: vendor/github.com/containernetworking/cni/pkg/version/conf.go
type ConfigDecoder (line 22) | type ConfigDecoder struct
method Decode (line 24) | func (*ConfigDecoder) Decode(jsonBytes []byte) (string, error) {
FILE: vendor/github.com/containernetworking/cni/pkg/version/plugin.go
type PluginInfo (line 26) | type PluginInfo interface
type pluginInfo (line 36) | type pluginInfo struct
method Encode (line 44) | func (p *pluginInfo) Encode(w io.Writer) error {
method SupportedVersions (line 48) | func (p *pluginInfo) SupportedVersions() []string {
function PluginSupports (line 54) | func PluginSupports(supportedVersions ...string) PluginInfo {
type PluginDecoder (line 65) | type PluginDecoder struct
method Decode (line 67) | func (*PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) {
function ParseVersion (line 87) | func ParseVersion(version string) (int, int, int, error) {
function GreaterThanOrEqualTo (line 123) | func GreaterThanOrEqualTo(version, otherVersion string) (bool, error) {
FILE: vendor/github.com/containernetworking/cni/pkg/version/reconcile.go
type ErrorIncompatible (line 19) | type ErrorIncompatible struct
method Details (line 24) | func (e *ErrorIncompatible) Details() string {
method Error (line 28) | func (e *ErrorIncompatible) Error() string {
type Reconciler (line 32) | type Reconciler struct
method Check (line 34) | func (r *Reconciler) Check(configVersion string, pluginInfo PluginInfo...
method CheckRaw (line 38) | func (*Reconciler) CheckRaw(configVersion string, supportedVersions []...
FILE: vendor/github.com/containernetworking/cni/pkg/version/version.go
function Current (line 27) | func Current() string {
function VersionsStartingFrom (line 42) | func VersionsStartingFrom(min string) PluginInfo {
function NewResult (line 59) | func NewResult(version string, resultBytes []byte) (types.Result, error) {
function ParsePrevResult (line 65) | func ParsePrevResult(conf *types.NetConf) error {
FILE: vendor/github.com/containernetworking/plugins/pkg/ns/ns_linux.go
function GetCurrentNS (line 28) | func GetCurrentNS() (NetNS, error) {
function getCurrentThreadNetNSPath (line 37) | func getCurrentThreadNetNSPath() string {
type NetNS (line 69) | type NetNS interface
type netNS (line 99) | type netNS struct
method Close (line 44) | func (ns *netNS) Close() error {
method Set (line 57) | func (ns *netNS) Set() error {
method Path (line 155) | func (ns *netNS) Path() string {
method Fd (line 159) | func (ns *netNS) Fd() uintptr {
method errorIfClosed (line 163) | func (ns *netNS) errorIfClosed() error {
method Do (line 170) | func (ns *netNS) Do(toRun func(NetNS) error) error {
constant NSFS_MAGIC (line 109) | NSFS_MAGIC = 0x6e736673
constant PROCFS_MAGIC (line 110) | PROCFS_MAGIC = 0x9fa0
type NSPathNotExistErr (line 113) | type NSPathNotExistErr struct
method Error (line 115) | func (e NSPathNotExistErr) Error() string { return e.msg }
type NSPathNotNSErr (line 117) | type NSPathNotNSErr struct
method Error (line 119) | func (e NSPathNotNSErr) Error() string { return e.msg }
function IsNSorErr (line 121) | func IsNSorErr(nspath string) error {
function GetNS (line 141) | func GetNS(nspath string) (NetNS, error) {
function WithNetNSPath (line 227) | func WithNetNSPath(nspath string, toRun func(NetNS) error) error {
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/bad_reader.go
type BadReader (line 20) | type BadReader struct
method Read (line 24) | func (r *BadReader) Read(buffer []byte) (int, error) {
method Close (line 31) | func (r *BadReader) Close() error {
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/cmd.go
function envCleanup (line 26) | func envCleanup() {
function CmdAdd (line 34) | func CmdAdd(cniNetns, cniContainerID, cniIfname string, conf []byte, f f...
function CmdAddWithArgs (line 80) | func CmdAddWithArgs(args *skel.CmdArgs, f func() error) (types.Result, [...
function CmdCheck (line 84) | func CmdCheck(cniNetns, cniContainerID, cniIfname string, conf []byte, f...
function CmdCheckWithArgs (line 95) | func CmdCheckWithArgs(args *skel.CmdArgs, f func() error) error {
function CmdDel (line 99) | func CmdDel(cniNetns, cniContainerID, cniIfname string, f func() error) ...
function CmdDelWithArgs (line 110) | func CmdDelWithArgs(args *skel.CmdArgs, f func() error) error {
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/dns.go
function TmpResolvConf (line 30) | func TmpResolvConf(dnsConf types.DNS) (string, error) {
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/netns_linux.go
function getNsRunDir (line 31) | func getNsRunDir() string {
function NewNS (line 51) | func NewNS() (ns.NetNS, error) {
function UnmountNS (line 154) | func UnmountNS(ns ns.NetNS) error {
function getCurrentThreadNetNSPath (line 171) | func getCurrentThreadNetNSPath() string {
FILE: vendor/github.com/containernetworking/plugins/pkg/testutils/ping.go
function Ping (line 26) | func Ping(saddr, daddr string, isV6 bool, timeoutSec int) error {
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/backend.go
constant lastIPFilePrefix (line 28) | lastIPFilePrefix = "last_reserved_ip."
constant LineBreak (line 29) | LineBreak = "\r\n"
type Store (line 35) | type Store struct
method Reserve (line 59) | func (s *Store) Reserve(id string, ifname string, ip net.IP, rangeID s...
method LastReservedIP (line 88) | func (s *Store) LastReservedIP(rangeID string) (net.IP, error) {
method Release (line 97) | func (s *Store) Release(ip net.IP) error {
method FindByKey (line 101) | func (s *Store) FindByKey(id string, ifname string, match string) (boo...
method FindByID (line 121) | func (s *Store) FindByID(id string, ifname string) bool {
method ReleaseByKey (line 138) | func (s *Store) ReleaseByKey(id string, ifname string, match string) (...
method ReleaseByID (line 162) | func (s *Store) ReleaseByID(id string, ifname string) error {
method GetByID (line 176) | func (s *Store) GetByID(id string, ifname string) []net.IP {
function New (line 43) | func New(network, dataDir string) (*Store, error) {
function GetEscapedPath (line 204) | func GetEscapedPath(dataDir string, fname string) string {
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/lock.go
type FileLock (line 24) | type FileLock struct
method Close (line 47) | func (l *FileLock) Close() error {
method Lock (line 52) | func (l *FileLock) Lock() error {
method Unlock (line 57) | func (l *FileLock) Unlock() error {
function NewFileLock (line 29) | func NewFileLock(lockPath string) (*FileLock, error) {
FILE: vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/store.go
type Store (line 19) | type Store interface
FILE: vendor/github.com/coreos/go-iptables/iptables/iptables.go
type Error (line 30) | type Error struct
method ExitStatus (line 37) | func (e *Error) ExitStatus() int {
method Error (line 44) | func (e *Error) Error() string {
method IsNotExist (line 49) | func (e *Error) IsNotExist() bool {
type Protocol (line 59) | type Protocol
constant ProtocolIPv4 (line 62) | ProtocolIPv4 Protocol = iota
constant ProtocolIPv6 (line 63) | ProtocolIPv6
type IPTables (line 66) | type IPTables struct
method Proto (line 159) | func (ipt *IPTables) Proto() Protocol {
method Exists (line 164) | func (ipt *IPTables) Exists(table, chain string, rulespec ...string) (...
method Insert (line 183) | func (ipt *IPTables) Insert(table, chain string, pos int, rulespec ......
method Append (line 189) | func (ipt *IPTables) Append(table, chain string, rulespec ...string) e...
method AppendUnique (line 195) | func (ipt *IPTables) AppendUnique(table, chain string, rulespec ...str...
method Delete (line 209) | func (ipt *IPTables) Delete(table, chain string, rulespec ...string) e...
method DeleteIfExists (line 214) | func (ipt *IPTables) DeleteIfExists(table, chain string, rulespec ...s...
method List (line 223) | func (ipt *IPTables) List(table, chain string) ([]string, error) {
method ListWithCounters (line 229) | func (ipt *IPTables) ListWithCounters(table, chain string) ([]string, ...
method ListChains (line 235) | func (ipt *IPTables) ListChains(table string) ([]string, error) {
method ChainExists (line 261) | func (ipt *IPTables) ChainExists(table, chain string) (bool, error) {
method Stats (line 275) | func (ipt *IPTables) Stats(table, chain string) ([][]string, error) {
method ParseStat (line 342) | func (ipt *IPTables) ParseStat(stat []string) (parsed Stat, err error) {
method StructuredStats (line 379) | func (ipt *IPTables) StructuredStats(table, chain string) ([]Stat, err...
method executeList (line 397) | func (ipt *IPTables) executeList(args []string) ([]string, error) {
method NewChain (line 419) | func (ipt *IPTables) NewChain(table, chain string) error {
method ClearChain (line 427) | func (ipt *IPTables) ClearChain(table, chain string) error {
method RenameChain (line 443) | func (ipt *IPTables) RenameChain(table, oldChain, newChain string) err...
method DeleteChain (line 449) | func (ipt *IPTables) DeleteChain(table, chain string) error {
method ClearAndDeleteChain (line 453) | func (ipt *IPTables) ClearAndDeleteChain(table, chain string) error {
method ClearAll (line 465) | func (ipt *IPTables) ClearAll() error {
method DeleteAll (line 469) | func (ipt *IPTables) DeleteAll() error {
method ChangePolicy (line 474) | func (ipt *IPTables) ChangePolicy(table, chain, target string) error {
method HasRandomFully (line 479) | func (ipt *IPTables) HasRandomFully() bool {
method GetIptablesVersion (line 484) | func (ipt *IPTables) GetIptablesVersion() (int, int, int) {
method run (line 490) | func (ipt *IPTables) run(args ...string) error {
method runWithOutput (line 496) | func (ipt *IPTables) runWithOutput(args []string, stdout io.Writer) er...
method existsForOldIptables (line 648) | func (ipt *IPTables) existsForOldIptables(table, chain string, rulespe...
type Stat (line 81) | type Stat struct
type option (line 94) | type option
function IPFamily (line 96) | func IPFamily(proto Protocol) option {
function Timeout (line 102) | func Timeout(timeout int) option {
function New (line 113) | func New(opts ...option) (*IPTables, error) {
function NewWithProtocol (line 154) | func NewWithProtocol(proto Protocol) (*IPTables, error) {
constant existsErr (line 423) | existsErr = 1
function getIptablesCommand (line 537) | func getIptablesCommand(proto Protocol) string {
function getIptablesCommandSupport (line 546) | func getIptablesCommandSupport(v1 int, v2 int, v3 int) (bool, bool, bool...
function extractIptablesVersion (line 553) | func extractIptablesVersion(str string) (int, int, int, string, error) {
function getIptablesVersionString (line 583) | func getIptablesVersionString(path string) (string, error) {
function iptablesHasCheckCommand (line 595) | func iptablesHasCheckCommand(v1 int, v2 int, v3 int) bool {
function iptablesHasWaitCommand (line 609) | func iptablesHasWaitCommand(v1 int, v2 int, v3 int) bool {
function iptablesWaitSupportSecond (line 623) | func iptablesWaitSupportSecond(v1 int, v2 int, v3 int) bool {
function iptablesHasRandomFully (line 634) | func iptablesHasRandomFully(v1 int, v2 int, v3 int) bool {
function filterRuleOutput (line 665) | func filterRuleOutput(rule string) string {
FILE: vendor/github.com/coreos/go-iptables/iptables/lock.go
constant xtablesLockFilePath (line 29) | xtablesLockFilePath = "/var/run/xtables.lock"
constant defaultFilePerm (line 31) | defaultFilePerm = 0600
type Unlocker (line 34) | type Unlocker interface
type nopUnlocker (line 38) | type nopUnlocker struct
method Unlock (line 40) | func (_ nopUnlocker) Unlock() error { return nil }
type fileLock (line 42) | type fileLock struct
method tryLock (line 54) | func (l *fileLock) tryLock() (Unlocker, error) {
method Unlock (line 71) | func (l *fileLock) Unlock() error {
function newXtablesFileLock (line 78) | func newXtablesFileLock() (*fileLock, error) {
FILE: vendor/github.com/fsnotify/fsnotify/fen.go
type Watcher (line 14) | type Watcher struct
method Close (line 25) | func (w *Watcher) Close() error {
method Add (line 30) | func (w *Watcher) Add(name string) error {
method Remove (line 35) | func (w *Watcher) Remove(name string) error {
function NewWatcher (line 20) | func NewWatcher() (*Watcher, error) {
FILE: vendor/github.com/fsnotify/fsnotify/fsnotify.go
type Event (line 17) | type Event struct
method String (line 61) | func (e Event) String() string {
type Op (line 23) | type Op
method String (line 34) | func (op Op) String() string {
constant Create (line 27) | Create Op = 1 << iota
constant Write (line 28) | Write
constant Remove (line 29) | Remove
constant Rename (line 30) | Rename
constant Chmod (line 31) | Chmod
FILE: vendor/github.com/fsnotify/fsnotify/inotify.go
type Watcher (line 23) | type Watcher struct
method isClosed (line 63) | func (w *Watcher) isClosed() bool {
method Close (line 73) | func (w *Watcher) Close() error {
method Add (line 91) | func (w *Watcher) Add(name string) error {
method Remove (line 126) | func (w *Watcher) Remove(name string) error {
method readEvents (line 172) | func (w *Watcher) readEvents() {
function NewWatcher (line 36) | func NewWatcher() (*Watcher, error) {
type watch (line 165) | type watch struct
method ignoreLinux (line 300) | func (e *Event) ignoreLinux(mask uint32) bool {
function newEvent (line 319) | func newEvent(name string, mask uint32) Event {
FILE: vendor/github.com/fsnotify/fsnotify/inotify_poller.go
type fdPoller (line 15) | type fdPoller struct
method wait (line 79) | func (poller *fdPoller) wait() (bool, error) {
method wake (line 149) | func (poller *fdPoller) wake() error {
method clearWake (line 162) | func (poller *fdPoller) clearWake() error {
method close (line 177) | func (poller *fdPoller) close() {
function emptyPoller (line 21) | func emptyPoller(fd int) *fdPoller {
function newFdPoller (line 32) | func newFdPoller(fd int) (*fdPoller, error) {
FILE: vendor/github.com/fsnotify/fsnotify/kqueue.go
type Watcher (line 22) | type Watcher struct
method Close (line 67) | func (w *Watcher) Close() error {
method Add (line 94) | func (w *Watcher) Add(name string) error {
method Remove (line 103) | func (w *Watcher) Remove(name string) error {
method addWatch (line 159) | func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
method readEvents (line 261) | func (w *Watcher) readEvents() {
method watchDirectoryFiles (line 390) | func (w *Watcher) watchDirectoryFiles(dirPath string) error {
method sendDirectoryChangeEvents (line 416) | func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
method sendFileCreatedEventIfNew (line 439) | func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo ...
method internalWatch (line 465) | func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (st...
type pathInfo (line 38) | type pathInfo struct
function NewWatcher (line 44) | func NewWatcher() (*Watcher, error) {
constant noteAllEvents (line 151) | noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | ...
function newEvent (line 368) | func newEvent(name string, mask uint32) Event {
function newCreateEvent (line 385) | func newCreateEvent(name string) Event {
function kqueue (line 482) | func kqueue() (kq int, err error) {
function register (line 491) | func register(kq int, fds []int, flags int, fflags uint32) error {
function read (line 510) | func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]uni...
function durationToTimespec (line 519) | func durationToTimespec(d time.Duration) unix.Timespec {
FILE: vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
constant openMode (line 11) | openMode = unix.O_NONBLOCK | unix.O_RDONLY | unix.O_CLOEXEC
FILE: vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
constant openMode (line 12) | openMode = unix.O_EVTONLY | unix.O_CLOEXEC
FILE: vendor/github.com/fsnotify/fsnotify/windows.go
type Watcher (line 21) | type Watcher struct
method Close (line 51) | func (w *Watcher) Close() error {
method Add (line 67) | func (w *Watcher) Add(name string) error {
method Remove (line 85) | func (w *Watcher) Remove(name string) error {
method wakeupReader (line 177) | func (w *Watcher) wakeupReader() error {
method addWatch (line 240) | func (w *Watcher) addWatch(pathname string, flags uint64) error {
method remWatch (line 289) | func (w *Watcher) remWatch(pathname string) error {
method deleteWatch (line 316) | func (w *Watcher) deleteWatch(watch *watch) {
method startRead (line 332) | func (w *Watcher) startRead(watch *watch) error {
method readEvents (line 373) | func (w *Watcher) readEvents() {
method sendEvent (line 517) | func (w *Watcher) sendEvent(name string, mask uint64) bool {
function NewWatcher (line 33) | func NewWatcher() (*Watcher, error) {
constant sysFSONESHOT (line 100) | sysFSONESHOT = 0x80000000
constant sysFSONLYDIR (line 101) | sysFSONLYDIR = 0x1000000
constant sysFSACCESS (line 104) | sysFSACCESS = 0x1
constant sysFSALLEVENTS (line 105) | sysFSALLEVENTS = 0xfff
constant sysFSATTRIB (line 106) | sysFSATTRIB = 0x4
constant sysFSCLOSE (line 107) | sysFSCLOSE = 0x18
constant sysFSCREATE (line 108) | sysFSCREATE = 0x100
constant sysFSDELETE (line 109) | sysFSDELETE = 0x200
constant sysFSDELETESELF (line 110) | sysFSDELETESELF = 0x400
constant sysFSMODIFY (line 111) | sysFSMODIFY = 0x2
constant sysFSMOVE (line 112) | sysFSMOVE = 0xc0
constant sysFSMOVEDFROM (line 113) | sysFSMOVEDFROM = 0x40
constant sysFSMOVEDTO (line 114) | sysFSMOVEDTO = 0x80
constant sysFSMOVESELF (line 115) | sysFSMOVESELF = 0x800
constant sysFSIGNORED (line 118) | sysFSIGNORED = 0x8000
constant sysFSQOVERFLOW (line 119) | sysFSQOVERFLOW = 0x4000
function newEvent (line 122) | func newEvent(name string, mask uint32) Event {
constant opAddWatch (line 143) | opAddWatch = iota
constant opRemoveWatch (line 144) | opRemoveWatch
constant provisional (line 148) | provisional uint64 = 1 << (32 + iota)
type input (line 151) | type input struct
type inode (line 158) | type inode struct
type watch (line 164) | type watch struct
type indexMap (line 174) | type indexMap
type watchMap (line 175) | type watchMap
method get (line 222) | func (m watchMap) get(ino *inode) *watch {
method set (line 230) | func (m watchMap) set(ino *inode, watch *watch) {
function getDir (line 185) | func getDir(pathname string) (dir string, err error) {
function getIno (line 199) | func getIno(path string) (ino *inode, err error) {
function toWindowsFlags (line 530) | func toWindowsFlags(mask uint64) uint32 {
function toFSnotifyFlags (line 547) | func toFSnotifyFlags(action uint32) uint64 {
FILE: vendor/github.com/nxadm/tail/ratelimiter/leakybucket.go
type LeakyBucket (line 8) | type LeakyBucket struct
method updateFill (line 28) | func (b *LeakyBucket) updateFill() {
method Pour (line 41) | func (b *LeakyBucket) Pour(amount uint16) bool {
method DrainedAt (line 56) | func (b *LeakyBucket) DrainedAt() time.Time {
method TimeToDrain (line 61) | func (b *LeakyBucket) TimeToDrain() time.Duration {
method TimeSinceLastUpdate (line 65) | func (b *LeakyBucket) TimeSinceLastUpdate() time.Duration {
method Serialise (line 76) | func (b *LeakyBucket) Serialise() *LeakyBucketSer {
function NewLeakyBucket (line 16) | func NewLeakyBucket(size uint16, leakInterval time.Duration) *LeakyBucket {
type LeakyBucketSer (line 69) | type LeakyBucketSer struct
method DeSerialise (line 87) | func (b *LeakyBucketSer) DeSerialise() *LeakyBucket {
FILE: vendor/github.com/nxadm/tail/ratelimiter/memory.go
constant GC_SIZE (line 9) | GC_SIZE int = 100
constant GC_PERIOD (line 10) | GC_PERIOD time.Duration = 60 * time.Second
type Memory (line 13) | type Memory struct
method GetBucketFor (line 25) | func (m *Memory) GetBucketFor(key string) (*LeakyBucket, error) {
method SetBucketFor (line 35) | func (m *Memory) SetBucketFor(key string, bucket LeakyBucket) error {
method GarbageCollect (line 46) | func (m *Memory) GarbageCollect() {
function NewMemory (line 18) | func NewMemory() *Memory {
FILE: vendor/github.com/nxadm/tail/ratelimiter/storage.go
type Storage (line 3) | type Storage interface
FILE: vendor/github.com/nxadm/tail/tail.go
type Line (line 35) | type Line struct
function NewLine (line 48) | func NewLine(text string, lineNum int) *Line {
type SeekInfo (line 53) | type SeekInfo struct
type logger (line 58) | type logger interface
type Config (line 71) | type Config struct
type Tail (line 91) | type Tail struct
method Tell (line 158) | func (tail *Tail) Tell() (offset int64, err error) {
method Stop (line 178) | func (tail *Tail) Stop() error {
method StopAtEOF (line 185) | func (tail *Tail) StopAtEOF() error {
method close (line 192) | func (tail *Tail) close() {
method closeFile (line 197) | func (tail *Tail) closeFile() {
method reopen (line 204) | func (tail *Tail) reopen() error {
method readLine (line 228) | func (tail *Tail) readLine() (string, error) {
method tailFileSync (line 244) | func (tail *Tail) tailFileSync() {
method waitForChanges (line 348) | func (tail *Tail) waitForChanges() error {
method openReader (line 391) | func (tail *Tail) openReader() {
method seekEnd (line 402) | func (tail *Tail) seekEnd() error {
method seekTo (line 406) | func (tail *Tail) seekTo(pos SeekInfo) error {
method sendLine (line 418) | func (tail *Tail) sendLine(line string) bool {
method Cleanup (line 453) | func (tail *Tail) Cleanup() {
function TailFile (line 120) | func TailFile(filename string, config Config) (*Tail, error) {
FILE: vendor/github.com/nxadm/tail/tail_posix.go
function OpenFile (line 15) | func OpenFile(name string) (file *os.File, err error) {
FILE: vendor/github.com/nxadm/tail/tail_windows.go
function OpenFile (line 17) | func OpenFile(name string) (file *os.File, err error) {
FILE: vendor/github.com/nxadm/tail/util/util.go
type Logger (line 14) | type Logger struct
function Fatal (line 21) | func Fatal(format string, v ...interface{}) {
function PartitionString (line 29) | func PartitionString(s string, chunkSize int) []string {
FILE: vendor/github.com/nxadm/tail/watch/filechanges.go
type FileChanges (line 4) | type FileChanges struct
method NotifyModified (line 15) | func (fc *FileChanges) NotifyModified() {
method NotifyTruncated (line 19) | func (fc *FileChanges) NotifyTruncated() {
method NotifyDeleted (line 23) | func (fc *FileChanges) NotifyDeleted() {
function NewFileChanges (line 10) | func NewFileChanges() *FileChanges {
function sendOnlyIfEmpty (line 32) | func sendOnlyIfEmpty(ch chan bool) {
FILE: vendor/github.com/nxadm/tail/watch/inotify.go
type InotifyFileWatcher (line 19) | type InotifyFileWatcher struct
method BlockUntilExists (line 29) | func (fw *InotifyFileWatcher) BlockUntilExists(t *tomb.Tomb) error {
method ChangeEvents (line 69) | func (fw *InotifyFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*...
function NewInotifyFileWatcher (line 24) | func NewInotifyFileWatcher(filename string) *InotifyFileWatcher {
FILE: vendor/github.com/nxadm/tail/watch/inotify_tracker.go
type InotifyTracker (line 19) | type InotifyTracker struct
method addWatch (line 135) | func (shared *InotifyTracker) addWatch(winfo *watchInfo) error {
method removeWatch (line 165) | func (shared *InotifyTracker) removeWatch(winfo *watchInfo) error {
method sendEvent (line 199) | func (shared *InotifyTracker) sendEvent(event fsnotify.Event) {
method run (line 217) | func (shared *InotifyTracker) run() {
type watchInfo (line 30) | type watchInfo struct
method isCreate (line 35) | func (this *watchInfo) isCreate() bool {
function Watch (line 62) | func Watch(fname string) error {
function WatchCreate (line 70) | func WatchCreate(fname string) error {
function watch (line 77) | func watch(winfo *watchInfo) error {
function RemoveWatch (line 87) | func RemoveWatch(fname string) error {
function RemoveWatchCreate (line 94) | func RemoveWatchCreate(fname string) error {
function remove (line 101) | func remove(winfo *watchInfo) error {
function Events (line 121) | func Events(fname string) <-chan fsnotify.Event {
function Cleanup (line 129) | func Cleanup(fname string) error {
FILE: vendor/github.com/nxadm/tail/watch/polling.go
type PollingFileWatcher (line 17) | type PollingFileWatcher struct
method BlockUntilExists (line 29) | func (fw *PollingFileWatcher) BlockUntilExists(t *tomb.Tomb) error {
method ChangeEvents (line 46) | func (fw *PollingFileWatcher) ChangeEvents(t *tomb.Tomb, pos int64) (*...
function NewPollingFileWatcher (line 22) | func NewPollingFileWatcher(filename string) *PollingFileWatcher {
function init (line 117) | func init() {
FILE: vendor/github.com/nxadm/tail/watch/watch.go
type FileWatcher (line 10) | type FileWatcher interface
FILE: vendor/github.com/nxadm/tail/winfile/winfile.go
function Open (line 16) | func Open(path string, mode int, perm uint32) (fd syscall.Handle, err er...
function makeInheritSa (line 63) | func makeInheritSa() *syscall.SecurityAttributes {
function OpenFile (line 71) | func OpenFile(name string, flag int, perm os.FileMode) (file *os.File, e...
function syscallMode (line 80) | func syscallMode(i os.FileMode) (o uint32) {
FILE: vendor/github.com/onsi/ginkgo/config/config.go
constant VERSION (line 23) | VERSION = "1.16.5"
type GinkgoConfigType (line 25) | type GinkgoConfigType struct
type DefaultReporterConfigType (line 47) | type DefaultReporterConfigType struct
function processPrefix (line 61) | func processPrefix(prefix string) string {
type flagFunc (line 68) | type flagFunc
method String (line 70) | func (f flagFunc) String() string { return "" }
method Set (line 71) | func (f flagFunc) Set(s string) error { f(s); return nil }
function Flags (line 73) | func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bo...
function BuildFlagArgs (line 113) | func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter Defa...
function flagFocus (line 221) | func flagFocus(arg string) {
function flagSkip (line 228) | func flagSkip(arg string) {
FILE: vendor/github.com/onsi/ginkgo/formatter/formatter.go
constant COLS (line 9) | COLS = 80
type ColorMode (line 11) | type ColorMode
constant ColorModeNone (line 14) | ColorModeNone ColorMode = iota
constant ColorModeTerminal (line 15) | ColorModeTerminal
constant ColorModePassthrough (line 16) | ColorModePassthrough
function F (line 21) | func F(format string, args ...interface{}) string {
function Fi (line 25) | func Fi(indentation uint, format string, args ...interface{}) string {
function Fiw (line 29) | func Fiw(indentation uint, maxWidth uint, format string, args ...interfa...
type Formatter (line 33) | type Formatter struct
method F (line 77) | func (f Formatter) F(format string, args ...interface{}) string {
method Fi (line 81) | func (f Formatter) Fi(indentation uint, format string, args ...interfa...
method Fiw (line 85) | func (f Formatter) Fiw(indentation uint, maxWidth uint, format string,...
method length (line 139) | func (f Formatter) length(styled string) uint {
method CycleJoin (line 158) | func (f Formatter) CycleJoin(elements []string, joiner string, cycle [...
method style (line 174) | func (f Formatter) style(s string) string {
function NewWithNoColorBool (line 40) | func NewWithNoColorBool(noColor bool) Formatter {
function New (line 47) | func New(colorMode ColorMode) Formatter {
FILE: vendor/github.com/onsi/ginkgo/ginkgo_dsl.go
constant GINKGO_VERSION (line 38) | GINKGO_VERSION = config.VERSION
constant GINKGO_PANIC (line 39) | GINKGO_PANIC = `
function init (line 52) | func init() {
type GinkgoTestingT (line 64) | type GinkgoTestingT interface
function GinkgoRandomSeed (line 72) | func GinkgoRandomSeed() int64 {
function GinkgoParallelNode (line 77) | func GinkgoParallelNode() int {
function GinkgoParallelProcess (line 84) | func GinkgoParallelProcess() int {
function GinkgoT (line 100) | func GinkgoT(optionalOffset ...int) GinkgoTInterface {
type GinkgoTInterface (line 116) | type GinkgoTInterface interface
type Reporter (line 142) | type Reporter
type Done (line 146) | type Done
type GinkgoTestDescription (line 156) | type GinkgoTestDescription struct
function CurrentGinkgoTestDescription (line 171) | func CurrentGinkgoTestDescription() GinkgoTestDescription {
type Benchmarker (line 201) | type Benchmarker interface
function RunSpecs (line 213) | func RunSpecs(t GinkgoTestingT, description string) bool {
function RunSpecsWithDefaultAndCustomReporters (line 225) | func RunSpecsWithDefaultAndCustomReporters(t GinkgoTestingT, description...
function RunSpecsWithCustomReporters (line 233) | func RunSpecsWithCustomReporters(t GinkgoTestingT, description string, s...
function runSpecsWithCustomReporters (line 238) | func runSpecsWithCustomReporters(t GinkgoTestingT, description string, s...
function buildDefaultReporter (line 258) | func buildDefaultReporter() Reporter {
function Skip (line 273) | func Skip(message string, callerSkip ...int) {
function Fail (line 284) | func Fail(message string, callerSkip ...int) {
function GinkgoRecover (line 304) | func GinkgoRecover() {
function Describe (line 317) | func Describe(text string, body func()) bool {
function FDescribe (line 323) | func FDescribe(text string, body func()) bool {
function PDescribe (line 329) | func PDescribe(text string, body func()) bool {
function XDescribe (line 335) | func XDescribe(text string, body func()) bool {
function Context (line 346) | func Context(text string, body func()) bool {
function FContext (line 352) | func FContext(text string, body func()) bool {
function PContext (line 358) | func PContext(text string, body func()) bool {
function XContext (line 364) | func XContext(text string, body func()) bool {
function When (line 375) | func When(text string, body func()) bool {
function FWhen (line 381) | func FWhen(text string, body func()) bool {
function PWhen (line 387) | func PWhen(text string, body func()) bool {
function XWhen (line 393) | func XWhen(text string, body func()) bool {
function It (line 403) | func It(text string, body interface{}, timeout ...float64) bool {
function FIt (line 410) | func FIt(text string, body interface{}, timeout ...float64) bool {
function PIt (line 417) | func PIt(text string, _ ...interface{}) bool {
function XIt (line 423) | func XIt(text string, _ ...interface{}) bool {
function Specify (line 431) | func Specify(text string, body interface{}, timeout ...float64) bool {
function FSpecify (line 438) | func FSpecify(text string, body interface{}, timeout ...float64) bool {
function PSpecify (line 445) | func PSpecify(text string, is ...interface{}) bool {
function XSpecify (line 451) | func XSpecify(text string, is ...interface{}) bool {
function By (line 463) | func By(text string, callbacks ...func()) {
function Measure (line 482) | func Measure(text string, body interface{}, samples int) bool {
function FMeasure (line 489) | func FMeasure(text string, body interface{}, samples int) bool {
function PMeasure (line 496) | func PMeasure(text string, _ ...interface{}) bool {
function XMeasure (line 503) | func XMeasure(text string, _ ...interface{}) bool {
function BeforeSuite (line 515) | func BeforeSuite(body interface{}, timeout ...float64) bool {
function AfterSuite (line 529) | func AfterSuite(body interface{}, timeout ...float64) bool {
function SynchronizedBeforeSuite (line 575) | func SynchronizedBeforeSuite(node1Body interface{}, allNodesBody interfa...
function SynchronizedAfterSuite (line 602) | func SynchronizedAfterSuite(allNodesBody interface{}, node1Body interfac...
function BeforeEach (line 617) | func BeforeEach(body interface{}, timeout ...float64) bool {
function JustBeforeEach (line 628) | func JustBeforeEach(body interface{}, timeout ...float64) bool {
function JustAfterEach (line 639) | func JustAfterEach(body interface{}, timeout ...float64) bool {
function AfterEach (line 650) | func AfterEach(body interface{}, timeout ...float64) bool {
function validateBodyFunc (line 656) | func validateBodyFunc(body interface{}, cl types.CodeLocation) {
function parseTimeout (line 675) | func parseTimeout(timeout ...float64) time.Duration {
FILE: vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go
function New (line 12) | func New(skip int) types.CodeLocation {
function PruneStack (line 25) | func PruneStack(fullStackTrace string, skip int) string {
FILE: vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go
type subjectOrContainerNode (line 11) | type subjectOrContainerNode struct
method text (line 16) | func (n subjectOrContainerNode) text() string {
type CollatedNodes (line 24) | type CollatedNodes struct
type ContainerNode (line 29) | type ContainerNode struct
method Shuffle (line 46) | func (container *ContainerNode) Shuffle(r *rand.Rand) {
method BackPropagateProgrammaticFocus (line 56) | func (node *ContainerNode) BackPropagateProgrammaticFocus() bool {
method Collate (line 80) | func (node *ContainerNode) Collate() []CollatedNodes {
method collate (line 84) | func (node *ContainerNode) collate(enclosingContainers []*ContainerNod...
method PushContainerNode (line 105) | func (node *ContainerNode) PushContainerNode(container *ContainerNode) {
method PushSubjectNode (line 109) | func (node *ContainerNode) PushSubjectNode(subject leafnodes.SubjectNo...
method PushSetupNode (line 113) | func (node *ContainerNode) PushSetupNode(setupNode leafnodes.BasicNode) {
method SetupNodesOfType (line 117) | func (node *ContainerNode) SetupNodesOfType(nodeType types.SpecCompone...
method Text (line 127) | func (node *ContainerNode) Text() string {
method CodeLocation (line 131) | func (node *ContainerNode) CodeLocation() types.CodeLocation {
method Flag (line 135) | func (node *ContainerNode) Flag() types.FlagType {
method Len (line 141) | func (node *ContainerNode) Len() int {
method Less (line 145) | func (node *ContainerNode) Less(i, j int) bool {
method Swap (line 149) | func (node *ContainerNode) Swap(i, j int) {
function New (line 38) | func New(text string, flag types.FlagType, codeLocation types.CodeLocati...
FILE: vendor/github.com/onsi/ginkgo/internal/failer/failer.go
type Failer (line 10) | type Failer struct
method Panic (line 23) | func (f *Failer) Panic(location types.CodeLocation, forwardedPanic int...
method Timeout (line 37) | func (f *Failer) Timeout(location types.CodeLocation) {
method Fail (line 50) | func (f *Failer) Fail(message string, location types.CodeLocation) {
method Drain (line 63) | func (f *Failer) Drain(componentType types.SpecComponentType, componen...
method Skip (line 81) | func (f *Failer) Skip(message string, location types.CodeLocation) {
function New (line 16) | func New() *Failer {
FILE: vendor/github.com/onsi/ginkgo/internal/global/init.go
constant DefaultTimeout (line 10) | DefaultTimeout = time.Duration(1 * time.Second)
function init (line 15) | func init() {
function InitializeGlobals (line 19) | func InitializeGlobals() {
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go
type benchmarker (line 12) | type benchmarker struct
method Time (line 24) | func (b *benchmarker) Time(name string, body func(), info ...interface...
method RecordValue (line 37) | func (b *benchmarker) RecordValue(name string, value float64, info ......
method RecordValueWithPrecision (line 44) | func (b *benchmarker) RecordValueWithPrecision(name string, value floa...
method getMeasurement (line 51) | func (b *benchmarker) getMeasurement(name string, smallestLabel string...
method measurementsReport (line 77) | func (b *benchmarker) measurementsReport() map[string]*types.SpecMeasu...
function newBenchmarker (line 18) | func newBenchmarker() *benchmarker {
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go
type BasicNode (line 7) | type BasicNode interface
type SubjectNode (line 13) | type SubjectNode interface
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go
type ItNode (line 10) | type ItNode struct
method Run (line 25) | func (node *ItNode) Run() (outcome types.SpecState, failure types.Spec...
method Type (line 29) | func (node *ItNode) Type() types.SpecComponentType {
method Text (line 33) | func (node *ItNode) Text() string {
method Flag (line 37) | func (node *ItNode) Flag() types.FlagType {
method CodeLocation (line 41) | func (node *ItNode) CodeLocation() types.CodeLocation {
method Samples (line 45) | func (node *ItNode) Samples() int {
function NewItNode (line 17) | func NewItNode(text string, body interface{}, flag types.FlagType, codeL...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go
type MeasureNode (line 10) | type MeasureNode struct
method Run (line 36) | func (node *MeasureNode) Run() (outcome types.SpecState, failure types...
method MeasurementsReport (line 40) | func (node *MeasureNode) MeasurementsReport() map[string]*types.SpecMe...
method Type (line 44) | func (node *MeasureNode) Type() types.SpecComponentType {
method Text (line 48) | func (node *MeasureNode) Text() string {
method Flag (line 52) | func (node *MeasureNode) Flag() types.FlagType {
method CodeLocation (line 56) | func (node *MeasureNode) CodeLocation() types.CodeLocation {
method Samples (line 60) | func (node *MeasureNode) Samples() int {
function NewMeasureNode (line 19) | func NewMeasureNode(text string, body interface{}, flag types.FlagType, ...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go
type runner (line 13) | type runner struct
method run (line 60) | func (r *runner) run() (outcome types.SpecState, failure types.SpecFai...
method runAsync (line 68) | func (r *runner) runAsync() (outcome types.SpecState, failure types.Sp...
method runSync (line 102) | func (r *runner) runSync() (outcome types.SpecState, failure types.Spe...
function newRunner (line 24) | func newRunner(body interface{}, codeLocation types.CodeLocation, timeou...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go
type SetupNode (line 10) | type SetupNode struct
method Run (line 14) | func (node *SetupNode) Run() (outcome types.SpecState, failure types.S...
method Type (line 18) | func (node *SetupNode) Type() types.SpecComponentType {
method CodeLocation (line 22) | func (node *SetupNode) CodeLocation() types.CodeLocation {
function NewBeforeEachNode (line 26) | func NewBeforeEachNode(body interface{}, codeLocation types.CodeLocation...
function NewAfterEachNode (line 32) | func NewAfterEachNode(body interface{}, codeLocation types.CodeLocation,...
function NewJustBeforeEachNode (line 38) | func NewJustBeforeEachNode(body interface{}, codeLocation types.CodeLoca...
function NewJustAfterEachNode (line 44) | func NewJustAfterEachNode(body interface{}, codeLocation types.CodeLocat...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go
type SuiteNode (line 10) | type SuiteNode interface
type simpleSuiteNode (line 16) | type simpleSuiteNode struct
method Run (line 23) | func (node *simpleSuiteNode) Run(parallelNode int, parallelTotal int, ...
method Passed (line 31) | func (node *simpleSuiteNode) Passed() bool {
method Summary (line 35) | func (node *simpleSuiteNode) Summary() *types.SetupSummary {
function NewBeforeSuiteNode (line 45) | func NewBeforeSuiteNode(body interface{}, codeLocation types.CodeLocatio...
function NewAfterSuiteNode (line 51) | func NewAfterSuiteNode(body interface{}, codeLocation types.CodeLocation...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go
type synchronizedAfterSuiteNode (line 13) | type synchronizedAfterSuiteNode struct
method Run (line 29) | func (node *synchronizedAfterSuiteNode) Run(parallelNode int, parallel...
method Passed (line 47) | func (node *synchronizedAfterSuiteNode) Passed() bool {
method Summary (line 51) | func (node *synchronizedAfterSuiteNode) Summary() *types.SetupSummary {
method waitUntilOtherNodesAreDone (line 61) | func (node *synchronizedAfterSuiteNode) waitUntilOtherNodesAreDone(syn...
method canRun (line 71) | func (node *synchronizedAfterSuiteNode) canRun(syncHost string) bool {
function NewSynchronizedAfterSuiteNode (line 22) | func NewSynchronizedAfterSuiteNode(bodyA interface{}, bodyB interface{},...
FILE: vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go
type synchronizedBeforeSuiteNode (line 15) | type synchronizedBeforeSuiteNode struct
method Run (line 35) | func (node *synchronizedBeforeSuiteNode) Run(parallelNode int, paralle...
method runA (line 55) | func (node *synchronizedBeforeSuiteNode) runA(parallelTotal int, syncH...
method waitForA (line 73) | func (node *synchronizedBeforeSuiteNode) waitForA(syncHost string) (ty...
method Passed (line 115) | func (node *synchronizedBeforeSuiteNode) Passed() bool {
method Summary (line 119) | func (node *synchronizedBeforeSuiteNode) Summary() *types.SetupSummary {
method wrapA (line 129) | func (node *synchronizedBeforeSuiteNode) wrapA(bodyA interface{}) inte...
method wrapB (line 156) | func (node *synchronizedBeforeSuiteNode) wrapB(bodyB interface{}) inte...
function NewSynchronizedBeforeSuiteNode (line 26) | func NewSynchronizedBeforeSuiteNode(bodyA interface{}, bodyB interface{}...
FILE: vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go
type configAndSuite (line 20) | type configAndSuite struct
type Aggregator (line 25) | type Aggregator struct
method SpecSuiteWillBegin (line 69) | func (aggregator *Aggregator) SpecSuiteWillBegin(config config.GinkgoC...
method BeforeSuiteDidRun (line 73) | func (aggregator *Aggregator) BeforeSuiteDidRun(setupSummary *types.Se...
method AfterSuiteDidRun (line 77) | func (aggregator *Aggregator) AfterSuiteDidRun(setupSummary *types.Set...
method SpecWillRun (line 81) | func (aggregator *Aggregator) SpecWillRun(specSummary *types.SpecSumma...
method SpecDidComplete (line 85) | func (aggregator *Aggregator) SpecDidComplete(specSummary *types.SpecS...
method SpecSuiteDidEnd (line 89) | func (aggregator *Aggregator) SpecSuiteDidEnd(summary *types.SuiteSumm...
method mux (line 93) | func (aggregator *Aggregator) mux() {
method registerSuiteBeginning (line 115) | func (aggregator *Aggregator) registerSuiteBeginning(configAndSuite co...
method registerBeforeSuite (line 138) | func (aggregator *Aggregator) registerBeforeSuite(setupSummary *types....
method registerAfterSuite (line 143) | func (aggregator *Aggregator) registerAfterSuite(setupSummary *types.S...
method registerSpecCompletion (line 148) | func (aggregator *Aggregator) registerSpecCompletion(specSummary *type...
method flushCompletedSpecs (line 154) | func (aggregator *Aggregator) flushCompletedSpecs() {
method announceBeforeSuite (line 176) | func (aggregator *Aggregator) announceBeforeSuite(setupSummary *types....
method announceAfterSuite (line 183) | func (aggregator *Aggregator) announceAfterSuite(setupSummary *types.S...
method announceSpec (line 190) | func (aggregator *Aggregator) announceSpec(specSummary *types.SpecSumm...
method registerSuiteEnding (line 220) | func (aggregator *Aggregator) registerSuiteEnding(suite *types.SuiteSu...
function NewAggregator (line 50) | func NewAggregator(nodeCount int, result chan bool, config config.Defaul...
FILE: vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go
type Poster (line 20) | type Poster interface
type ForwardingReporter (line 35) | type ForwardingReporter struct
method post (line 76) | func (reporter *ForwardingReporter) post(path string, data interface{}) {
method SpecSuiteWillBegin (line 82) | func (reporter *ForwardingReporter) SpecSuiteWillBegin(conf config.Gin...
method BeforeSuiteDidRun (line 99) | func (reporter *ForwardingReporter) BeforeSuiteDidRun(setupSummary *ty...
method SpecWillRun (line 110) | func (reporter *ForwardingReporter) SpecWillRun(specSummary *types.Spe...
method SpecDidComplete (line 118) | func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types...
method AfterSuiteDidRun (line 129) | func (reporter *ForwardingReporter) AfterSuiteDidRun(setupSummary *typ...
method SpecSuiteDidEnd (line 140) | func (reporter *ForwardingReporter) SpecSuiteDidEnd(summary *types.Sui...
function NewForwardingReporter (line 44) | func NewForwardingReporter(config config.DefaultReporterConfigType, serv...
FILE: vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go
type OutputInterceptor (line 9) | type OutputInterceptor interface
FILE: vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go
function NewOutputInterceptor (line 14) | func NewOutputInterceptor() OutputInterceptor {
type outputInterceptor (line 18) | type outputInterceptor struct
method StartInterceptingOutput (line 26) | func (interceptor *outputInterceptor) StartInterceptingOutput() error {
method StopInterceptingAndReturnOutput (line 59) | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput(...
method StreamTo (line 80) | func (interceptor *outputInterceptor) StreamTo(out *os.File) {
FILE: vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go
function NewOutputInterceptor (line 10) | func NewOutputInterceptor() OutputInterceptor {
type outputInterceptor (line 14) | type outputInterceptor struct
method StartInterceptingOutput (line 18) | func (interceptor *outputInterceptor) StartInterceptingOutput() error {
method StopInterceptingAndReturnOutput (line 29) | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput(...
method StreamTo (line 36) | func (interceptor *outputInterceptor) StreamTo(*os.File) {}
FILE: vendor/github.com/onsi/ginkgo/internal/remote/server.go
type Server (line 28) | type Server struct
method Start (line 54) | func (server *Server) Start() {
method Close (line 77) | func (server *Server) Close() {
method Address (line 82) | func (server *Server) Address() string {
method readAll (line 91) | func (server *Server) readAll(request *http.Request) []byte {
method RegisterReporters (line 97) | func (server *Server) RegisterReporters(reporters ...reporters.Reporte...
method specSuiteWillBegin (line 101) | func (server *Server) specSuiteWillBegin(writer http.ResponseWriter, r...
method beforeSuiteDidRun (line 116) | func (server *Server) beforeSuiteDidRun(writer http.ResponseWriter, re...
method afterSuiteDidRun (line 126) | func (server *Server) afterSuiteDidRun(writer http.ResponseWriter, req...
method specWillRun (line 136) | func (server *Server) specWillRun(writer http.ResponseWriter, request ...
method specDidComplete (line 146) | func (server *Server) specDidComplete(writer http.ResponseWriter, requ...
method specSuiteDidEnd (line 156) | func (server *Server) specSuiteDidEnd(writer http.ResponseWriter, requ...
method RegisterAlive (line 170) | func (server *Server) RegisterAlive(node int, alive func() bool) {
method nodeIsAlive (line 176) | func (server *Server) nodeIsAlive(node int) bool {
method handleBeforeSuiteState (line 186) | func (server *Server) handleBeforeSuiteState(writer http.ResponseWrite...
method handleRemoteAfterSuiteData (line 200) | func (server *Server) handleRemoteAfterSuiteData(writer http.ResponseW...
method handleCounter (line 212) | func (server *Server) handleCounter(writer http.ResponseWriter, reques...
method handleHasCounter (line 222) | func (server *Server) handleHasCounter(writer http.ResponseWriter, req...
function NewServer (line 39) | func NewServer(parallelTotal int) (*Server, error) {
FILE: vendor/github.com/onsi/ginkgo/internal/spec/spec.go
type Spec (line 15) | type Spec struct
method processFlag (line 48) | func (spec *Spec) processFlag(flag types.FlagType) {
method Skip (line 56) | func (spec *Spec) Skip() {
method Failed (line 60) | func (spec *Spec) Failed() bool {
method Passed (line 64) | func (spec *Spec) Passed() bool {
method Flaked (line 68) | func (spec *Spec) Flaked() bool {
method Pending (line 72) | func (spec *Spec) Pending() bool {
method Skipped (line 76) | func (spec *Spec) Skipped() bool {
method Focused (line 80) | func (spec *Spec) Focused() bool {
method IsMeasurement (line 84) | func (spec *Spec) IsMeasurement() bool {
method Summary (line 88) | func (spec *Spec) Summary(suiteID string) *types.SpecSummary {
method ConcatenatedString (line 118) | func (spec *Spec) ConcatenatedString() string {
method Run (line 127) | func (spec *Spec) Run(writer io.Writer) {
method getState (line 146) | func (spec *Spec) getState() types.SpecState {
method setState (line 152) | func (spec *Spec) setState(state types.SpecState) {
method runSample (line 158) | func (spec *Spec) runSample(sample int, writer io.Writer) {
method announceSetupNode (line 220) | func (spec *Spec) announceSetupNode(writer io.Writer, nodeType string,...
method announceSubject (line 227) | func (spec *Spec) announceSubject(writer io.Writer, subject leafnodes....
method measurementsReport (line 241) | func (spec *Spec) measurementsReport() map[string]*types.SpecMeasureme...
function New (line 31) | func New(subject leafnodes.SubjectNode, containers []*containernode.Cont...
FILE: vendor/github.com/onsi/ginkgo/internal/spec/specs.go
type Specs (line 10) | type Specs struct
method Specs (line 29) | func (e *Specs) Specs() []*Spec {
method HasProgrammaticFocus (line 33) | func (e *Specs) HasProgrammaticFocus() bool {
method Shuffle (line 37) | func (e *Specs) Shuffle(r *rand.Rand) {
method ApplyFocus (line 50) | func (e *Specs) ApplyFocus(description string, focus, skip []string) {
method applyProgrammaticFocus (line 58) | func (e *Specs) applyProgrammaticFocus() {
method toMatch (line 78) | func (e *Specs) toMatch(description string, i int) []byte {
method applyRegExpFocusAndSkip (line 94) | func (e *Specs) applyRegExpFocusAndSkip(description string, focus, ski...
method SkipMeasurements (line 123) | func (e *Specs) SkipMeasurements() {
method Len (line 133) | func (e *Specs) Len() int {
method Less (line 137) | func (e *Specs) Less(i, j int) bool {
method Swap (line 141) | func (e *Specs) Swap(i, j int) {
function NewSpecs (line 18) | func NewSpecs(specs []*Spec) *Specs {
FILE: vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go
function ParallelizedIndexRange (line 3) | func ParallelizedIndexRange(length int, parallelTotal int, parallelNode ...
FILE: vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go
type ParallelIterator (line 11) | type ParallelIterator struct
method Next (line 25) | func (s *ParallelIterator) Next() (*spec.Spec, error) {
method NumberOfSpecsPriorToIteration (line 49) | func (s *ParallelIterator) NumberOfSpecsPriorToIteration() int {
method NumberOfSpecsToProcessIfKnown (line 53) | func (s *ParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool) {
method NumberOfSpecsThatWillBeRunIfKnown (line 57) | func (s *ParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, b...
function NewParallelIterator (line 17) | func NewParallelIterator(specs []*spec.Spec, host string) *ParallelItera...
FILE: vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go
type SerialIterator (line 7) | type SerialIterator struct
method Next (line 19) | func (s *SerialIterator) Next() (*spec.Spec, error) {
method NumberOfSpecsPriorToIteration (line 29) | func (s *SerialIterator) NumberOfSpecsPriorToIteration() int {
method NumberOfSpecsToProcessIfKnown (line 33) | func (s *SerialIterator) NumberOfSpecsToProcessIfKnown() (int, bool) {
method NumberOfSpecsThatWillBeRunIfKnown (line 37) | func (s *SerialIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, boo...
function NewSerialIterator (line 12) | func NewSerialIterator(specs []*spec.Spec) *SerialIterator {
FILE: vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go
type ShardedParallelIterator (line 5) | type ShardedParallelIterator struct
method Next (line 21) | func (s *ShardedParallelIterator) Next() (*spec.Spec, error) {
method NumberOfSpecsPriorToIteration (line 31) | func (s *ShardedParallelIterator) NumberOfSpecsPriorToIteration() int {
method NumberOfSpecsToProcessIfKnown (line 35) | func (s *ShardedParallelIterator) NumberOfSpecsToProcessIfKnown() (int...
method NumberOfSpecsThatWillBeRunIfKnown (line 39) | func (s *ShardedParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() ...
function NewShardedParallelIterator (line 11) | func NewShardedParallelIterator(specs []*spec.Spec, total int, node int)...
FILE: vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go
type SpecIterator (line 11) | type SpecIterator interface
type Counter (line 18) | type Counter struct
FILE: vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go
function randomID (line 8) | func randomID() string {
FILE: vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go
type SpecRunner (line 22) | type SpecRunner struct
method Run (line 52) | func (runner *SpecRunner) Run() bool {
method performDryRun (line 78) | func (runner *SpecRunner) performDryRun() {
method runBeforeSuite (line 116) | func (runner *SpecRunner) runBeforeSuite() bool {
method runAfterSuite (line 131) | func (runner *SpecRunner) runAfterSuite() bool {
method runSpecs (line 146) | func (runner *SpecRunner) runSpecs() bool {
method runSpec (line 190) | func (runner *SpecRunner) runSpec(spec *spec.Spec) (passed bool) {
method CurrentSpecSummary (line 210) | func (runner *SpecRunner) CurrentSpecSummary() (*types.SpecSummary, bo...
method registerForInterrupts (line 218) | func (runner *SpecRunner) registerForInterrupts(signalRegistered chan ...
method registerForHardInterrupts (line 243) | func (runner *SpecRunner) registerForHardInterrupts() {
method blockForeverIfInterrupted (line 252) | func (runner *SpecRunner) blockForeverIfInterrupted() {
method markInterrupted (line 262) | func (runner *SpecRunner) markInterrupted() {
method wasInterrupted (line 268) | func (runner *SpecRunner) wasInterrupted() bool {
method reportSuiteWillBegin (line 274) | func (runner *SpecRunner) reportSuiteWillBegin() {
method reportBeforeSuite (line 282) | func (runner *SpecRunner) reportBeforeSuite(summary *types.SetupSummar...
method reportAfterSuite (line 288) | func (runner *SpecRunner) reportAfterSuite(summary *types.SetupSummary) {
method reportSpecWillRun (line 294) | func (runner *SpecRunner) reportSpecWillRun(summary *types.SpecSummary) {
method reportSpecDidComplete (line 302) | func (runner *SpecRunner) reportSpecDidComplete(summary *types.SpecSum...
method reportSuiteDidEnd (line 317) | func (runner *SpecRunner) reportSuiteDidEnd(success bool) {
method countSpecsThatRanSatisfying (line 325) | func (runner *SpecRunner) countSpecsThatRanSatisfying(filter func(ex *...
method suiteDidEndSummary (line 337) | func (runner *SpecRunner) suiteDidEndSummary(success bool) *types.Suit...
method suiteWillBeginSummary (line 387) | func (runner *SpecRunner) suiteWillBeginSummary() *types.SuiteSummary {
function New (line 38) | func New(description string, beforeSuiteNode leafnodes.SuiteNode, iterat...
FILE: vendor/github.com/onsi/ginkgo/internal/suite/suite.go
type ginkgoTestingT (line 21) | type ginkgoTestingT interface
type deferredContainerNode (line 25) | type deferredContainerNode struct
type Suite (line 32) | type Suite struct
method Run (line 59) | func (suite *Suite) Run(t ginkgoTestingT, description string, reporter...
method generateSpecsIterator (line 86) | func (suite *Suite) generateSpecsIterator(description string, config c...
method CurrentRunningSpecSummary (line 121) | func (suite *Suite) CurrentRunningSpecSummary() (*types.SpecSummary, b...
method SetBeforeSuiteNode (line 128) | func (suite *Suite) SetBeforeSuiteNode(body interface{}, codeLocation ...
method SetAfterSuiteNode (line 135) | func (suite *Suite) SetAfterSuiteNode(body interface{}, codeLocation t...
method SetSynchronizedBeforeSuiteNode (line 142) | func (suite *Suite) SetSynchronizedBeforeSuiteNode(bodyA interface{}, ...
method SetSynchronizedAfterSuiteNode (line 149) | func (suite *Suite) SetSynchronizedAfterSuiteNode(bodyA interface{}, b...
method PushContainerNode (line 156) | func (suite *Suite) PushContainerNode(text string, body func(), flag t...
method PushItNode (line 187) | func (suite *Suite) PushItNode(text string, body interface{}, flag typ...
method PushMeasureNode (line 194) | func (suite *Suite) PushMeasureNode(text string, body interface{}, fla...
method PushBeforeEachNode (line 201) | func (suite *Suite) PushBeforeEachNode(body interface{}, codeLocation ...
method PushJustBeforeEachNode (line 208) | func (suite *Suite) PushJustBeforeEachNode(body interface{}, codeLocat...
method PushJustAfterEachNode (line 215) | func (suite *Suite) PushJustAfterEachNode(body interface{}, codeLocati...
method PushAfterEachNode (line 222) | func (suite *Suite) PushAfterEachNode(body interface{}, codeLocation t...
function New (line 47) | func New(failer *failer.Failer) *Suite {
FILE: vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go
type failFunc (line 8) | type failFunc
type skipFunc (line 9) | type skipFunc
type failedFunc (line 10) | type failedFunc
type nameFunc (line 11) | type nameFunc
function New (line 13) | func New(writer io.Writer, fail failFunc, skip skipFunc, failed failedFu...
type ginkgoTestingTProxy (line 24) | type ginkgoTestingTProxy struct
method Cleanup (line 33) | func (t *ginkgoTestingTProxy) Cleanup(func()) {
method Setenv (line 37) | func (t *ginkgoTestingTProxy) Setenv(kev, value string) {
method Error (line 42) | func (t *ginkgoTestingTProxy) Error(args ...interface{}) {
method Errorf (line 46) | func (t *ginkgoTestingTProxy) Errorf(format string, args ...interface{...
method Fail (line 50) | func (t *ginkgoTestingTProxy) Fail() {
method FailNow (line 54) | func (t *ginkgoTestingTProxy) FailNow() {
method Failed (line 58) | func (t *ginkgoTestingTProxy) Failed() bool {
method Fatal (line 62) | func (t *ginkgoTestingTProxy) Fatal(args ...interface{}) {
method Fatalf (line 66) | func (t *ginkgoTestingTProxy) Fatalf(format string, args ...interface{...
method Helper (line 70) | func (t *ginkgoTestingTProxy) Helper() {
method Log (line 74) | func (t *ginkgoTestingTProxy) Log(args ...interface{}) {
method Logf (line 78) | func (t *ginkgoTestingTProxy) Logf(format string, args ...interface{}) {
method Name (line 82) | func (t *ginkgoTestingTProxy) Name() string {
method Parallel (line 86) | func (t *ginkgoTestingTProxy) Parallel() {
method Skip (line 90) | func (t *ginkgoTestingTProxy) Skip(args ...interface{}) {
method SkipNow (line 94) | func (t *ginkgoTestingTProxy) SkipNow() {
method Skipf (line 98) | func (t *ginkgoTestingTProxy) Skipf(format string, args ...interface{}) {
method Skipped (line 102) | func (t *ginkgoTestingTProxy) Skipped() bool {
method TempDir (line 106) | func (t *ginkgoTestingTProxy) TempDir() string {
FILE: vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go
type FakeGinkgoWriter (line 3) | type FakeGinkgoWriter struct
method AddEvent (line 13) | func (writer *FakeGinkgoWriter) AddEvent(event string) {
method Truncate (line 17) | func (writer *FakeGinkgoWriter) Truncate() {
method DumpOut (line 21) | func (writer *FakeGinkgoWriter) DumpOut() {
method DumpOutWithHeader (line 25) | func (writer *FakeGinkgoWriter) DumpOutWithHeader(header string) {
method Bytes (line 29) | func (writer *FakeGinkgoWriter) Bytes() []byte {
method Write (line 34) | func (writer *FakeGinkgoWriter) Write(data []byte) (n int, err error) {
function NewFake (line 7) | func NewFake() *FakeGinkgoWriter {
FILE: vendor/github.com/onsi/ginkgo/internal/writer/writer.go
type WriterInterface (line 9) | type WriterInterface interface
type Writer (line 18) | type Writer struct
method AndRedirectTo (line 35) | func (w *Writer) AndRedirectTo(writer io.Writer) {
method SetStream (line 39) | func (w *Writer) SetStream(stream bool) {
method Write (line 45) | func (w *Writer) Write(b []byte) (n int, err error) {
method Truncate (line 59) | func (w *Writer) Truncate() {
method DumpOut (line 65) | func (w *Writer) DumpOut() {
method Bytes (line 73) | func (w *Writer) Bytes() []byte {
method DumpOutWithHeader (line 82) | func (w *Writer) DumpOutWithHeader(header string) {
function New (line 26) | func New(outWriter io.Writer) *Writer {
FILE: vendor/github.com/onsi/ginkgo/reporters/default_reporter.go
type DefaultReporter (line 16) | type DefaultReporter struct
method SpecSuiteWillBegin (line 29) | func (reporter *DefaultReporter) SpecSuiteWillBegin(config config.Gink...
method BeforeSuiteDidRun (line 38) | func (reporter *DefaultReporter) BeforeSuiteDidRun(setupSummary *types...
method AfterSuiteDidRun (line 44) | func (reporter *DefaultReporter) AfterSuiteDidRun(setupSummary *types....
method SpecWillRun (line 50) | func (reporter *DefaultReporter) SpecWillRun(specSummary *types.SpecSu...
method SpecDidComplete (line 56) | func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.Sp...
method SpecSuiteDidEnd (line 84) | func (reporter *DefaultReporter) SpecSuiteDidEnd(summary *types.SuiteS...
function NewDefaultReporter (line 22) | func NewDefaultReporter(config config.DefaultReporterConfigType, stenogr...
FILE: vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go
type FakeReporter (line 9) | type FakeReporter struct
method SpecSuiteWillBegin (line 30) | func (fakeR *FakeReporter) SpecSuiteWillBegin(config config.GinkgoConf...
method BeforeSuiteDidRun (line 35) | func (fakeR *FakeReporter) BeforeSuiteDidRun(setupSummary *types.Setup...
method SpecWillRun (line 39) | func (fakeR *FakeReporter) SpecWillRun(specSummary *types.SpecSummary) {
method SpecDidComplete (line 46) | func (fakeR *FakeReporter) SpecDidComplete(specSummary *types.SpecSumm...
method AfterSuiteDidRun (line 53) | func (fakeR *FakeReporter) AfterSuiteDidRun(setupSummary *types.SetupS...
method SpecSuiteDidEnd (line 57) | func (fakeR *FakeReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
function NewFakeReporter (line 23) | func NewFakeReporter() *FakeReporter {
FILE: vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go
type JUnitTestSuite (line 23) | type JUnitTestSuite struct
type JUnitTestCase (line 33) | type JUnitTestCase struct
type JUnitFailureMessage (line 42) | type JUnitFailureMessage struct
type JUnitSkipped (line 47) | type JUnitSkipped struct
type JUnitReporter (line 51) | type JUnitReporter struct
method SpecSuiteWillBegin (line 65) | func (reporter *JUnitReporter) SpecSuiteWillBegin(ginkgoConfig config....
method SpecWillRun (line 74) | func (reporter *JUnitReporter) SpecWillRun(specSummary *types.SpecSumm...
method BeforeSuiteDidRun (line 77) | func (reporter *JUnitReporter) BeforeSuiteDidRun(setupSummary *types.S...
method AfterSuiteDidRun (line 81) | func (reporter *JUnitReporter) AfterSuiteDidRun(setupSummary *types.Se...
method handleSetupSummary (line 89) | func (reporter *JUnitReporter) handleSetupSummary(name string, setupSu...
method SpecDidComplete (line 106) | func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.Spec...
method SpecSuiteDidEnd (line 136) | func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSum...
method failureTypeForState (line 167) | func (reporter *JUnitReporter) failureTypeForState(state types.SpecSta...
function NewJUnitReporter (line 59) | func NewJUnitReporter(filename string) *JUnitReporter {
function failureMessage (line 85) | func failureMessage(failure types.SpecFailure) string {
FILE: vendor/github.com/onsi/ginkgo/reporters/reporter.go
type Reporter (line 8) | type Reporter interface
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go
method colorize (line 8) | func (s *consoleStenographer) colorize(colorCode string, format string, ...
method printBanner (line 24) | func (s *consoleStenographer) printBanner(text string, bannerCharacter s...
method printNewLine (line 29) | func (s *consoleStenographer) printNewLine() {
method printDelimiter (line 33) | func (s *consoleStenographer) printDelimiter() {
method print (line 37) | func (s *consoleStenographer) print(indentation int, format string, args...
method println (line 41) | func (s *consoleStenographer) println(indentation int, format string, ar...
method indent (line 45) | func (s *consoleStenographer) indent(indentation int, format string, arg...
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go
function NewFakeStenographerCall (line 9) | func NewFakeStenographerCall(method string, args ...interface{}) FakeSte...
type FakeStenographer (line 16) | type FakeStenographer struct
method Calls (line 34) | func (stenographer *FakeStenographer) Calls() []FakeStenographerCall {
method Reset (line 41) | func (stenographer *FakeStenographer) Reset() {
method CallsTo (line 48) | func (stenographer *FakeStenographer) CallsTo(method string) []FakeSte...
method registerCall (line 62) | func (stenographer *FakeStenographer) registerCall(method string, args...
method AnnounceSuite (line 69) | func (stenographer *FakeStenographer) AnnounceSuite(description string...
method AnnounceAggregatedParallelRun (line 73) | func (stenographer *FakeStenographer) AnnounceAggregatedParallelRun(no...
method AnnounceParallelRun (line 77) | func (stenographer *FakeStenographer) AnnounceParallelRun(node int, no...
method AnnounceNumberOfSpecs (line 81) | func (stenographer *FakeStenographer) AnnounceNumberOfSpecs(specsToRun...
method AnnounceTotalNumberOfSpecs (line 85) | func (stenographer *FakeStenographer) AnnounceTotalNumberOfSpecs(total...
method AnnounceSpecRunCompletion (line 89) | func (stenographer *FakeStenographer) AnnounceSpecRunCompletion(summar...
method AnnounceSpecWillRun (line 93) | func (stenographer *FakeStenographer) AnnounceSpecWillRun(spec *types....
method AnnounceBeforeSuiteFailure (line 97) | func (stenographer *FakeStenographer) AnnounceBeforeSuiteFailure(summa...
method AnnounceAfterSuiteFailure (line 101) | func (stenographer *FakeStenographer) AnnounceAfterSuiteFailure(summar...
method AnnounceCapturedOutput (line 104) | func (stenographer *FakeStenographer) AnnounceCapturedOutput(output st...
method AnnounceSuccessfulSpec (line 108) | func (stenographer *FakeStenographer) AnnounceSuccessfulSpec(spec *typ...
method AnnounceSuccessfulSlowSpec (line 112) | func (stenographer *FakeStenographer) AnnounceSuccessfulSlowSpec(spec ...
method AnnounceSuccessfulMeasurement (line 116) | func (stenographer *FakeStenographer) AnnounceSuccessfulMeasurement(sp...
method AnnouncePendingSpec (line 120) | func (stenographer *FakeStenographer) AnnouncePendingSpec(spec *types....
method AnnounceSkippedSpec (line 124) | func (stenographer *FakeStenographer) AnnounceSkippedSpec(spec *types....
method AnnounceSpecTimedOut (line 128) | func (stenographer *FakeStenographer) AnnounceSpecTimedOut(spec *types...
method AnnounceSpecPanicked (line 132) | func (stenographer *FakeStenographer) AnnounceSpecPanicked(spec *types...
method AnnounceSpecFailed (line 136) | func (stenographer *FakeStenographer) AnnounceSpecFailed(spec *types.S...
method SummarizeFailures (line 140) | func (stenographer *FakeStenographer) SummarizeFailures(summaries []*t...
type FakeStenographerCall (line 21) | type FakeStenographerCall struct
function NewFakeStenographer (line 26) | func NewFakeStenographer() *FakeStenographer {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go
constant defaultStyle (line 18) | defaultStyle = "\x1b[0m"
constant boldStyle (line 19) | boldStyle = "\x1b[1m"
constant redColor (line 20) | redColor = "\x1b[91m"
constant greenColor (line 21) | greenColor = "\x1b[32m"
constant yellowColor (line 22) | yellowColor = "\x1b[33m"
constant cyanColor (line 23) | cyanColor = "\x1b[36m"
constant grayColor (line 24) | grayColor = "\x1b[90m"
constant lightGrayColor (line 25) | lightGrayColor = "\x1b[37m"
type cursorStateType (line 27) | type cursorStateType
constant cursorStateTop (line 30) | cursorStateTop cursorStateType = iota
constant cursorStateStreaming (line 31) | cursorStateStreaming
constant cursorStateMidBlock (line 32) | cursorStateMidBlock
constant cursorStateEndBlock (line 33) | cursorStateEndBlock
type Stenographer (line 36) | type Stenographer interface
function New (line 64) | func New(color bool, enableFlakes bool, writer io.Writer) Stenographer {
type consoleStenographer (line 78) | type consoleStenographer struct
method AnnounceSuite (line 88) | func (s *consoleStenographer) AnnounceSuite(description string, random...
method AnnounceParallelRun (line 101) | func (s *consoleStenographer) AnnounceParallelRun(node int, nodes int,...
method AnnounceAggregatedParallelRun (line 114) | func (s *consoleStenographer) AnnounceAggregatedParallelRun(nodes int,...
method AnnounceNumberOfSpecs (line 126) | func (s *consoleStenographer) AnnounceNumberOfSpecs(specsToRun int, to...
method AnnounceTotalNumberOfSpecs (line 141) | func (s *consoleStenographer) AnnounceTotalNumberOfSpecs(total int, su...
method AnnounceSpecRunCompletion (line 155) | func (s *consoleStenographer) AnnounceSpecRunCompletion(summary *types...
method AnnounceSpecWillRun (line 189) | func (s *consoleStenographer) AnnounceSpecWillRun(spec *types.SpecSumm...
method AnnounceBeforeSuiteFailure (line 208) | func (s *consoleStenographer) AnnounceBeforeSuiteFailure(summary *type...
method AnnounceAfterSuiteFailure (line 212) | func (s *consoleStenographer) AnnounceAfterSuiteFailure(summary *types...
method announceSetupFailure (line 216) | func (s *consoleStenographer) announceSetupFailure(name string, summar...
method AnnounceCapturedOutput (line 238) | func (s *consoleStenographer) AnnounceCapturedOutput(output string) {
method AnnounceSuccessfulSpec (line 248) | func (s *consoleStenographer) AnnounceSuccessfulSpec(spec *types.SpecS...
method AnnounceSuccessfulSlowSpec (line 253) | func (s *consoleStenographer) AnnounceSuccessfulSlowSpec(spec *types.S...
method AnnounceSuccessfulMeasurement (line 262) | func (s *consoleStenographer) AnnounceSuccessfulMeasurement(spec *type...
method AnnouncePendingSpec (line 271) | func (s *consoleStenographer) AnnouncePendingSpec(spec *types.SpecSumm...
method AnnounceSkippedSpec (line 285) | func (s *consoleStenographer) AnnounceSkippedSpec(spec *types.SpecSumm...
method AnnounceSpecTimedOut (line 302) | func (s *consoleStenographer) AnnounceSpecTimedOut(spec *types.SpecSum...
method AnnounceSpecPanicked (line 306) | func (s *consoleStenographer) AnnounceSpecPanicked(spec *types.SpecSum...
method AnnounceSpecFailed (line 310) | func (s *consoleStenographer) AnnounceSpecFailed(spec *types.SpecSumma...
method SummarizeFailures (line 314) | func (s *consoleStenographer) SummarizeFailures(summaries []*types.Spe...
method startBlock (line 351) | func (s *consoleStenographer) startBlock() {
method midBlock (line 360) | func (s *consoleStenographer) midBlock() {
method endBlock (line 364) | func (s *consoleStenographer) endBlock() {
method stream (line 369) | func (s *consoleStenographer) stream() {
method printBlockWithMessage (line 373) | func (s *consoleStenographer) printBlockWithMessage(header string, mes...
method printSpecFailure (line 387) | func (s *consoleStenographer) printSpecFailure(message string, spec *t...
method failureContext (line 398) | func (s *consoleStenographer) failureContext(failedComponentType types...
method printSkip (line 415) | func (s *consoleStenographer) printSkip(indentation int, spec types.Sp...
method printFailure (line 421) | func (s *consoleStenographer) printFailure(indentation int, state type...
method printSpecContext (line 441) | func (s *consoleStenographer) printSpecContext(componentTexts []string...
method printCodeLocationBlock (line 492) | func (s *consoleStenographer) printCodeLocationBlock(componentTexts []...
method orderedMeasurementKeys (line 509) | func (s *consoleStenographer) orderedMeasurementKeys(measurements map[...
method measurementReport (line 517) | func (s *consoleStenographer) measurementReport(spec *types.SpecSummar...
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go
function NewColorable (line 10) | func NewColorable(file *os.File) io.Writer {
function NewColorableStdout (line 18) | func NewColorableStdout() io.Writer {
function NewColorableStderr (line 22) | func NewColorableStderr() io.Writer {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go
constant foregroundBlue (line 18) | foregroundBlue = 0x1
constant foregroundGreen (line 19) | foregroundGreen = 0x2
constant foregroundRed (line 20) | foregroundRed = 0x4
constant foregroundIntensity (line 21) | foregroundIntensity = 0x8
constant foregroundMask (line 22) | foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen ...
constant backgroundBlue (line 23) | backgroundBlue = 0x10
constant backgroundGreen (line 24) | backgroundGreen = 0x20
constant backgroundRed (line 25) | backgroundRed = 0x40
constant backgroundIntensity (line 26) | backgroundIntensity = 0x80
constant backgroundMask (line 27) | backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen ...
type wchar (line 30) | type wchar
type short (line 31) | type short
type dword (line 32) | type dword
type word (line 33) | type word
type coord (line 35) | type coord struct
type smallRect (line 40) | type smallRect struct
type consoleScreenBufferInfo (line 47) | type consoleScreenBufferInfo struct
type Writer (line 64) | type Writer struct
method Write (line 353) | func (w *Writer) Write(data []byte) (n int, err error) {
function NewColorable (line 71) | func NewColorable(file *os.File) io.Writer {
function NewColorableStdout (line 86) | func NewColorableStdout() io.Writer {
function NewColorableStderr (line 90) | func NewColorableStderr() io.Writer {
type consoleColor (line 625) | type consoleColor struct
method foregroundAttr (line 633) | func (c consoleColor) foregroundAttr() (attr word) {
method backgroundAttr (line 649) | func (c consoleColor) backgroundAttr() (attr word) {
type hsv (line 684) | type hsv struct
method dist (line 688) | func (a hsv) dist(b hsv) float32 {
function toHSV (line 701) | func toHSV(rgb int) hsv {
type hsvTable (line 728) | type hsvTable
method find (line 738) | func (t hsvTable) find(rgb int) consoleColor {
function toHSVTable (line 730) | func toHSVTable(rgbTable []consoleColor) hsvTable {
function minmax3f (line 751) | func minmax3f(a, b, c float32) (min, max float32) {
function n256setup (line 774) | func n256setup() {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go
type NonColorable (line 9) | type NonColorable struct
method Write (line 18) | func (w *NonColorable) Write(data []byte) (n int, err error) {
function NewNonColorable (line 14) | func NewNonColorable(w io.Writer) io.Writer {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go
function IsTerminal (line 7) | func IsTerminal(fd uintptr) bool {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go
constant ioctlReadTermios (line 11) | ioctlReadTermios = syscall.TIOCGETA
function IsTerminal (line 14) | func IsTerminal(fd uintptr) bool {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go
constant ioctlReadTermios (line 11) | ioctlReadTermios = syscall.TCGETS
function IsTerminal (line 14) | func IsTerminal(fd uintptr) bool {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go
function IsTerminal (line 12) | func IsTerminal(fd uintptr) bool {
FILE: vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go
function IsTerminal (line 15) | func IsTerminal(fd uintptr) bool {
FILE: vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go
constant messageId (line 21) | messageId = "##teamcity"
type TeamCityReporter (line 24) | type TeamCityReporter struct
method SpecSuiteWillBegin (line 36) | func (reporter *TeamCityReporter) SpecSuiteWillBegin(config config.Gin...
method BeforeSuiteDidRun (line 41) | func (reporter *TeamCityReporter) BeforeSuiteDidRun(setupSummary *type...
method AfterSuiteDidRun (line 45) | func (reporter *TeamCityReporter) AfterSuiteDidRun(setupSummary *types...
method handleSetupSummary (line 49) | func (reporter *TeamCityReporter) handleSetupSummary(name string, setu...
method SpecWillRun (line 61) | func (reporter *TeamCityReporter) SpecWillRun(specSummary *types.SpecS...
method SpecDidComplete (line 66) | func (reporter *TeamCityReporter) SpecDidComplete(specSummary *types.S...
method SpecSuiteDidEnd (line 86) | func (reporter *TeamCityReporter) SpecSuiteDidEnd(summary *types.Suite...
method failureMessage (line 90) | func (reporter *TeamCityReporter) failureMessage(failure types.SpecFai...
method failureDetails (line 94) | func (reporter *TeamCityReporter) failureDetails(failure types.SpecFai...
function NewTeamCityReporter (line 30) | func NewTeamCityReporter(writer io.Writer) *TeamCityReporter {
function escape (line 98) | func escape(output string) string {
FILE: vendor/github.com/onsi/ginkgo/types/code_location.go
type CodeLocation (line 7) | type CodeLocation struct
method String (line 13) | func (codeLocation CodeLocation) String() string {
FILE: vendor/github.com/onsi/ginkgo/types/deprecation_support.go
type Deprecation (line 13) | type Deprecation struct
type deprecations (line 19) | type deprecations struct
method CustomReporter (line 23) | func (d deprecations) CustomReporter() Deprecation {
method V1Reporter (line 31) | func (d deprecations) V1Reporter() Deprecation {
method Async (line 39) | func (d deprecations) Async() Deprecation {
method Measure (line 47) | func (d deprecations) Measure() Deprecation {
method ParallelNode (line 55) | func (d deprecations) ParallelNode() Deprecation {
method Convert (line 63) | func (d deprecations) Convert() Deprecation {
method Blur (line 71) | func (d deprecations) Blur() Deprecation {
type DeprecationTracker (line 78) | type DeprecationTracker struct
method TrackDeprecation (line 88) | func (d *DeprecationTracker) TrackDeprecation(deprecation Deprecation,...
method DidTrackDeprecations (line 105) | func (d *DeprecationTracker) DidTrackDeprecations() bool {
method DeprecationsReport (line 109) | func (d *DeprecationTracker) DeprecationsReport() string {
function NewDeprecationTracker (line 82) | func NewDeprecationTracker() *DeprecationTracker {
type SemVer (line 132) | type SemVer struct
method GreaterThanOrEqualTo (line 138) | func (s SemVer) GreaterThanOrEqualTo(o SemVer) bool {
function ParseSemVer (line 144) | func ParseSemVer(semver string) SemVer {
FILE: vendor/github.com/onsi/ginkgo/types/synchronization.go
type RemoteBeforeSuiteState (line 7) | type RemoteBeforeSuiteState
constant RemoteBeforeSuiteStateInvalid (line 10) | RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota
constant RemoteBeforeSuiteStatePending (line 12) | RemoteBeforeSuiteStatePending
constant RemoteBeforeSuiteStatePassed (line 13) | RemoteBeforeSuiteStatePassed
constant RemoteBeforeSuiteStateFailed (line 14) | RemoteBeforeSuiteStateFailed
constant RemoteBeforeSuiteStateDisappeared (line 15) | RemoteBeforeSuiteStateDisappeared
type RemoteBeforeSuiteData (line 18) | type RemoteBeforeSuiteData struct
method ToJSON (line 23) | func (r RemoteBeforeSuiteData) ToJSON() []byte {
type RemoteAfterSuiteData (line 28) | type RemoteAfterSuiteData struct
FILE: vendor/github.com/onsi/ginkgo/types/types.go
constant GINKGO_FOCUS_EXIT_CODE (line 8) | GINKGO_FOCUS_EXIT_CODE = 197
type SuiteSummary (line 23) | type SuiteSummary struct
type SpecSummary (line 41) | type SpecSummary struct
method HasFailureState (line 56) | func (s SpecSummary) HasFailureState() bool {
method TimedOut (line 60) | func (s SpecSummary) TimedOut() bool {
method Panicked (line 64) | func (s SpecSummary) Panicked() bool {
method Failed (line 68) | func (s SpecSummary) Failed() bool {
method Passed (line 72) | func (s SpecSummary) Passed() bool {
method Skipped (line 76) | func (s SpecSummary) Skipped() bool {
method Pending (line 80) | func (s SpecSummary) Pending() bool {
type SetupSummary (line 84) | type SetupSummary struct
type SpecFailure (line 96) | type SpecFailure struct
type SpecMeasurement (line 106) | type SpecMeasurement struct
method PrecisionFmt (line 125) | func (s SpecMeasurement) PrecisionFmt() string {
type SpecState (line 135) | type SpecState
method IsFailure (line 148) | func (state SpecState) IsFailure() bool {
constant SpecStateInvalid (line 138) | SpecStateInvalid SpecState = iota
constant SpecStatePending (line 140) | SpecStatePending
constant SpecStateSkipped (line 141) | SpecStateSkipped
constant SpecStatePassed (line 142) | SpecStatePassed
constant SpecStateFailed (line 143) | SpecStateFailed
constant SpecStatePanicked (line 144) | SpecStatePanicked
constant SpecStateTimedOut (line 145) | SpecStateTimedOut
type SpecComponentType (line 152) | type SpecComponentType
constant SpecComponentTypeInvalid (line 155) | SpecComponentTypeInvalid SpecComponentType = iota
constant SpecComponentTypeContainer (line 157) | SpecComponentTypeContainer
constant SpecComponentTypeBeforeSuite (line 158) | SpecComponentTypeBeforeSuite
constant SpecComponentTypeAfterSuite (line 159) | SpecComponentTypeAfterSuite
constant SpecComponentTypeBeforeEach (line 160) | SpecComponentTypeBeforeEach
constant SpecComponentTypeJustBeforeEach (line 161) | SpecComponentTypeJustBeforeEach
constant SpecComponentTypeJustAfterEach (line 162) | SpecComponentTypeJustAfterEach
constant SpecComponentTypeAfterEach (line 163) | SpecComponentTypeAfterEach
constant SpecComponentTypeIt (line 164) | SpecComponentTypeIt
constant SpecComponentTypeMeasure (line 165) | SpecComponentTypeMeasure
type FlagType (line 168) | type FlagType
constant FlagTypeNone (line 171) | FlagTypeNone FlagType = iota
constant FlagTypeFocused (line 172) | FlagTypeFocused
constant FlagTypePending (line 173) | FlagTypePending
FILE: vendor/github.com/onsi/gomega/format/format.go
type GomegaStringer (line 61) | type GomegaStringer interface
function Message (line 82) | func Message(actual interface{}, message string, expected ...interface{}...
function MessageWithDiff (line 102) | func MessageWithDiff(actual, message, expected string) string {
function escapedWithGoSyntax (line 128) | func escapedWithGoSyntax(str string) string {
function truncateAndFormat (line 133) | func truncateAndFormat(str string, index int) string {
function findFirstMismatch (line 154) | func findFirstMismatch(a, b string) int {
constant truncateHelpText (line 174) | truncateHelpText = `
function truncateLongStrings (line 182) | func truncateLongStrings(s string) string {
function Object (line 212) | func Object(object interface{}, indentation uint) string {
function IndentString (line 221) | func IndentString(s string, indentation uint) string {
function formatType (line 235) | func formatType(v reflect.Value) string {
function formatValue (line 252) | func formatValue(value reflect.Value, indentation uint) string {
function formatString (line 329) | func formatString(object interface{}, indentation uint) string {
function formatSlice (line 351) | func formatSlice(v reflect.Value, indentation uint) string {
function formatMap (line 373) | func formatMap(v reflect.Value, indentation uint) string {
function formatStruct (line 393) | func formatStruct(v reflect.Value, indentation uint) string {
function formatInterface (line 415) | func formatInterface(v reflect.Value, indentation uint) string {
function isNilValue (line 419) | func isNilValue(a reflect.Value) bool {
function isPrintableString (line 433) | func isPrintableString(str string) bool {
FILE: vendor/github.com/onsi/gomega/gomega_dsl.go
constant GOMEGA_VERSION (line 25) | GOMEGA_VERSION = "1.17.0"
constant nilGomegaPanic (line 27) | nilGomegaPanic = `You are trying to make an assertion, but haven't regis...
function NewGomega (line 54) | func NewGomega(fail types.GomegaFailHandler) Gomega {
function NewWithT (line 81) | func NewWithT(t types.GomegaTestingT) *WithT {
function RegisterFailHandler (line 90) | func RegisterFailHandler(fail types.GomegaFailHandler) {
function RegisterFailHandlerWithT (line 96) | func RegisterFailHandlerWithT(_ types.GomegaTestingT, fail types.GomegaF...
function RegisterTestingT (line 103) | func RegisterTestingT(t types.GomegaTestingT) {
function InterceptGomegaFailures (line 114) | func InterceptGomegaFailures(f func()) []string {
function InterceptGomegaFailure (line 133) | func InterceptGomegaFailure(f func()) (err error) {
function ensureDefaultGomegaIsConfigured (line 153) | func ensureDefaultGomegaIsConfigured() {
function Ω (line 176) | func Ω(actual interface{}, extra ...interface{}) Assertion {
function Expect (line 198) | func Expect(actual interface{}, extra ...interface{}) Assertion {
function ExpectWithOffset (line 213) | func ExpectWithOffset(offset int, actual interface{}, extra ...interface...
function Eventually (line 308) | func Eventually(actual interface{}, intervals ...interface{}) AsyncAsser...
function EventuallyWithOffset (line 322) | func EventuallyWithOffset(offset int, actual interface{}, intervals ...i...
function Consistently (line 342) | func Consistently(actual interface{}, intervals ...interface{}) AsyncAss...
function ConsistentlyWithOffset (line 353) | func ConsistentlyWithOffset(offset int, actual interface{}, intervals .....
function SetDefaultEventuallyTimeout (line 359) | func SetDefaultEventuallyTimeout(t time.Duration) {
function SetDefaultEventuallyPollingInterval (line 364) | func SetDefaultEventuallyPollingInterval(t time.Duration) {
function SetDefaultConsistentlyDuration (line 369) | func SetDefaultConsistentlyDuration(t time.Duration) {
function SetDefaultConsistentlyPollingInterval (line 374) | func SetDefaultConsistentlyPollingInterval(t time.Duration) {
FILE: vendor/github.com/onsi/gomega/internal/assertion.go
type Assertion (line 10) | type Assertion struct
method WithOffset (line 31) | func (assertion *Assertion) WithOffset(offset int) types.Assertion {
method Error (line 36) | func (assertion *Assertion) Error() types.Assertion {
method Should (line 46) | func (assertion *Assertion) Should(matcher types.GomegaMatcher, option...
method ShouldNot (line 51) | func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, opt...
method To (line 56) | func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDe...
method ToNot (line 61) | func (assertion *Assertion) ToNot(matcher types.GomegaMatcher, optiona...
method NotTo (line 66) | func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optiona...
method buildDescription (line 71) | func (assertion *Assertion) buildDescription(optionalDescription ...in...
method match (line 83) | func (assertion *Assertion) match(matcher types.GomegaMatcher, desired...
method vetActuals (line 110) | func (assertion *Assertion) vetActuals(optionalDescription ...interfac...
method vetError (line 126) | func (assertion *Assertion) vetError(optionalDescription ...interface{...
type vetinari (line 19) | type vetinari
function NewAssertion (line 21) | func NewAssertion(actualInput interface{}, g *Gomega, offset int, extra ...
function vetActuals (line 136) | func vetActuals(actuals []interface{}, skipIndex int) (bool, string) {
FILE: vendor/github.com/onsi/gomega/internal/async_assertion.go
type AsyncAssertionType (line 13) | type AsyncAssertionType
constant AsyncAssertionTypeEventually (line 16) | AsyncAssertionTypeEventually AsyncAssertionType = iota
constant AsyncAssertionTypeConsistently (line 17) | AsyncAssertionTypeConsistently
type AsyncAssertion (line 20) | type AsyncAssertion struct
method WithOffset (line 90) | func (assertion *AsyncAssertion) WithOffset(offset int) types.AsyncAss...
method WithTimeout (line 95) | func (assertion *AsyncAssertion) WithTimeout(interval time.Duration) t...
method WithPolling (line 100) | func (assertion *AsyncAssertion) WithPolling(interval time.Duration) t...
method Should (line 105) | func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, o...
method ShouldNot (line 110) | func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher...
method buildDescription (line 115) | func (assertion *AsyncAssertion) buildDescription(optionalDescription ...
method pollActual (line 127) | func (assertion *AsyncAssertion) pollActual() (interface{}, error) {
method matcherMayChange (line 148) | func (assertion *AsyncAssertion) matcherMayChange(matcher types.Gomega...
method match (line 155) | func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, de...
function NewAsyncAssertion (line 33) | func NewAsyncAssertion(asyncType AsyncAssertionType, actualInput interfa...
FILE: vendor/github.com/onsi/gomega/internal/duration_bundle.go
type DurationBundle (line 10) | type DurationBundle struct
constant EventuallyTimeoutEnvVarName (line 18) | EventuallyTimeoutEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT"
constant EventuallyPollingIntervalEnvVarName (line 19) | EventuallyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_EVENTUALLY_POLLING...
constant ConsistentlyDurationEnvVarName (line 21) | ConsistentlyDurationEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_DUR...
constant ConsistentlyPollingIntervalEnvVarName (line 22) | ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POL...
function FetchDefaultDurationBundle (line 25) | func FetchDefaultDurationBundle() DurationBundle {
function durationFromEnv (line 35) | func durationFromEnv(key string, defaultDuration time.Duration) time.Dur...
function toDuration (line 47) | func toDuration(input interface{}) time.Duration {
FILE: vendor/github.com/onsi/gomega/internal/gomega.go
type Gomega (line 9) | type Gomega struct
method IsConfigured (line 23) | func (g *Gomega) IsConfigured() bool {
method ConfigureWithFailHandler (line 27) | func (g *Gomega) ConfigureWithFailHandler(fail types.GomegaFailHandler...
method ConfigureWithT (line 33) | func (g *Gomega) ConfigureWithT(t types.GomegaTestingT) *Gomega {
method Ω (line 42) | func (g *Gomega) Ω(actual interface{}, extra ...interface{}) types.Ass...
method Expect (line 46) | func (g *Gomega) Expect(actual interface{}, extra ...interface{}) type...
method ExpectWithOffset (line 50) | func (g *Gomega) ExpectWithOffset(offset int, actual interface{}, extr...
method Eventually (line 54) | func (g *Gomega) Eventually(actual interface{}, intervals ...interface...
method EventuallyWithOffset (line 58) | func (g *Gomega) EventuallyWithOffset(offset int, actual interface{}, ...
method Consistently (line 71) | func (g *Gomega) Consistently(actual interface{}, intervals ...interfa...
method ConsistentlyWithOffset (line 75) | func (g *Gomega) ConsistentlyWithOffset(offset int, actual interface{}...
method SetDefaultEventuallyTimeout (line 88) | func (g *Gomega) SetDefaultEventuallyTimeout(t time.Duration) {
method SetDefaultEventuallyPollingInterval (line 92) | func (g *Gomega) SetDefaultEventuallyPollingInterval(t time.Duration) {
method SetDefaultConsistentlyDuration (line 96) | func (g *Gomega) SetDefaultConsistentlyDuration(t time.Duration) {
method SetDefaultConsistentlyPollingInterval (line 100) | func (g *Gomega) SetDefaultConsistentlyPollingInterval(t time.Duration) {
function NewGomega (line 15) | func NewGomega(bundle DurationBundle) *Gomega {
FILE: vendor/github.com/onsi/gomega/matchers.go
function Equal (line 13) | func Equal(expected interface{}) types.GomegaMatcher {
function BeEquivalentTo (line 23) | func BeEquivalentTo(expected interface{}) types.GomegaMatcher {
function BeIdenticalTo (line 32) | func BeIdenticalTo(expected interface{}) types.GomegaMatcher {
function BeNil (line 39) | func BeNil() types.GomegaMatcher {
function BeTrue (line 44) | func BeTrue() types.GomegaMatcher {
function BeFalse (line 49) | func BeFalse() types.GomegaMatcher {
function HaveOccurred (line 57) | func HaveOccurred() types.GomegaMatcher {
function Succeed (line 72) | func Succeed() types.GomegaMatcher {
function MatchError (line 83) | func MatchError(expected interface{}) types.GomegaMatcher {
function BeClosed (line 100) | func BeClosed() types.GomegaMatcher {
function Receive (line 139) | func Receive(args ...interface{}) types.GomegaMatcher {
function BeSent (line 162) | func BeSent(arg interface{}) types.GomegaMatcher {
function MatchRegexp (line 171) | func MatchRegexp(regexp string, args ...interface{}) types.GomegaMatcher {
function ContainSubstring (line 181) | func ContainSubstring(substr string, args ...interface{}) types.GomegaMa...
function HavePrefix (line 191) | func HavePrefix(prefix string, args ...interface{}) types.GomegaMatcher {
function HaveSuffix (line 201) | func HaveSuffix(suffix string, args ...interface{}) types.GomegaMatcher {
function MatchJSON (line 211) | func MatchJSON(json interface{}) types.GomegaMatcher {
function MatchXML (line 220) | func MatchXML(xml interface{}) types.GomegaMatcher {
function MatchYAML (line 229) | func MatchYAML(yaml interface{}) types.GomegaMatcher {
function BeEmpty (line 236) | func BeEmpty() types.GomegaMatcher {
function HaveLen (line 241) | func HaveLen(count int) types.GomegaMatcher {
function HaveCap (line 248) | func HaveCap(count int) types.GomegaMatcher {
function BeZero (line 255) | func BeZero() types.GomegaMatcher {
function ContainElement (line 266) | func ContainElement(element interface{}) types.GomegaMatcher {
function BeElementOf (line 282) | func BeElementOf(elements ...interface{}) types.GomegaMatcher {
function ConsistOf (line 303) | func ConsistOf(elements ...interface{}) types.GomegaMatcher {
function ContainElements (line 317) | func ContainElements(elements ...interface{}) types.GomegaMatcher {
function HaveKey (line 327) | func HaveKey(key interface{}) types.GomegaMatcher {
function HaveKeyWithValue (line 338) | func HaveKeyWithValue(key interface{}, value interface{}) types.GomegaMa...
function HaveField (line 366) | func HaveField(field string, expected interface{}) types.GomegaMatcher {
function BeNumerically (line 384) | func BeNumerically(comparator string, compareTo ...interface{}) types.Go...
function BeTemporally (line 395) | func BeTemporally(comparator string, compareTo time.Time, threshold ...t...
function BeAssignableToTypeOf (line 409) | func BeAssignableToTypeOf(expected interface{}) types.GomegaMatcher {
function Panic (line 417) | func Panic() types.GomegaMatcher {
function PanicWith (line 427) | func PanicWith(expected interface{}) types.GomegaMatcher {
function BeAnExistingFile (line 433) | func BeAnExistingFile() types.GomegaMatcher {
function BeARegularFile (line 439) | func BeARegularFile() types.GomegaMatcher {
function BeADirectory (line 445) | func BeADirectory() types.GomegaMatcher {
function HaveHTTPStatus (line 455) | func HaveHTTPStatus(expected ...interface{}) types.GomegaMatcher {
function HaveHTTPHeaderWithValue (line 463) | func HaveHTTPHeaderWithValue(header string, value interface{}) types.Gom...
function HaveHTTPBody (line 473) | func HaveHTTPBody(expected interface{}) types.GomegaMatcher {
function And (line 482) | func And(ms ...types.GomegaMatcher) types.GomegaMatcher {
function SatisfyAll (line 488) | func SatisfyAll(matchers ...types.GomegaMatcher) types.GomegaMatcher {
function Or (line 497) | func Or(ms ...types.GomegaMatcher) types.GomegaMatcher {
function SatisfyAny (line 503) | func SatisfyAny(matchers ...types.GomegaMatcher) types.GomegaMatcher {
function Not (line 511) | func Not(matcher types.GomegaMatcher) types.GomegaMatcher {
function WithTransform (line 526) | func WithTransform(transform interface{}, matcher types.GomegaMatcher) t...
function Satisfy (line 534) | func Satisfy(predicate interface{}) types.GomegaMatcher {
FILE: vendor/github.com/onsi/gomega/matchers/and.go
type AndMatcher (line 10) | type AndMatcher struct
method Match (line 17) | func (m *AndMatcher) Match(actual interface{}) (success bool, err erro...
method FailureMessage (line 29) | func (m *AndMatcher) FailureMessage(actual interface{}) (message strin...
method NegatedFailureMessage (line 33) | func (m *AndMatcher) NegatedFailureMessage(actual interface{}) (messag...
method MatchMayChangeInTheFuture (line 38) | func (m *AndMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
FILE: vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go
type AssignableToTypeOfMatcher (line 12) | type AssignableToTypeOfMatcher struct
method Match (line 16) | func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (s...
method FailureMessage (line 31) | func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interf...
method NegatedFailureMessage (line 35) | func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual...
FILE: vendor/github.com/onsi/gomega/matchers/attributes_slice.go
type attributesSlice (line 8) | type attributesSlice
method Len (line 10) | func (attrs attributesSlice) Len() int { return len(attrs) }
method Less (line 11) | func (attrs attributesSlice) Less(i, j int) bool {
method Swap (line 14) | func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = att...
FILE: vendor/github.com/onsi/gomega/matchers/be_a_directory.go
type notADirectoryError (line 12) | type notADirectoryError struct
method Error (line 16) | func (t notADirectoryError) Error() string {
type BeADirectoryMatcher (line 26) | type BeADirectoryMatcher struct
method Match (line 31) | func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success...
method FailureMessage (line 50) | func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{})...
method NegatedFailureMessage (line 54) | func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual inter...
FILE: vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go
type notARegularFileError (line 12) | type notARegularFileError struct
method Error (line 16) | func (t notARegularFileError) Error() string {
type BeARegularFileMatcher (line 26) | type BeARegularFileMatcher struct
method Match (line 31) | func (matcher *BeARegularFileMatcher) Match(actual interface{}) (succe...
method FailureMessage (line 50) | func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{...
method NegatedFailureMessage (line 54) | func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual int...
FILE: vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go
type BeAnExistingFileMatcher (line 12) | type BeAnExistingFileMatcher struct
method Match (line 16) | func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (suc...
method FailureMessage (line 34) | func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interfac...
method NegatedFailureMessage (line 38) | func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual i...
FILE: vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go
type BeClosedMatcher (line 12) | type BeClosedMatcher struct
method Match (line 15) | func (matcher *BeClosedMatcher) Match(actual interface{}) (success boo...
method FailureMessage (line 42) | func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (me...
method NegatedFailureMessage (line 46) | func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface...
FILE: vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go
type BeElementOfMatcher (line 12) | type BeElementOfMatcher struct
method Match (line 16) | func (matcher *BeElementOfMatcher) Match(actual interface{}) (success ...
method FailureMessage (line 37) | func (matcher *BeElementOfMatcher) FailureMessage(actual interface{}) ...
method NegatedFailureMessage (line 41) | func (matcher *BeElementOfMatcher) NegatedFailureMessage(actual interf...
FILE: vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go
type BeEmptyMatcher (line 11) | type BeEmptyMatcher struct
method Match (line 14) | func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 23) | func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 27) | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go
type BeEquivalentToMatcher (line 12) | type BeEquivalentToMatcher struct
method Match (line 16) | func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (succe...
method FailureMessage (line 30) | func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{...
method NegatedFailureMessage (line 34) | func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual int...
FILE: vendor/github.com/onsi/gomega/matchers/be_false_matcher.go
type BeFalseMatcher (line 11) | type BeFalseMatcher struct
method Match (line 14) | func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 22) | func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 26) | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/be_identical_to.go
type BeIdenticalToMatcher (line 12) | type BeIdenticalToMatcher struct
method Match (line 16) | func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (succes...
method FailureMessage (line 33) | func (matcher *BeIdenticalToMatcher) FailureMessage(actual interface{}...
method NegatedFailureMessage (line 37) | func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual inte...
FILE: vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go
type BeNilMatcher (line 7) | type BeNilMatcher struct
method Match (line 10) | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, ...
method FailureMessage (line 14) | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (messa...
method NegatedFailureMessage (line 18) | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{})...
FILE: vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go
type BeNumericallyMatcher (line 12) | type BeNumericallyMatcher struct
method FailureMessage (line 17) | func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}...
method NegatedFailureMessage (line 21) | func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual inte...
method FormatFailureMessage (line 25) | func (matcher *BeNumericallyMatcher) FormatFailureMessage(actual inter...
method Match (line 37) | func (matcher *BeNumericallyMatcher) Match(actual interface{}) (succes...
method matchIntegers (line 82) | func (matcher *BeNumericallyMatcher) matchIntegers(actual, compareTo, ...
method matchUnsignedIntegers (line 99) | func (matcher *BeNumericallyMatcher) matchUnsignedIntegers(actual, com...
method matchFloats (line 118) | func (matcher *BeNumericallyMatcher) matchFloats(actual, compareTo, th...
FILE: vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go
type BeSentMatcher (line 12) | type BeSentMatcher struct
method Match (line 17) | func (matcher *BeSentMatcher) Match(actual interface{}) (success bool,...
method FailureMessage (line 59) | func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (mess...
method NegatedFailureMessage (line 63) | func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}...
method MatchMayChangeInTheFuture (line 67) | func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interfa...
FILE: vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go
type BeTemporallyMatcher (line 12) | type BeTemporallyMatcher struct
method FailureMessage (line 18) | func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{})...
method NegatedFailureMessage (line 22) | func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual inter...
method Match (line 26) | func (matcher *BeTemporallyMatcher) Match(actual interface{}) (bool, e...
method matchTimes (line 51) | func (matcher *BeTemporallyMatcher) matchTimes(actual, compareTo time....
FILE: vendor/github.com/onsi/gomega/matchers/be_true_matcher.go
type BeTrueMatcher (line 11) | type BeTrueMatcher struct
method Match (line 14) | func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool,...
method FailureMessage (line 22) | func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (mess...
method NegatedFailureMessage (line 26) | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}...
FILE: vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go
type BeZeroMatcher (line 9) | type BeZeroMatcher struct
method Match (line 12) | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool,...
method FailureMessage (line 22) | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (mess...
method NegatedFailureMessage (line 26) | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}...
FILE: vendor/github.com/onsi/gomega/matchers/consist_of.go
type ConsistOfMatcher (line 13) | type ConsistOfMatcher struct
method Match (line 19) | func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bo...
method FailureMessage (line 124) | func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (m...
method NegatedFailureMessage (line 142) | func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interfac...
function neighbours (line 44) | func neighbours(value, matcher interface{}) (bool, error) {
function equalMatchersToElements (line 49) | func equalMatchersToElements(matchers []interface{}) (elements []interfa...
function flatten (line 60) | func flatten(elems []interface{}) []interface{} {
function matchers (line 73) | func matchers(expectedElems []interface{}) (matchers []interface{}) {
function presentable (line 84) | func presentable(elems []interface{}) interface{} {
function valuesOf (line 107) | func valuesOf(actual interface{}) []interface{} {
function appendMissingElements (line 134) | func appendMissingElements(message string, missingElements []interface{}...
FILE: vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go
type ContainElementMatcher (line 12) | type ContainElementMatcher struct
method Match (line 16) | func (matcher *ContainElementMatcher) Match(actual interface{}) (succe...
method FailureMessage (line 54) | func (matcher *ContainElementMatcher) FailureMessage(actual interface{...
method NegatedFailureMessage (line 58) | func (matcher *ContainElementMatcher) NegatedFailureMessage(actual int...
FILE: vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go
type ContainElementsMatcher (line 10) | type ContainElementsMatcher struct
method Match (line 15) | func (matcher *ContainElementsMatcher) Match(actual interface{}) (succ...
method FailureMessage (line 37) | func (matcher *ContainElementsMatcher) FailureMessage(actual interface...
method NegatedFailureMessage (line 42) | func (matcher *ContainElementsMatcher) NegatedFailureMessage(actual in...
FILE: vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go
type ContainSubstringMatcher (line 12) | type ContainSubstringMatcher struct
method Match (line 17) | func (matcher *ContainSubstringMatcher) Match(actual interface{}) (suc...
method stringToMatch (line 26) | func (matcher *ContainSubstringMatcher) stringToMatch() string {
method FailureMessage (line 34) | func (matcher *ContainSubstringMatcher) FailureMessage(actual interfac...
method NegatedFailureMessage (line 38) | func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual i...
FILE: vendor/github.com/onsi/gomega/matchers/equal_matcher.go
type EqualMatcher (line 11) | type EqualMatcher struct
method Match (line 15) | func (matcher *EqualMatcher) Match(actual interface{}) (success bool, ...
method FailureMessage (line 30) | func (matcher *EqualMatcher) FailureMessage(actual interface{}) (messa...
method NegatedFailureMessage (line 40) | func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{})...
FILE: vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go
type HaveCapMatcher (line 11) | type HaveCapMatcher struct
method Match (line 15) | func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 24) | func (matcher *HaveCapMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 28) | func (matcher *HaveCapMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/have_field.go
function extractField (line 11) | func extractField(actual interface{}, field string) (interface{}, error) {
type HaveFieldMatcher (line 45) | type HaveFieldMatcher struct
method Match (line 53) | func (matcher *HaveFieldMatcher) Match(actual interface{}) (success bo...
method FailureMessage (line 68) | func (matcher *HaveFieldMatcher) FailureMessage(actual interface{}) (m...
method NegatedFailureMessage (line 75) | func (matcher *HaveFieldMatcher) NegatedFailureMessage(actual interfac...
FILE: vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go
type HaveHTTPBodyMatcher (line 13) | type HaveHTTPBodyMatcher struct
method Match (line 18) | func (matcher *HaveHTTPBodyMatcher) Match(actual interface{}) (bool, e...
method FailureMessage (line 36) | func (matcher *HaveHTTPBodyMatcher) FailureMessage(actual interface{})...
method NegatedFailureMessage (line 54) | func (matcher *HaveHTTPBodyMatcher) NegatedFailureMessage(actual inter...
method body (line 75) | func (matcher *HaveHTTPBodyMatcher) body(actual interface{}) ([]byte, ...
FILE: vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go
type HaveHTTPHeaderWithValueMatcher (line 12) | type HaveHTTPHeaderWithValueMatcher struct
method Match (line 17) | func (matcher *HaveHTTPHeaderWithValueMatcher) Match(actual interface{...
method FailureMessage (line 31) | func (matcher *HaveHTTPHeaderWithValueMatcher) FailureMessage(actual i...
method NegatedFailureMessage (line 46) | func (matcher *HaveHTTPHeaderWithValueMatcher) NegatedFailureMessage(a...
method getSubMatcher (line 61) | func (matcher *HaveHTTPHeaderWithValueMatcher) getSubMatcher() (types....
method extractHeader (line 72) | func (matcher *HaveHTTPHeaderWithValueMatcher) extractHeader(actual in...
FILE: vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go
type HaveHTTPStatusMatcher (line 14) | type HaveHTTPStatusMatcher struct
method Match (line 18) | func (matcher *HaveHTTPStatusMatcher) Match(actual interface{}) (succe...
method FailureMessage (line 51) | func (matcher *HaveHTTPStatusMatcher) FailureMessage(actual interface{...
method NegatedFailureMessage (line 55) | func (matcher *HaveHTTPStatusMatcher) NegatedFailureMessage(actual int...
method expectedString (line 59) | func (matcher *HaveHTTPStatusMatcher) expectedString() string {
function formatHttpResponse (line 67) | func formatHttpResponse(input interface{}) string {
FILE: vendor/github.com/onsi/gomega/matchers/have_key_matcher.go
type HaveKeyMatcher (line 12) | type HaveKeyMatcher struct
method Match (line 16) | func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 40) | func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 49) | func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go
type HaveKeyWithValueMatcher (line 12) | type HaveKeyWithValueMatcher struct
method Match (line 17) | func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (suc...
method FailureMessage (line 51) | func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interfac...
method NegatedFailureMessage (line 64) | func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual i...
FILE: vendor/github.com/onsi/gomega/matchers/have_len_matcher.go
type HaveLenMatcher (line 9) | type HaveLenMatcher struct
method Match (line 13) | func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 22) | func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 26) | func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go
type HaveOccurredMatcher (line 11) | type HaveOccurredMatcher struct
method Match (line 14) | func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success...
method FailureMessage (line 29) | func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{})...
method NegatedFailureMessage (line 33) | func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual inter...
FILE: vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go
type HavePrefixMatcher (line 9) | type HavePrefixMatcher struct
method Match (line 14) | func (matcher *HavePrefixMatcher) Match(actual interface{}) (success b...
method prefix (line 23) | func (matcher *HavePrefixMatcher) prefix() string {
method FailureMessage (line 30) | func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (...
method NegatedFailureMessage (line 34) | func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interfa...
FILE: vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go
type HaveSuffixMatcher (line 9) | type HaveSuffixMatcher struct
method Match (line 14) | func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success b...
method suffix (line 23) | func (matcher *HaveSuffixMatcher) suffix() string {
method FailureMessage (line 30) | func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (...
method NegatedFailureMessage (line 34) | func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interfa...
FILE: vendor/github.com/onsi/gomega/matchers/match_error_matcher.go
type MatchErrorMatcher (line 11) | type MatchErrorMatcher struct
method Match (line 15) | func (matcher *MatchErrorMatcher) Match(actual interface{}) (success b...
method FailureMessage (line 49) | func (matcher *MatchErrorMatcher) FailureMessage(actual interface{}) (...
method NegatedFailureMessage (line 53) | func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual interfa...
FILE: vendor/github.com/onsi/gomega/matchers/match_json_matcher.go
type MatchJSONMatcher (line 11) | type MatchJSONMatcher struct
method Match (line 16) | func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bo...
method FailureMessage (line 33) | func (matcher *MatchJSONMatcher) FailureMessage(actual interface{}) (m...
method NegatedFailureMessage (line 38) | func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual interfac...
method prettyPrint (line 43) | func (matcher *MatchJSONMatcher) prettyPrint(actual interface{}) (actu...
FILE: vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go
type MatchRegexpMatcher (line 10) | type MatchRegexpMatcher struct
method Match (line 15) | func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success ...
method FailureMessage (line 29) | func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) ...
method NegatedFailureMessage (line 33) | func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interf...
method regexp (line 37) | func (matcher *MatchRegexpMatcher) regexp() string {
FILE: vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go
type MatchXMLMatcher (line 17) | type MatchXMLMatcher struct
method Match (line 21) | func (matcher *MatchXMLMatcher) Match(actual interface{}) (success boo...
method FailureMessage (line 40) | func (matcher *MatchXMLMatcher) FailureMessage(actual interface{}) (me...
method NegatedFailureMessage (line 45) | func (matcher *MatchXMLMatcher) NegatedFailureMessage(actual interface...
method formattedPrint (line 50) | func (matcher *MatchXMLMatcher) formattedPrint(actual interface{}) (ac...
function parseXmlContent (line 63) | func parseXmlContent(content string) (*xmlNode, error) {
function newXmlDecoder (line 112) | func newXmlDecoder(reader io.Reader) *xml.Decoder {
function trimParentNodesContentSpaces (line 118) | func trimParentNodesContentSpaces(node *xmlNode) {
type xmlNode (line 127) | type xmlNode struct
FILE: vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go
type MatchYAMLMatcher (line 11) | type MatchYAMLMatcher struct
method Match (line 16) | func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bo...
method FailureMessage (line 37) | func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (m...
method NegatedFailureMessage (line 42) | func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interfac...
method toNormalisedStrings (line 47) | func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{...
method toStrings (line 65) | func (matcher *MatchYAMLMatcher) toStrings(actual interface{}) (actual...
function normalise (line 52) | func normalise(input string) string {
FILE: vendor/github.com/onsi/gomega/matchers/not.go
type NotMatcher (line 7) | type NotMatcher struct
method Match (line 11) | func (m *NotMatcher) Match(actual interface{}) (bool, error) {
method FailureMessage (line 19) | func (m *NotMatcher) FailureMessage(actual interface{}) (message strin...
method NegatedFailureMessage (line 23) | func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (messag...
method MatchMayChangeInTheFuture (line 27) | func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
FILE: vendor/github.com/onsi/gomega/matchers/or.go
type OrMatcher (line 10) | type OrMatcher struct
method Match (line 17) | func (m *OrMatcher) Match(actual interface{}) (success bool, err error) {
method FailureMessage (line 32) | func (m *OrMatcher) FailureMessage(actual interface{}) (message string) {
method NegatedFailureMessage (line 37) | func (m *OrMatcher) NegatedFailureMessage(actual interface{}) (message...
method MatchMayChangeInTheFuture (line 41) | func (m *OrMatcher) MatchMayChangeInTheFuture(actual interface{}) bool {
FILE: vendor/github.com/onsi/gomega/matchers/panic_matcher.go
type PanicMatcher (line 10) | type PanicMatcher struct
method Match (line 15) | func (matcher *PanicMatcher) Match(actual interface{}) (success bool, ...
method FailureMessage (line 55) | func (matcher *PanicMatcher) FailureMessage(actual interface{}) (messa...
method NegatedFailureMessage (line 94) | func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{})...
FILE: vendor/github.com/onsi/gomega/matchers/receive_matcher.go
type ReceiveMatcher (line 12) | type ReceiveMatcher struct
method Match (line 18) | func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 90) | func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 107) | func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{...
method MatchMayChangeInTheFuture (line 124) | func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interf...
FILE: vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go
type SatisfyMatcher (line 10) | type SatisfyMatcher struct
method Match (line 38) | func (m *SatisfyMatcher) Match(actual interface{}) (success bool, err ...
method FailureMessage (line 60) | func (m *SatisfyMatcher) FailureMessage(actual interface{}) (message s...
method NegatedFailureMessage (line 64) | func (m *SatisfyMatcher) NegatedFailureMessage(actual interface{}) (me...
function NewSatisfyMatcher (line 17) | func NewSatisfyMatcher(predicate interface{}) *SatisfyMatcher {
FILE: vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go
function formattedMessage (line 11) | func formattedMessage(comparisonMessage string, failurePath []interface{...
function formattedFailurePath (line 21) | func formattedFailurePath(failurePath []interface{}) string {
function deepEqual (line 37) | func deepEqual(a interface{}, b interface{}) (bool, []interface{}) {
FILE: vendor/github.com/onsi/gomega/matchers/succeed_matcher.go
type SucceedMatcher (line 9) | type SucceedMatcher struct
method Match (line 12) | func (matcher *SucceedMatcher) Match(actual interface{}) (success bool...
method FailureMessage (line 27) | func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (mes...
method NegatedFailureMessage (line 31) | func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{...
FILE: vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go
type BipartiteGraph (line 8) | type BipartiteGraph struct
method FreeLeftRight (line 44) | func (bg *BipartiteGraph) FreeLeftRight(edges EdgeSet) (leftValues, ri...
function NewBipartiteGraph (line 14) | func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours...
FILE: vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go
method LargestMatching (line 12) | func (bg *BipartiteGraph) LargestMatching() (matching EdgeSet) {
method maximalDisjointSLAPCollection (line 25) | func (bg *BipartiteGraph) maximalDisjointSLAPCollection(matching EdgeSet...
method findDisjointSLAP (line 47) | func (bg *BipartiteGraph) findDisjointSLAP(
method findDisjointSLAPHelper (line 56) | func (bg *BipartiteGraph) findDisjointSLAPHelper(
method createSLAPGuideLayers (line 96) | func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guide...
FILE: vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go
type Edge (line 5) | type Edge struct
type EdgeSet (line 10) | type EdgeSet
method Free (line 12) | func (ec EdgeSet) Free(node Node) bool {
method Contains (line 22) | func (ec EdgeSet) Contains(edge Edge) bool {
method FindByNodes (line 32) | func (ec EdgeSet) FindByNodes(node1, node2 Node) (Edge, bool) {
method SymmetricDifference (line 42) | func (ec EdgeSet) SymmetricDifference(ec2 EdgeSet) EdgeSet {
FILE: vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go
type Node (line 3) | type Node struct
type NodeOrderedSet (line 8) | type NodeOrderedSet
FILE: vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go
function Odd (line 5) | func Odd(n int) bool {
FILE: vendor/github.com/onsi/gomega/matchers/type_support.go
type omegaMatcher (line 20) | type omegaMatcher interface
function isBool (line 26) | func isBool(a interface{}) bool {
function isNumber (line 30) | func isNumber(a interface{}) bool {
function isInteger (line 38) | func isInteger(a interface{}) bool {
function isUnsignedInteger (line 43) | func isUnsignedInteger(a interface{}) bool {
function isFloat (line 48) | func isFloat(a interface{}) bool {
function toInteger (line 53) | func toInteger(a interface{}) int64 {
function toUnsignedInteger (line 64) | func toUnsignedInteger(a interface{}) uint64 {
function toFloat (line 75) | func toFloat(a interface{}) float64 {
function isError (line 86) | func isError(a interface{}) bool {
function isChan (line 91) | func isChan(a interface{}) bool {
function isMap (line 98) | func isMap(a interface{}) bool {
function isArrayOrSlice (line 105) | func isArrayOrSlice(a interface{}) bool {
function isString (line 117) | func isString(a interface{}) bool {
function toString (line 124) | func toString(a interface{}) (string, bool) {
function lengthOf (line 148) | func lengthOf(a interface{}) (int, bool) {
function capOf (line 159) | func capOf(a interface{}) (int, bool) {
function isNil (line 171) | func isNil(a interface{}) bool {
FILE: vendor/github.com/onsi/gomega/matchers/with_transform.go
type WithTransformMatcher (line 10) | type WithTransformMatcher struct
method Match (line 46) | func (m *WithTransformMatcher) Match(actual interface{}) (bool, error) {
method FailureMessage (line 75) | func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message ...
method NegatedFailureMessage (line 79) | func (m *WithTransformMatcher) NegatedFailureMessage(_ interface{}) (m...
method MatchMayChangeInTheFuture (line 83) | func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}...
function NewWithTransformMatcher (line 25) | func NewWithTransformMatcher(transform interface{}, matcher types.Gomega...
FILE: vendor/github.com/onsi/gomega/types/types.go
type GomegaFailHandler (line 7) | type GomegaFailHandler
type GomegaTestingT (line 10) | type GomegaTestingT interface
type Gomega (line 16) | type Gomega interface
type GomegaMatcher (line 36) | type GomegaMatcher interface
type OracleMatcher (line 51) | type OracleMatcher interface
function MatchMayChangeInTheFuture (line 55) | func MatchMayChangeInTheFuture(matcher GomegaMatcher, value interface{})...
type AsyncAssertion (line 66) | type AsyncAssertion interface
type Assertion (line 76) | type Assertion interface
FILE: vendor/github.com/pkg/errors/errors.go
function New (line 102) | func New(message string) error {
function Errorf (line 112) | func Errorf(format string, args ...interface{}) error {
type fundamental (line 120) | type fundamental struct
method Error (line 125) | func (f *fundamental) Error() string { return f.msg }
method Format (line 127) | func (f *fundamental) Format(s fmt.State, verb rune) {
function WithStack (line 145) | func WithStack(err error) error {
type withStack (line 155) | type withStack struct
method Cause (line 160) | func (w *withStack) Cause() error { return w.error }
method Unwrap (line 163) | func (w *withStack) Unwrap() error { return w.error }
method Format (line 165) | func (w *withStack) Format(s fmt.State, verb rune) {
function Wrap (line 184) | func Wrap(err error, message string) error {
function Wrapf (line 201) | func Wrapf(err error, format string, args ...interface{}) error {
function WithMessage (line 217) | func WithMessage(err error, message string) error {
function WithMessagef (line 229) | func WithMessagef(err error, format string, args ...interface{}) error {
type withMessage (line 239) | type withMessage struct
method Error (line 244) | func (w *withMessage) Error() string { return w.msg + ": " + w.cause.E...
method Cause (line 245) | func (w *withMessage) Cause() error { return w.cause }
method Unwrap (line 248) | func (w *withMessage) Unwrap() error { return w.cause }
method Format (line 250) | func (w *withMessage) Format(s fmt.State, verb rune) {
function Cause (line 275) | func Cause(err error) error {
FILE: vendor/github.com/pkg/errors/go113.go
function Is (line 16) | func Is(err, target error) bool { return stderrors.Is(err, target) }
function As (line 31) | func As(err error, target interface{}) bool { return stderrors.As(err, t...
function Unwrap (line 36) | func Unwrap(err error) error {
FILE: vendor/github.com/pkg/errors/stack.go
type Frame (line 15) | type Frame
method pc (line 19) | func (f Frame) pc() uintptr { return uintptr(f) - 1 }
method file (line 23) | func (f Frame) file() string {
method line (line 34) | func (f Frame) line() int {
method name (line 44) | func (f Frame) name() string {
method Format (line 64) | func (f Frame) Format(s fmt.State, verb rune) {
method MarshalText (line 88) | func (f Frame) MarshalText() ([]byte, error) {
type StackTrace (line 97) | type StackTrace
method Format (line 107) | func (st StackTrace) Format(s fmt.State, verb rune) {
method formatSlice (line 128) | func (st StackTrace) formatSlice(s fmt.State, verb rune) {
type stack (line 140) | type stack
method Format (line 142) | func (s *stack) Format(st fmt.State, verb rune) {
method StackTrace (line 155) | func (s *stack) StackTrace() StackTrace {
function callers (line 163) | func callers() *stack {
function funcname (line 172) | func funcname(name string) string {
FILE: vendor/github.com/vishvananda/netlink/addr.go
type Addr (line 11) | type Addr struct
method String (line 24) | func (a Addr) String() string {
method Equal (line 45) | func (a Addr) Equal(x Addr) bool {
method PeerEqual (line 52) | func (a Addr) PeerEqual(x Addr) bool {
function ParseAddr (line 30) | func ParseAddr(s string) (*Addr, error) {
FILE: vendor/github.com/vishvananda/netlink/addr_linux.go
function AddrAdd (line 20) | func AddrAdd(link Link, addr *Addr) error {
method AddrAdd (line 30) | func (h *Handle) AddrAdd(link Link, addr *Addr) error {
function AddrReplace (line 41) | func AddrReplace(link Link, addr *Addr) error {
method AddrReplace (line 51) | func (h *Handle) AddrReplace(link Link, addr *Addr) error {
function AddrDel (line 62) | func AddrDel(link Link, addr *Addr) error {
method AddrDel (line 71) | func (h *Handle) AddrDel(link Link, addr *Addr) error {
method addrHandle (line 76) | func (h *Handle) addrHandle(link Link, addr *Addr, req *nl.NetlinkReques...
function AddrList (line 170) | func AddrList(link Link, family int) ([]Addr, error) {
method AddrList (line 177) | func (h *Handle) AddrList(link Link, family int) ([]Addr, error) {
function parseAddr (line 216) | func parseAddr(m []byte) (addr Addr, family int, err error) {
type AddrUpdate (line 286) | type AddrUpdate struct
function AddrSubscribe (line 298) | func AddrSubscribe(ch chan<- AddrUpdate, done <-chan struct{}) error {
function AddrSubscribeAt (line 304) | func AddrSubscribeAt(ns netns.NsHandle, ch chan<- AddrUpdate, done <-cha...
type AddrSubscribeOptions (line 310) | type AddrSubscribeOptions struct
function AddrSubscribeWithOptions (line 320) | func AddrSubscribeWithOptions(ch chan<- AddrUpdate, done <-chan struct{}...
function addrSubscribeAt (line 328) | func addrSubscribeAt(newNs, curNs netns.NsHandle, ch chan<- AddrUpdate, ...
FILE: vendor/github.com/vishvananda/netlink/bpf_linux.go
type BpfProgType (line 9) | type BpfProgType
constant BPF_PROG_TYPE_UNSPEC (line 12) | BPF_PROG_TYPE_UNSPEC BpfProgType = iota
constant BPF_PROG_TYPE_SOCKET_FILTER (line 13) | BPF_PROG_TYPE_SOCKET_FILTER
constant BPF_PROG_TYPE_KPROBE (line 14) | BPF_PROG_TYPE_KPROBE
constant BPF_PROG_TYPE_SCHED_CLS (line 15) | BPF_PROG_TYPE_SCHED_CLS
constant BPF_PROG_TYPE_SCHED_ACT (line 16) | BPF_PROG_TYPE_SCHED_ACT
constant BPF_PROG_TYPE_TRACEPOINT (line 17) | BPF_PROG_TYPE_TRACEPOINT
constant BPF_PROG_TYPE_XDP (line 18) | BPF_PROG_TYPE_XDP
constant BPF_PROG_TYPE_PERF_EVENT (line 19) | BPF_PROG_TYPE_PERF_EVENT
constant BPF_PROG_TYPE_CGROUP_SKB (line 20) | BPF_PROG_TYPE_CGROUP_SKB
constant BPF_PROG_TYPE_CGROUP_SOCK (line 21) | BPF_PROG_TYPE_CGROUP_SOCK
constant BPF_PROG_TYPE_LWT_IN (line 22) | BPF_PROG_TYPE_LWT_IN
constant BPF_PROG_TYPE_LWT_OUT (line 23) | BPF_PROG_TYPE_LWT_OUT
constant BPF_PROG_TYPE_LWT_XMIT (line 24) | BPF_PROG_TYPE_LWT_XMIT
constant BPF_PROG_TYPE_SOCK_OPS (line 25) | BPF_PROG_TYPE_SOCK_OPS
constant BPF_PROG_TYPE_SK_SKB (line 26) | BPF_PROG_TYPE_SK_SKB
constant BPF_PROG_TYPE_CGROUP_DEVICE (line 27) | BPF_PROG_TYPE_CGROUP_DEVICE
constant BPF_PROG_TYPE_SK_MSG (line 28) | BPF_PROG_TYPE_SK_MSG
constant BPF_PROG_TYPE_RAW_TRACEPOINT (line 29) | BPF_PROG_TYPE_RAW_TRACEPOINT
constant BPF_PROG_TYPE_CGROUP_SOCK_ADDR (line 30) | BPF_PROG_TYPE_CGROUP_SOCK_ADDR
constant BPF_PROG_TYPE_LWT_SEG6LOCAL (line 31) | BPF_PROG_TYPE_LWT_SEG6LOCAL
constant BPF_PROG_TYPE_LIRC_MODE2 (line 32) | BPF_PROG_TYPE_LIRC_MODE2
constant BPF_PROG_TYPE_SK_REUSEPORT (line 33) | BPF_PROG_TYPE_SK_REUSEPORT
constant BPF_PROG_TYPE_FLOW_DISSECTOR (line 34) | BPF_PROG_TYPE_FLOW_DISSECTOR
constant BPF_PROG_TYPE_CGROUP_SYSCTL (line 35) | BPF_PROG_TYPE_CGROUP_SYSCTL
constant BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE (line 36) | BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE
constant BPF_PROG_TYPE_CGROUP_SOCKOPT (line 37) | BPF_PROG_TYPE_CGROUP_SOCKOPT
constant BPF_PROG_TYPE_TRACING (line 38) | BPF_PROG_TYPE_TRACING
constant BPF_PROG_TYPE_STRUCT_OPS (line 39) | BPF_PROG_TYPE_STRUCT_OPS
constant BPF_PROG_TYPE_EXT (line 40) | BPF_PROG_TYPE_EXT
constant BPF_PROG_TYPE_LSM (line 41) | BPF_PROG_TYPE_LSM
constant BPF_PROG_TYPE_SK_LOOKUP (line 42) | BPF_PROG_TYPE_SK_LOOKUP
type BPFAttr (line 45) | type BPFAttr struct
function loadSimpleBpf (line 57) | func loadSimpleBpf(progType BpfProgType, ret uint32) (int, error) {
FILE: vendor/github.com/vishvananda/netlink/bridge_linux.go
function BridgeVlanList (line 12) | func BridgeVlanList() (map[int32][]*nl.BridgeVlanInfo, error) {
method BridgeVlanList (line 18) | func (h *Handle) BridgeVlanList() (map[int32][]*nl.BridgeVlanInfo, error) {
function BridgeVlanAdd (line 59) | func BridgeVlanAdd(link Link, vid uint16, pvid, untagged, self, master b...
method BridgeVlanAdd (line 65) | func (h *Handle) BridgeVlanAdd(link Link, vid uint16, pvid, untagged, se...
function BridgeVlanDel (line 71) | func BridgeVlanDel(link Link, vid uint16, pvid, untagged, self, master b...
method BridgeVlanDel (line 77) | func (h *Handle) BridgeVlanDel(link Link, vid uint16, pvid, untagged, se...
method bridgeVlanModify (line 81) | func (h *Handle) bridgeVlanModify(cmd int, link Link, vid uint16, pvid, ...
FILE: vendor/github.com/vishvananda/netlink/class.go
type Class (line 8) | type Class interface
type GnetStatsBasic (line 18) | type GnetStatsBasic struct
type GnetStatsRateEst (line 24) | type GnetStatsRateEst struct
type GnetStatsRateEst64 (line 30) | type GnetStatsRateEst64 struct
type GnetStatsQueue (line 36) | type GnetStatsQueue struct
type ClassStatistics (line 46) | type ClassStatistics struct
function NewClassStatistics (line 53) | func NewClassStatistics() *ClassStatistics {
type ClassAttrs (line 64) | type ClassAttrs struct
method String (line 72) | func (q ClassAttrs) String() string {
type HtbClassAttrs (line 77) | type HtbClassAttrs struct
method String (line 88) | func (q HtbClassAttrs) String() string {
type HtbClass (line 93) | type HtbClass struct
method String (line 104) | func (q HtbClass) String() string {
method Attrs (line 109) | func (q *HtbClass) Attrs() *ClassAttrs {
method Type (line 114) | func (q *HtbClass) Type() string {
type GenericClass (line 120) | type GenericClass struct
method Attrs (line 126) | func (class *GenericClass) Attrs() *ClassAttrs {
method Type (line 131) | func (class *GenericClass) Type() string {
type ServiceCurve (line 139) | type ServiceCurve struct
method Attrs (line 146) | func (c *ServiceCurve) Attrs() (uint32, uint32, uint32) {
method Burst (line 151) | func (c *ServiceCurve) Burst() uint32 {
method Delay (line 156) | func (c *ServiceCurve) Delay() uint32 {
method Rate (line 161) | func (c *ServiceCurve) Rate() uint32 {
type HfscClass (line 166) | type HfscClass struct
method SetUsc (line 175) | func (hfsc *HfscClass) SetUsc(m1 uint32, d uint32, m2 uint32) {
method SetFsc (line 181) | func (hfsc *HfscClass) SetFsc(m1 uint32, d uint32, m2 uint32) {
method SetRsc (line 187) | func (hfsc *HfscClass) SetRsc(m1 uint32, d uint32, m2 uint32) {
method SetSC (line 194) | func (hfsc *HfscClass) SetSC(m1 uint32, d uint32, m2 uint32) {
method SetUL (line 202) | func (hfsc *HfscClass) SetUL(m1 uint32, d uint32, m2 uint32) {
method SetLS (line 209) | func (hfsc *HfscClass) SetLS(m1 uint32, d uint32, m2 uint32) {
method String (line 224) | func (hfsc *HfscClass) String() string {
method Attrs (line 232) | func (hfsc *HfscClass) Attrs() *ClassAttrs {
method Type (line 237) | func (hfsc *HfscClass) Type() string {
function NewHfscClass (line 214) | func NewHfscClass(attrs ClassAttrs) *HfscClass {
FILE: vendor/github.com/vishvananda/netlink/class_linux.go
type tcStats (line 20) | type tcStats struct
function NewHtbClass (line 32) | func NewHtbClass(attrs ClassAttrs, cattrs HtbClassAttrs) *HtbClass {
function ClassDel (line 67) | func ClassDel(class Class) error {
method ClassDel (line 73) | func (h *Handle) ClassDel(class Class) error {
function ClassChange (line 80) | func ClassChange(class Class) error {
method ClassChange (line 87) | func (h *Handle) ClassChange(class Class) error {
function ClassReplace (line 96) | func ClassReplace(class Class) error {
method ClassReplace (line 105) | func (h *Handle) ClassReplace(class Class) error {
function ClassAdd (line 111) | func ClassAdd(class Class) error {
method ClassAdd (line 117) | func (h *Handle) ClassAdd(class Class) error {
method classModify (line 125) | func (h *Handle) classModify(cmd, flags int, class Class) error {
function classPayload (line 145) | func classPayload(req *nl.NetlinkRequest, class Class) error {
function ClassList (line 205) | func ClassList(link Link, parent uint32) ([]Class, error) {
method ClassList (line 212) | func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) {
function parseHtbClassData (line 301) | func parseHtbClassData(class Class, data []syscall.NetlinkRouteAttr) (bo...
function parseHfscClassData (line 324) | func parseHfscClassData(class Class, data []syscall.NetlinkRouteAttr) (b...
function parseTcStats (line 341) | func parseTcStats(data []byte) (*ClassStatistics, error) {
function parseGnetStats (line 362) | func parseGnetStats(data []byte, gnetStats interface{}) error {
function parseTcStats2 (line 368) | func parseTcStats2(data []byte) (*ClassStatistics, error) {
FILE: vendor/github.com/vishvananda/netlink/conntrack_linux.go
type ConntrackTableType (line 15) | type ConntrackTableType
constant ConntrackTable (line 20) | ConntrackTable = 1
constant ConntrackExpectTable (line 23) | ConntrackExpectTable = 2
constant seekCurrent (line 28) | seekCurrent = 1
type InetFamily (line 32) | type InetFamily
function ConntrackTableList (line 46) | func ConntrackTableList(table ConntrackTableType, family InetFamily) ([]...
function ConntrackTableFlush (line 53) | func ConntrackTableFlush(table ConntrackTableType) error {
function ConntrackDeleteFilter (line 59) | func ConntrackDeleteFilter(table ConntrackTableType, family InetFamily, ...
method ConntrackTableList (line 65) | func (h *Handle) ConntrackTableList(table ConntrackTableType, family Ine...
method ConntrackTableFlush (line 83) | func (h *Handle) ConntrackTableFlush(table ConntrackTableType) error {
method ConntrackDeleteFilter (line 91) | func (h *Handle) ConntrackDeleteFilter(table ConntrackTableType, family ...
method newConntrackRequest (line 112) | func (h *Handle) newConntrackRequest(table ConntrackTableType, family In...
method dumpConntrackTable (line 125) | func (h *Handle) dumpConntrackTable(table ConntrackTableType, family Ine...
type ipTuple (line 133) | type ipTuple struct
type ConntrackFlow (line 143) | type ConntrackFlow struct
method String (line 150) | func (s *ConntrackFlow) String() string {
function parseIpTuple (line 167) | func parseIpTuple(reader *bytes.Reader, tpl *ipTuple) uint8 {
function parseNfAttrTLV (line 199) | func parseNfAttrTLV(r *bytes.Reader) (isNested bool, attrType, len uint1...
function parseNfAttrTL (line 207) | func parseNfAttrTL(r *bytes.Reader) (isNested bool, attrType, len uint16) {
function parseBERaw16 (line 218) | func parseBERaw16(r *bytes.Reader, v *uint16) {
function parseBERaw32 (line 222) | func parseBERaw32(r *bytes.Reader, v *uint32) {
function parseBERaw64 (line 226) | func parseBERaw64(r *bytes.Reader, v *uint64) {
function parseByteAndPacketCounters (line 230) | func parseByteAndPacketCounters(r *bytes.Reader) (bytes, packets uint64) {
function parseConnectionMark (line 244) | func parseConnectionMark(r *bytes.Reader) (mark uint32) {
function parseRawData (line 249) | func parseRawData(data []byte) *ConntrackFlow {
type ConntrackFilterType (line 327) | type ConntrackFilterType
constant ConntrackOrigSrcIP (line 330) | ConntrackOrigSrcIP = iota
constant ConntrackOrigDstIP (line 331) | ConntrackOrigDstIP
constant ConntrackReplySrcIP (line 332) | ConntrackReplySrcIP
constant ConntrackReplyDstIP (line 333) | ConntrackReplyDstIP
constant ConntrackReplyAnyIP (line 334) | ConntrackReplyAnyIP
constant ConntrackOrigSrcPort (line 335) | ConntrackOrigSrcPort
constant ConntrackOrigDstPort (line 336) | ConntrackOrigDstPort
constant ConntrackNatSrcIP (line 337) | ConntrackNatSrcIP = ConntrackReplySrcIP
constant ConntrackNatDstIP (line 338) | ConntrackNatDstIP = ConntrackReplyDstIP
constant ConntrackNatAnyIP (line 339) | ConntrackNatAnyIP = ConntrackReplyAnyIP
type CustomConntrackFilter (line 342) | type CustomConntrackFilter interface
type ConntrackFilter (line 348) | type ConntrackFilter struct
method AddIPNet (line 355) | func (f *ConntrackFilter) AddIPNet(tp ConntrackFilterType, ipNet *net....
method AddIP (line 370) | func (f *ConntrackFilter) AddIP(tp ConntrackFilterType, ip net.IP) err...
method AddPort (line 378) | func (f *ConntrackFilter) AddPort(tp ConntrackFilterType, port uint16)...
method AddProtocol (line 397) | func (f *ConntrackFilter) AddProtocol(proto uint8) error {
method MatchConntrackFlow (line 407) | func (f *ConntrackFilter) MatchConntrackFlow(flow *ConntrackFlow) bool {
FILE: vendor/github.com/vishvananda/netlink/conntrack_unspecified.go
type ConntrackTableType (line 6) | type ConntrackTableType
type InetFamily (line 9) | type InetFamily
type ConntrackFlow (line 12) | type ConntrackFlow struct
type ConntrackFilter (line 15) | type ConntrackFilter struct
function ConntrackTableList (line 19) | func ConntrackTableList(table ConntrackTableType, family InetFamily) ([]...
function ConntrackTableFlush (line 26) | func ConntrackTableFlush(table ConntrackTableType) error {
function ConntrackDeleteFilter (line 32) | func ConntrackDeleteFilter(table ConntrackTableType, family InetFamily, ...
method ConntrackTableList (line 38) | func (h *Handle) ConntrackTableList(table ConntrackTableType, family Ine...
method ConntrackTableFlush (line 45) | func (h *Handle) ConntrackTableFlush(table ConntrackTableType) error {
method ConntrackDeleteFilter (line 51) | func (h *Handle) ConntrackDeleteFilter(table ConntrackTableType, family ...
FILE: vendor/github.com/vishvananda/netlink/devlink_linux.go
type DevlinkDevEswitchAttr (line 12) | type DevlinkDevEswitchAttr struct
type DevlinkDevAttrs (line 19) | type DevlinkDevAttrs struct
type DevlinkDevice (line 24) | type DevlinkDevice struct
method parseAttributes (line 131) | func (d *DevlinkDevice) parseAttributes(attrs []syscall.NetlinkRouteAt...
method parseEswitchAttrs (line 149) | func (dev *DevlinkDevice) parseEswitchAttrs(msgs [][]byte) {
type DevlinkPortFn (line 31) | type DevlinkPortFn struct
type DevlinkPortFnSetAttrs (line 38) | type DevlinkPortFnSetAttrs struct
type DevlinkPort (line 45) | type DevlinkPort struct
method parseAttributes (line 311) | func (port *DevlinkPort) parseAttributes(attrs []syscall.NetlinkRouteA...
type DevLinkPortAddAttrs (line 57) | type DevLinkPortAddAttrs struct
function parseDevLinkDeviceList (line 67) | func parseDevLinkDeviceList(msgs [][]byte) ([]*DevlinkDevice, error) {
function eswitchStringToMode (line 83) | func eswitchStringToMode(modeName string) (uint16, error) {
function parseEswitchMode (line 93) | func parseEswitchMode(mode uint16) string {
function parseEswitchInlineMode (line 105) | func parseEswitchInlineMode(inlinemode uint8) string {
function parseEswitchEncapMode (line 119) | func parseEswitchEncapMode(encapmode uint8) string {
method getEswitchAttrs (line 158) | func (h *Handle) getEswitchAttrs(family *GenlFamily, dev *DevlinkDevice) {
method DevLinkGetDeviceList (line 185) | func (h *Handle) DevLinkGetDeviceList() ([]*DevlinkDevice, error) {
function DevLinkGetDeviceList (line 213) | func DevLinkGetDeviceList() ([]*DevlinkDevice, error) {
function parseDevlinkDevice (line 217) | func parseDevlinkDevice(msgs [][]byte) (*DevlinkDevice, error) {
method createCmdReq (line 230) | func (h *Handle) createCmdReq(cmd uint8, bus string, device string) (*Ge...
method DevLinkGetDeviceByName (line 259) | func (h *Handle) DevLinkGetDeviceByName(Bus string, Device string) (*Dev...
function DevLinkGetDeviceByName (line 278) | func DevLinkGetDeviceByName(Bus string, Device string) (*DevlinkDevice, ...
method DevLinkSetEswitchMode (line 286) | func (h *Handle) DevLinkSetEswitchMode(Dev *DevlinkDevice, NewMode strin...
function DevLinkSetEswitchMode (line 307) | func DevLinkSetEswitchMode(Dev *DevlinkDevice, NewMode string) error {
function parseDevLinkAllPortList (line 347) | func parseDevLinkAllPortList(msgs [][]byte) ([]*DevlinkPort, error) {
method DevLinkGetAllPortList (line 365) | func (h *Handle) DevLinkGetAllPortList() ([]*DevlinkPort, error) {
function DevLinkGetAllPortList (line 390) | func DevLinkGetAllPortList() ([]*DevlinkPort, error) {
function parseDevlinkPortMsg (line 394) | func parseDevlinkPortMsg(msgs [][]byte) (*DevlinkPort, error) {
method DevLinkGetPortByIndex (line 409) | func (h *Handle) DevLinkGetPortByIndex(Bus string, Device string, PortIn...
function DevLinkGetPortByIndex (line 428) | func DevLinkGetPortByIndex(Bus string, Device string, PortIndex uint32) ...
method DevLinkPortAdd (line 434) | func (h *Handle) DevLinkPortAdd(Bus string, Device string, Flavour uint1...
function DevLinkPortAdd (line 462) | func DevLinkPortAdd(Bus string, Device string, Flavour uint16, Attrs Dev...
method DevLinkPortDel (line 467) | func (h *Handle) DevLinkPortDel(Bus string, Device string, PortIndex uin...
function DevLinkPortDel (line 479) | func DevLinkPortDel(Bus string, Device string, PortIndex uint32) error {
method DevlinkPortFnSet (line 485) | func (h *Handle) DevlinkPortFnSet(Bus string, Device string, PortIndex u...
function DevlinkPortFnSet (line 510) | func DevlinkPortFnSet(Bus string, Device string, PortIndex uint32, FnAtt...
FILE: vendor/github.com/vishvananda/netlink/filter.go
type Filter (line 8) | type Filter interface
type FilterAttrs (line 16) | type FilterAttrs struct
method String (line 24) | func (q FilterAttrs) String() string {
type TcAct (line 28) | type TcAct
method String (line 43) | func (a TcAct) String() string {
constant TC_ACT_UNSPEC (line 31) | TC_ACT_UNSPEC TcAct = -1
constant TC_ACT_OK (line 32) | TC_ACT_OK TcAct = 0
constant TC_ACT_RECLASSIFY (line 33) | TC_ACT_RECLASSIFY TcAct = 1
constant TC_ACT_SHOT (line 34) | TC_ACT_SHOT TcAct = 2
constant TC_ACT_PIPE (line 35) | TC_ACT_PIPE TcAct = 3
constant TC_ACT_STOLEN (line 36) | TC_ACT_STOLEN TcAct = 4
constant TC_ACT_QUEUED (line 37) | TC_ACT_QUEUED TcAct = 5
constant TC_ACT_REPEAT (line 38) | TC_ACT_REPEAT TcAct = 6
constant TC_ACT_REDIRECT (line 39) | TC_ACT_REDIRECT TcAct = 7
constant TC_ACT_JUMP (line 40) | TC_ACT_JUMP TcAct = 0x10000000
type TcPolAct (line 69) | type TcPolAct
method String (line 79) | func (a TcPolAct) String() string {
constant TC_POLICE_UNSPEC (line 72) | TC_POLICE_UNSPEC TcPolAct = TcPolAct(TC_ACT_UNSPEC)
constant TC_POLICE_OK (line 73) | TC_POLICE_OK TcPolAct = TcPolAct(TC_ACT_OK)
constant TC_POLICE_RECLASSIFY (line 74) | TC_POLICE_RECLASSIFY TcPolAct = TcPolAct(TC_ACT_RECLASSIFY)
constant TC_POLICE_SHOT (line 75) | TC_POLICE_SHOT TcPolAct = TcPolAct(TC_ACT_SHOT)
constant TC_POLICE_PIPE (line 76) | TC_POLICE_PIPE TcPolAct = TcPolAct(TC_ACT_PIPE)
type ActionAttrs (line 95) | type ActionAttrs struct
method String (line 103) | func (q ActionAttrs) String() string {
type Action (line 108) | type Action interface
type GenericAction (line 113) | type GenericAction struct
method Type (line 117) | func (action *GenericAction) Type() string {
method Attrs (line 121) | func (action *GenericAction) Attrs() *ActionAttrs {
type BpfAction (line 125) | type BpfAction struct
method Type (line 131) | func (action *BpfAction) Type() string {
method Attrs (line 135) | func (action *BpfAction) Attrs() *ActionAttrs {
type ConnmarkAction (line 139) | type ConnmarkAction struct
method Type (line 144) | func (action *ConnmarkAction) Type() string {
method Attrs (line 148) | func (action *ConnmarkAction) Attrs() *ActionAttrs {
function NewConnmarkAction (line 152) | func NewConnmarkAction() *ConnmarkAction {
type MirredAct (line 160) | type MirredAct
method String (line 162) | func (a MirredAct) String() string {
constant TCA_EGRESS_REDIR (line 177) | TCA_EGRESS_REDIR MirredAct = 1
constant TCA_EGRESS_MIRROR (line 178) | TCA_EGRESS_MIRROR MirredAct = 2
constant TCA_INGRESS_REDIR (line 179) | TCA_INGRESS_REDIR MirredAct = 3
constant TCA_INGRESS_MIRROR (line 180) | TCA_INGRESS_MIRROR MirredAct = 4
type MirredAction (line 183) | type MirredAction struct
method Type (line 189) | func (action *MirredAction) Type() string {
method Attrs (line 193) | func (action *MirredAction) Attrs() *ActionAttrs {
function NewMirredAction (line 197) | func NewMirredAction(redirIndex int) *MirredAction {
type TunnelKeyAct (line 207) | type TunnelKeyAct
constant TCA_TUNNEL_KEY_SET (line 210) | TCA_TUNNEL_KEY_SET TunnelKeyAct = 1
constant TCA_TUNNEL_KEY_UNSET (line 211) | TCA_TUNNEL_KEY_UNSET TunnelKeyAct = 2
type TunnelKeyAction (line 214) | type TunnelKeyAction struct
method Type (line 223) | func (action *TunnelKeyAction) Type() string {
method Attrs (line 227) | func (action *TunnelKeyAction) Attrs() *ActionAttrs {
function NewTunnelKeyAction (line 231) | func NewTunnelKeyAction() *TunnelKeyAction {
type SkbEditAction (line 239) | type SkbEditAction struct
method Type (line 247) | func (action *SkbEditAction) Type() string {
method Attrs (line 251) | func (action *SkbEditAction) Attrs() *ActionAttrs {
function NewSkbEditAction (line 255) | func NewSkbEditAction() *SkbEditAction {
type MatchAll (line 264) | type MatchAll struct
method Attrs (line 270) | func (filter *MatchAll) Attrs() *FilterAttrs {
method Type (line 274) | func (filter *MatchAll) Type() string {
type FilterFwAttrs (line 278) | type FilterFwAttrs struct
type BpfFilter (line 294) | type BpfFilter struct
method Type (line 304) | func (filter *BpfFilter) Type() string {
method Attrs (line 308) | func (filter *BpfFilter) Attrs() *FilterAttrs {
type GenericFilter (line 314) | type GenericFilter struct
method Attrs (line 319) | func (filter *GenericFilter) Attrs() *FilterAttrs {
method Type (line 323) | func (filter *GenericFilter) Type() string {
FILE: vendor/github.com/vishvananda/netlink/filter_linux.go
constant TC_U32_TERMINAL (line 17) | TC_U32_TERMINAL = nl.TC_U32_TERMINAL
constant TC_U32_OFFSET (line 18) | TC_U32_OFFSET = nl.TC_U32_OFFSET
constant TC_U32_VAROFFSET (line 19) | TC_U32_VAROFFSET = nl.TC_U32_VAROFFSET
constant TC_U32_EAT (line 20) | TC_U32_EAT = nl.TC_U32_EAT
type U32 (line 34) | type U32 struct
method Attrs (line 45) | func (filter *U32) Attrs() *FilterAttrs {
method Type (line 49) | func (filter *U32) Type() string {
type Fw (line 56) | type Fw struct
method Attrs (line 115) | func (filter *Fw) Attrs() *FilterAttrs {
method Type (line 119) | func (filter *Fw) Type() string {
function NewFw (line 69) | func NewFw(attrs FilterAttrs, fattrs FilterFwAttrs) (*Fw, error) {
function FilterDel (line 125) | func FilterDel(filter Filter) error {
method FilterDel (line 131) | func (h *Handle) FilterDel(filter Filter) error {
function FilterAdd (line 149) | func FilterAdd(filter Filter) error {
method FilterAdd (line 155) | func (h *Handle) FilterAdd(filter Filter) error {
function FilterReplace (line 161) | func FilterReplace(filter Filter) error {
method FilterReplace (line 167) | func (h *Handle) FilterReplace(filter Filter) error {
method filterModify (line 171) | func (h *Handle) filterModify(filter Filter, flags int) error {
function FilterList (line 299) | func FilterList(link Link, parent uint32) ([]Filter, error) {
method FilterList (line 306) | func (h *Handle) FilterList(link Link, parent uint32) ([]Filter, error) {
function toTcGen (line 401) | func toTcGen(attrs *ActionAttrs, tcgen *nl.TcGen) {
function toAttrs (line 409) | func toAttrs(tcgen *nl.TcGen, attrs *ActionAttrs) {
function EncodeActions (line 417) | func EncodeActions(attr *nl.RtAttr, actions []Action) error {
function parseActions (line 518) | func parseActions(tables []syscall.NetlinkRouteAttr) ([]Action, error) {
function parseU32Data (line 633) | func parseU32Data(filter Filter, data []syscall.NetlinkRouteAttr) (bool,...
function parseFwData (line 678) | func parseFwData(filter Filter, data []syscall.NetlinkRouteAttr) (bool, ...
function parseBpfData (line 706) | func parseBpfData(filter Filter, data []syscall.NetlinkRouteAttr) (bool,...
function parseMatchAllData (line 731) | func parseMatchAllData(filter Filter, data []syscall.NetlinkRouteAttr) (...
function AlignToAtm (line 752) | func AlignToAtm(size uint) uint {
function AdjustSize (line 762) | func AdjustSize(sz uint, mpu uint, linklayer int) uint {
function CalcRtable (line 774) | func CalcRtable(rate *nl.TcRateSpec, rtab []uint32, cellLog int, mtu uin...
function DeserializeRtab (line 797) | func DeserializeRtab(b []byte) [256]uint32 {
function SerializeRtab (line 804) | func SerializeRtab(rtab [256]uint32) []byte {
FILE: vendor/github.com/vishvananda/netlink/fou.go
type Fou (line 16) | type Fou struct
FILE: vendor/github.com/vishvananda/netlink/fou_linux.go
constant FOU_GENL_NAME (line 14) | FOU_GENL_NAME = "fou"
constant FOU_CMD_UNSPEC (line 18) | FOU_CMD_UNSPEC uint8 = iota
constant FOU_CMD_ADD (line 19) | FOU_CMD_ADD
constant FOU_CMD_DEL (line 20) | FOU_CMD_DEL
constant FOU_CMD_GET (line 21) | FOU_CMD_GET
constant FOU_CMD_MAX (line 22) | FOU_CMD_MAX = FOU_CMD_GET
constant FOU_ATTR_UNSPEC (line 26) | FOU_ATTR_UNSPEC = iota
constant FOU_ATTR_PORT (line 27) | FOU_ATTR_PORT
constant FOU_ATTR_AF (line 28) | FOU_ATTR_AF
constant FOU_ATTR_IPPROTO (line 29) | FOU_ATTR_IPPROTO
constant FOU_ATTR_TYPE (line 30) | FOU_ATTR_TYPE
constant FOU_ATTR_REMCSUM_NOPARTIAL (line 31) | FOU_ATTR_REMCSUM_NOPARTIAL
constant FOU_ATTR_MAX (line 32) | FOU_ATTR_MAX = FOU_ATTR_REMCSUM_NOPARTIAL
constant FOU_ENCAP_UNSPEC (line 36) | FOU_ENCAP_UNSPEC = iota
constant FOU_ENCAP_DIRECT (line 37) | FOU_ENCAP_DIRECT
constant FOU_ENCAP_GUE (line 38) | FOU_ENCAP_GUE
constant FOU_ENCAP_MAX (line 39) | FOU_ENCAP_MAX = FOU_ENCAP_GUE
function FouFamilyId (line 44) | func FouFamilyId() (int, error) {
function FouAdd (line 58) | func FouAdd(f Fou) error {
method FouAdd (line 62) | func (h *Handle) FouAdd(f Fou) error {
function FouDel (line 96) | func FouDel(f Fou) error {
method FouDel (line 100) | func (h *Handle) FouDel(f Fou) error {
function FouList (line 131) | func FouList(fam int) ([]Fou, error) {
method FouList (line 135) | func (h *Handle) FouList(fam int) ([]Fou, error) {
function deserializeFouMsg (line 171) | func deserializeFouMsg(msg []byte) (Fou, error) {
FILE: vendor/github.com/vishvananda/netlink/fou_unspecified.go
function FouAdd (line 5) | func FouAdd(f Fou) error {
function FouDel (line 9) | func FouDel(f Fou) error {
function FouList (line 13) | func FouList(fam int) ([]Fou, error) {
FILE: vendor/github.com/vishvananda/netlink/genetlink_linux.go
type GenlOp (line 11) | type GenlOp struct
type GenlMulticastGroup (line 16) | type GenlMulticastGroup struct
type GenlFamily (line 21) | type GenlFamily struct
method parseAttributes (line 81) | func (f *GenlFamily) parseAttributes(attrs []syscall.NetlinkRouteAttr)...
function parseOps (line 31) | func parseOps(b []byte) ([]GenlOp, error) {
function parseMulticastGroups (line 56) | func parseMulticastGroups(b []byte) ([]GenlMulticastGroup, error) {
function parseFamilies (line 112) | func parseFamilies(msgs [][]byte) ([]*GenlFamily, error) {
method GenlFamilyList (line 129) | func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) {
function GenlFamilyList (line 143) | func GenlFamilyList() ([]*GenlFamily, error) {
method GenlFamilyGet (line 147) | func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) {
function GenlFamilyGet (line 169) | func GenlFamilyGet(name string) (*GenlFamily, error) {
FILE: vendor/github.com/vishvananda/netlink/genetlink_unspecified.go
type GenlOp (line 5) | type GenlOp struct
type GenlMulticastGroup (line 7) | type GenlMulticastGroup struct
type GenlFamily (line 9) | type GenlFamily struct
method GenlFamilyList (line 11) | func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) {
function GenlFamilyList (line 15) | func GenlFamilyList() ([]*GenlFamily, error) {
method GenlFamilyGet (line 19) | func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) {
function GenlFamilyGet (line 23) | func GenlFamilyGet(name string) (*GenlFamily, error) {
FILE: vendor/github.com/vishvananda/netlink/gtp_linux.go
type PDP (line 13) | type PDP struct
method String (line 24) | func (pdp *PDP) String() string {
method parseAttributes (line 37) | func (p *PDP) parseAttributes(attrs []syscall.NetlinkRouteAttr) error {
function parsePDP (line 61) | func parsePDP(msgs [][]byte) ([]*PDP, error) {
method GTPPDPList (line 77) | func (h *Handle) GTPPDPList() ([]*PDP, error) {
function GTPPDPList (line 95) | func GTPPDPList() ([]*PDP, error) {
function gtpPDPGet (line 99) | func gtpPDPGet(req *nl.NetlinkRequest) (*PDP, error) {
method GTPPDPByTID (line 114) | func (h *Handle) GTPPDPByTID(link Link, tid int) (*PDP, error) {
function GTPPDPByTID (line 131) | func GTPPDPByTID(link Link, tid int) (*PDP, error) {
method GTPPDPByITEI (line 135) | func (h *Handle) GTPPDPByITEI(link Link, itei int) (*PDP, error) {
function GTPPDPByITEI (line 152) | func GTPPDPByITEI(link Link, itei int) (*PDP, error) {
method GTPPDPByMSAddress (line 156) | func (h *Handle) GTPPDPByMSAddress(link Link, addr net.IP) (*PDP, error) {
function GTPPDPByMSAddress (line 173) | func GTPPDPByMSAddress(link Link, addr net.IP) (*PDP, error) {
method GTPPDPAdd (line 177) | func (h *Handle) GTPPDPAdd(link Link, pdp *PDP) error {
function GTPPDPAdd (line 207) | func GTPPDPAdd(link Link, pdp *PDP) error {
method GTPPDPDel (line 211) | func (h *Handle) GTPPDPDel(link Link, pdp *PDP) error {
function GTPPDPDel (line 237) | func GTPPDPDel(link Link, pdp *PDP) error {
FILE: vendor/github.com/vishvananda/netlink/handle_linux.go
type Handle (line 19) | type Handle struct
method SupportsNetlinkFamily (line 41) | func (h *Handle) SupportsNetlinkFamily(nlFamily int) bool {
method SetSocketTimeout (line 58) | func (h *Handle) SetSocketTimeout(to time.Duration) error {
method SetSocketReceiveBufferSize (line 77) | func (h *Handle) SetSocketReceiveBufferSize(size int, force bool) error {
method GetSocketReceiveBufferSize (line 95) | func (h *Handle) GetSocketReceiveBufferSize() ([]int, error) {
method Delete (line 140) | func (h *Handle) Delete() {
method newNetlinkRequest (line 147) | func (h *Handle) newNetlinkRequest(proto, flags int) *nl.NetlinkRequest {
function SetSocketTimeout (line 25) | func SetSocketTimeout(to time.Duration) error {
function GetSocketTimeout (line 35) | func GetSocketTimeout() time.Duration {
function NewHandle (line 50) | func NewHandle(nlFamilies ...int) (*Handle, error) {
function NewHandleAt (line 113) | func NewHandleAt(ns netns.NsHandle, nlFamilies ...int) (*Handle, error) {
function NewHandleAtFrom (line 119) | func NewHandleAtFrom(newNs, curNs netns.NsHandle) (*Handle, error) {
function newHandle (line 123) | func newHandle(newNs, curNs netns.NsHandle, nlFamilies ...int) (*Handle,...
FILE: vendor/github.com/vishvananda/netlink/handle_unspecified.go
type Handle (line 12) | type Handle struct
method Delete (line 26) | func (h *Handle) Delete() {}
method SupportsNetlinkFamily (line 28) | func (h *Handle) SupportsNetlinkFamily(nlFamily int) bool {
method SetSocketTimeout (line 32) | func (h *Handle) SetSocketTimeout(to time.Duration) error {
method SetPromiscOn (line 36) | func (h *Handle) SetPromiscOn(link Link) error {
method SetPromiscOff (line 40) | func (h *Handle) SetPromiscOff(link Link) error {
method LinkSetUp (line 44) | func (h *Handle) LinkSetUp(link Link) error {
method LinkSetDown (line 48) | func (h *Handle) LinkSetDown(link Link) error {
method LinkSetMTU (line 52) | func (h *Handle) LinkSetMTU(link Link, mtu int) error {
method LinkSetName (line 56) | func (h *Handle) LinkSetName(link Link, name string) error {
method LinkSetAlias (line 60) | func (h *Handle) LinkSetAlias(link Link, name string) error {
method LinkSetHardwareAddr (line 64) | func (h *Handle) LinkSetHardwareAddr(link Link, hwaddr net.HardwareAdd...
method LinkSetVfHardwareAddr (line 68) | func (h *Handle) LinkSetVfHardwareAddr(link Link, vf int, hwaddr net.H...
method LinkSetVfVlan (line 72) | func (h *Handle) LinkSetVfVlan(link Link, vf, vlan int) error {
method LinkSetVfVlanQos (line 76) | func (h *Handle) LinkSetVfVlanQos(link Link, vf, vlan, qos int) error {
method LinkSetVfTxRate (line 80) | func (h *Handle) LinkSetVfTxRate(link Link, vf, rate int) error {
method LinkSetVfRate (line 84) | func (h *Handle) LinkSetVfRate(link Link, vf, minRate, maxRate int) er...
method LinkSetMaster (line 88) | func (h *Handle) LinkSetMaster(link Link, master Link) error {
method LinkSetNoMaster (line 92) | func (h *Handle) LinkSetNoMaster(link Link) error {
method LinkSetMasterByIndex (line 96) | func (h *Handle) LinkSetMasterByIndex(link Link, masterIndex int) error {
method LinkSetNsPid (line 100) | func (h *Handle) LinkSetNsPid(link Link, nspid int) error {
method LinkSetNsFd (line 104) | func (h *Handle) LinkSetNsFd(link Link, fd int) error {
method LinkAdd (line 108) | func (h *Handle) LinkAdd(link Link) error {
method LinkDel (line 112) | func (h *Handle) LinkDel(link Link) error {
method LinkByName (line 116) | func (h *Handle) LinkByName(name string) (Link, error) {
method LinkByAlias (line 120) | func (h *Handle) LinkByAlias(alias string) (Link, error) {
method LinkByIndex (line 124) | func (h *Handle) LinkByIndex(index int) (Link, error) {
method LinkList (line 128) | func (h *Handle) LinkList() ([]Link, error) {
method LinkSetHairpin (line 132) | func (h *Handle) LinkSetHairpin(link Link, mode bool) error {
method LinkSetGuard (line 136) | func (h *Handle) LinkSetGuard(link Link, mode bool) error {
method LinkSetFastLeave (line 140) | func (h *Handle) LinkSetFastLeave(link Link, mode bool) error {
method LinkSetLearning (line 144) | func (h *Handle) LinkSetLearning(link Link, mode bool) error {
method LinkSetRootBlock (line 148) | func (h *Handle) LinkSetRootBlock(link Link, mode bool) error {
method LinkSetFlood (line 152) | func (h *Handle) LinkSetFlood(link Link, mode bool) error {
method LinkSetTxQLen (line 156) | func (h *Handle) LinkSetTxQLen(link Link, qlen int) error {
method LinkSetGroup (line 160) | func (h *Handle) LinkSetGroup(link Link, group int) error {
method setProtinfoAttr (line 164) | func (h *Handle) setProtinfoAttr(link Link, mode bool, attr int) error {
method AddrAdd (line 168) | func (h *Handle) AddrAdd(link Link, addr *Addr) error {
method AddrDel (line 172) | func (h *Handle) AddrDel(link Link, addr *Addr) error {
method AddrList (line 176) | func (h *Handle) AddrList(link Link, family int) ([]Addr, error) {
method ClassDel (line 180) | func (h *Handle) ClassDel(class Class) error {
method ClassChange (line 184) | func (h *Handle) ClassChange(class Class) error {
method ClassReplace (line 188) | func (h *Handle) ClassReplace(class Class) error {
method ClassAdd (line 192) | func (h *Handle) ClassAdd(class Class) error {
method ClassList (line 196) | func (h *Handle) ClassList(link Link, parent uint32) ([]Class, error) {
method FilterDel (line 200) | func (h *Handle) FilterDel(filter Filter) error {
method FilterAdd (line 204) | func (h *Handle) FilterAdd(filter Filter) error {
method FilterList (line 208) | func (h *Handle) FilterList(link Link, parent uint32) ([]Filter, error) {
method NeighAdd (line 212) | func (h *Handle) NeighAdd(neigh *Neigh) error {
method NeighSet (line 216) | func (h *Handle) NeighSet(neigh *Neigh) error {
method NeighAppend (line 220) | func (h *Handle) NeighAppend(neigh *Neigh) error {
method NeighDel (line 224) | func (h *Handle) NeighDel(neigh *Neigh) error {
method NeighList (line 228) | func (h *Handle) NeighList(linkIndex, family int) ([]Neigh, error) {
method NeighProxyList (line 232) | func (h *Handle) NeighProxyList(linkIndex, family int) ([]Neigh, error) {
method RouteAdd (line 236) | func (h *Handle) RouteAdd(route *Route) error {
method RouteAppend (line 240) | func (h *Handle) RouteAppend(route *Route) error {
method RouteDel (line 244) | func (h *Handle) RouteDel(route *Route) error {
method RouteGet (line 248) | func (h *Handle) RouteGet(destination net.IP) ([]Route, error) {
method RouteList (line 252) | func (h *Handle) RouteList(link Link, family int) ([]Route, error) {
method RouteListFiltered (line 256) | func (h *Handle) RouteListFiltered(family int, filter *Route, filterMa...
method RouteReplace (line 260) | func (h *Handle) RouteReplace(route *Route) error {
method RuleAdd (line 264) | func (h *Handle) RuleAdd(rule *Rule) error {
method RuleDel (line 268) | func (h *Handle) RuleDel(rule *Rule) error {
method RuleList (line 272) | func (h *Handle) RuleList(family int) ([]Rule, error) {
function NewHandle (line 14) | func NewHandle(nlFamilies ...int) (*Handle, error) {
function NewHandleAt (line 18) | func NewHandleAt(ns netns.NsHandle, nlFamilies ...int) (*Handle, error) {
function NewHandleAtFrom (line 22) | func NewHandleAtFrom(newNs, curNs netns.NsHandle) (*Handle, error) {
FILE: vendor/github.com/vishvananda/netlink/inet_diag.go
constant INET_DIAG_NONE (line 5) | INET_DIAG_NONE = iota
constant INET_DIAG_MEMINFO (line 6) | INET_DIAG_MEMINFO
constant INET_DIAG_INFO (line 7) | INET_DIAG_INFO
constant INET_DIAG_VEGASINFO (line 8) | INET_DIAG_VEGASINFO
constant INET_DIAG_CONG (line 9) | INET_DIAG_CONG
constant INET_DIAG_TOS (line 10) | INET_DIAG_TOS
constant INET_DIAG_TCLASS (line 11) | INET_DIAG_TCLASS
constant INET_DIAG_SKMEMINFO (line 12) | INET_DIAG_SKMEMINFO
constant INET_DIAG_SHUTDOWN (line 13) | INET_DIAG_SHUTDOWN
constant INET_DIAG_DCTCPINFO (line 14) | INET_DIAG_DCTCPINFO
constant INET_DIAG_PROTOCOL (line 15) | INET_DIAG_PROTOCOL
constant INET_DIAG_SKV6ONLY (line 16) | INET_DIAG_SKV6ONLY
constant INET_DIAG_LOCALS (line 17) | INET_DIAG_LOCALS
constant INET_DIAG_PEERS (line 18) | INET_DIAG_PEERS
constant INET_DIAG_PAD (line 19) | INET_DIAG_PAD
constant INET_DIAG_MARK (line 20) | INET_DIAG_MARK
constant INET_DIAG_BBRINFO (line 21) | INET_DIAG_BBRINFO
constant INET_DIAG_CLASS_ID (line 22) | INET_DIAG_CLASS_ID
constant INET_DIAG_MD5SIG (line 23) | INET_DIAG_MD5SIG
constant INET_DIAG_MAX (line 24) | INET_DIAG_MAX
type InetDiagTCPInfoResp (line 27) | type InetDiagTCPInfoResp struct
FILE: vendor/github.com/vishvananda/netlink/ioctl_linux.go
constant ETHTOOL_GSSET_INFO (line 13) | ETHTOOL_GSSET_INFO = 0x00000037
constant SIOCETHTOOL (line 15) | SIOCETHTOOL = 0x8946
constant ETHTOOL_GSTRINGS (line 17) | ETHTOOL_GSTRINGS = 0x0000001b
constant ETHTOOL_GSTATS (line 19) | ETHTOOL_GSTATS = 0x0000001d
constant ETH_SS_TEST (line 25) | ETH_SS_TEST = iota
constant ETH_SS_STATS (line 27) | ETH_SS_STATS
constant ETH_SS_PRIV_FLAGS (line 29) | ETH_SS_PRIV_FLAGS
constant _ETH_SS_NTUPLE_FILTERS (line 31) | _ETH_SS_NTUPLE_FILTERS
constant ETH_SS_FEATURES (line 33) | ETH_SS_FEATURES
constant ETH_SS_RSS_HASH_FUNCS (line 35) | ETH_SS_RSS_HASH_FUNCS
type IfreqSlave (line 40) | type IfreqSlave struct
type Ifreq (line 46) | type Ifreq struct
type ethtoolSset (line 52) | type ethtoolSset struct
type ethtoolStats (line 59) | type ethtoolStats struct
function newIocltSlaveReq (line 67) | func newIocltSlaveReq(slave, master string) *IfreqSlave {
function newIocltStringSetReq (line 75) | func newIocltStringSetReq(linkName string) (*Ifreq, *ethtoolSset) {
function getSocketUDP (line 88) | func getSocketUDP() (int, error) {
FILE: vendor/github.com/vishvananda/netlink/ipset_linux.go
type IPSetEntry (line 13) | type IPSetEntry struct
type IPSetResult (line 25) | type IPSetResult struct
method unserialize (line 256) | func (result *IPSetResult) unserialize(msg []byte) {
method parseAttrData (line 287) | func (result *IPSetResult) parseAttrData(data []byte) {
method parseAttrADT (line 322) | func (result *IPSetResult) parseAttrADT(data []byte) {
type IpsetCreateOptions (line 49) | type IpsetCreateOptions struct
function IpsetProtocol (line 58) | func IpsetProtocol() (uint8, uint8, error) {
function IpsetCreate (line 63) | func IpsetCreate(setname, typename string, options IpsetCreateOptions) e...
function IpsetDestroy (line 68) | func IpsetDestroy(setname string) error {
function IpsetFlush (line 73) | func IpsetFlush(setname string) error {
function IpsetList (line 78) | func IpsetList(setname string) (*IPSetResult, error) {
function IpsetListAll (line 83) | func IpsetListAll() ([]IPSetResult, error) {
function IpsetAdd (line 88) | func IpsetAdd(setname string, entry *IPSetEntry) error {
function IpsetDel (line 93) | func IpsetDel(setname string, entry *IPSetEntry) error {
method IpsetProtocol (line 97) | func (h *Handle) IpsetProtocol() (protocol uint8, minVersion uint8, err ...
method IpsetCreate (line 108) | func (h *Handle) IpsetCreate(setname, typename string, options IpsetCrea...
method IpsetDestroy (line 147) | func (h *Handle) IpsetDestroy(setname string) error {
method IpsetFlush (line 154) | func (h *Handle) IpsetFlush(setname string) error {
method IpsetList (line 161) | func (h *Handle) IpsetList(name string) (*IPSetResult, error) {
method IpsetListAll (line 174) | func (h *Handle) IpsetListAll() ([]IPSetResult, error) {
method ipsetAddDel (line 190) | func (h *Handle) ipsetAddDel(nlCmd int, setname string, entry *IPSetEntr...
method newIpsetRequest (line 223) | func (h *Handle) newIpsetRequest(cmd int) *nl.NetlinkRequest {
function ipsetExecute (line 238) | func ipsetExecute(req *nl.NetlinkRequest) (msgs [][]byte, err error) {
function ipsetUnserialize (line 249) | func ipsetUnserialize(msgs [][]byte) (result IPSetResult) {
function parseIPSetEntry (line 333) | func parseIPSetEntry(data []byte) (entry IPSetEntry) {
FILE: vendor/github.com/vishvananda/netlink/link.go
type Link (line 13) | type Link interface
type NsPid (line 19) | type NsPid
type NsFd (line 20) | type NsFd
type LinkAttrs (line 24) | type LinkAttrs struct
type LinkSlave (line 56) | type LinkSlave interface
type VfInfo (line 61) | type VfInfo struct
type LinkOperState (line 86) | type LinkOperState
method String (line 98) | func (s LinkOperState) String() string {
constant OperUnknown (line 89) | OperUnknown = iota
constant OperNotPresent (line 90) | OperNotPresent
constant OperDown (line 91) | OperDown
constant OperLowerLayerDown (line 92) | OperLowerLayerDown
constant OperTesting (line 93) | OperTesting
constant OperDormant (line 94) | OperDormant
constant OperUp (line 95) | OperUp
function NewLinkAttrs (line 118) | func NewLinkAttrs() LinkAttrs {
type LinkStatistics (line 125) | type LinkStatistics
type LinkStatistics32 (line 130) | type LinkStatistics32 struct
method to64 (line 156) | func (s32 LinkStatistics32) to64() *LinkStatistics64 {
type LinkStatistics64 (line 187) | type LinkStatistics64 struct
type LinkXdp (line 213) | type LinkXdp struct
type Device (line 223) | type Device struct
method Attrs (line 227) | func (device *Device) Attrs() *LinkAttrs {
method Type (line 231) | func (device *Device) Type() string {
type Dummy (line 236) | type Dummy struct
method Attrs (line 240) | func (dummy *Dummy) Attrs() *LinkAttrs {
method Type (line 244) | func (dummy *Dummy) Type() string {
type Ifb (line 249) | type Ifb struct
method Attrs (line 253) | func (ifb *Ifb) Attrs() *LinkAttrs {
method Type (line 257) | func (ifb *Ifb) Type() string {
type Bridge (line 262) | type Bridge struct
method Attrs (line 270) | func (bridge *Bridge) Attrs() *LinkAttrs {
method Type (line 274) | func (bridge *Bridge) Type() string {
type Vlan (line 279) | type Vlan struct
method Attrs (line 285) | func (vlan *Vlan) Attrs() *LinkAttrs {
method Type (line 289) | func (vlan *Vlan) Type() string {
type MacvlanMode (line 293) | type MacvlanMode
constant MACVLAN_MODE_DEFAULT (line 296) | MACVLAN_MODE_DEFAULT MacvlanMode = iota
constant MACVLAN_MODE_PRIVATE (line 297) | MACVLAN_MODE_PRIVATE
constant MACVLAN_MODE_VEPA (line 298) | MACVLAN_MODE_VEPA
constant MACVLAN_MODE_BRIDGE (line 299) | MACVLAN_MODE_BRIDGE
constant MACVLAN_MODE_PASSTHRU (line 300) | MACVLAN_MODE_PASSTHRU
constant MACVLAN_MODE_SOURCE (line 301) | MACVLAN_MODE_SOURCE
type Macvlan (line 305) | type Macvlan struct
method Attrs (line 313) | func (macvlan *Macvlan) Attrs() *LinkAttrs {
method Type (line 317) | func (macvlan *Macvlan) Type() string {
type Macvtap (line 322) | type Macvtap struct
method Type (line 326) | func (macvtap Macvtap) Type() string {
type TuntapMode (line 330) | type TuntapMode
type TuntapFlag (line 331) | type TuntapFlag
type Tuntap (line 334) | type Tuntap struct
method Attrs (line 345) | func (tuntap *Tuntap) Attrs() *LinkAttrs {
method Type (line 349) | func (tuntap *Tuntap) Type() string {
type Veth (line 354) | type Veth struct
method Attrs (line 361) | func (veth *Veth) Attrs() *LinkAttrs {
method Type (line 365) | func (veth *Veth) Type() string {
type Wireguard (line 370) | type Wireguard struct
method Attrs (line 374) | func (wg *Wireguard) Attrs() *LinkAttrs {
method Type (line 378) | func (wg *Wireguard) Type() string {
type GenericLink (line 384) | type GenericLink struct
method Attrs (line 389) | func (generic *GenericLink) Attrs() *LinkAttrs {
method Type (line 393) | func (generic *GenericLink) Type() string {
type Vxlan (line 397) | type Vxlan struct
method Attrs (line 423) | func (vxlan *Vxlan) Attrs() *LinkAttrs {
method Type (line 427) | func (vxlan *Vxlan) Type() string {
type IPVlanMode (line 431) | type IPVlanMode
constant IPVLAN_MODE_L2 (line 434) | IPVLAN_MODE_L2 IPVlanMode = iota
constant IPVLAN_MODE_L3 (line 435) | IPVLAN_MODE_L3
constant IPVLAN_MODE_L3S (line 436) | IPVLAN_MODE_L3S
constant IPVLAN_MODE_MAX (line 437) | IPVLAN_MODE_MAX
type IPVlanFlag (line 440) | type IPVlanFlag
constant IPVLAN_FLAG_BRIDGE (line 443) | IPVLAN_FLAG_BRIDGE IPVlanFlag = iota
constant IPVLAN_FLAG_PRIVATE (line 444) | IPVLAN_FLAG_PRIVATE
constant IPVLAN_FLAG_VEPA (line 445) | IPVLAN_FLAG_VEPA
type IPVlan (line 448) | type IPVlan struct
method Attrs (line 454) | func (ipvlan *IPVlan) Attrs() *LinkAttrs {
method Type (line 458) | func (ipvlan *IPVlan) Type() string {
type IPVtap (line 463) | type IPVtap struct
method Attrs (line 467) | func (ipvtap *IPVtap) Attrs() *LinkAttrs {
method Type (line 471) | func (ipvtap IPVtap) Type() string {
type VlanProtocol (line 476) | type VlanProtocol
method String (line 478) | func (p VlanProtocol) String() string {
function StringToVlanProtocol (line 487) | func StringToVlanProtocol(s string) VlanProtocol {
constant VLAN_PROTOCOL_UNKNOWN (line 497) | VLAN_PROTOCOL_UNKNOWN VlanProtocol = 0
constant VLAN_PROTOCOL_8021Q (line 498) | VLAN_PROTOCOL_8021Q VlanProtocol = 0x8100
constant VLAN_PROTOCOL_8021AD (line 499) | VLAN_PROTOCOL_8021AD VlanProtocol = 0x88A8
type BondMode (line 513) | type BondMode
method String (line 515) | func (b BondMode) String() string {
function StringToBondMode (line 524) | func StringToBondMode(s string) BondMode {
constant BOND_MODE_BALANCE_RR (line 534) | BOND_MODE_BALANCE_RR BondMode = iota
constant BOND_MODE_ACTIVE_BACKUP (line 535) | BOND_MODE_ACTIVE_BACKUP
constant BOND_MODE_BALANCE_XOR (line 536) | BOND_MODE_BALANCE_XOR
constant BOND_MODE_BROADCAST (line 537) | BOND_MODE_BROADCAST
constant BOND_MODE_802_3AD (line 538) | BOND_MODE_802_3AD
constant BOND_MODE_BALANCE_TLB (line 539) | BOND_MODE_BALANCE_TLB
constant BOND_MODE_BALANCE_ALB (line 540) | BOND_MODE_BALANCE_ALB
constant BOND_MODE_UNKNOWN (line 541) | BOND_MODE_UNKNOWN
type BondArpValidate (line 564) | type BondArpValidate
method String (line 587) | func (b BondArpValidate) String() string {
constant BOND_ARP_VALIDATE_NONE (line 568) | BOND_ARP_VALIDATE_NONE BondArpValidate = iota
constant BOND_ARP_VALIDATE_ACTIVE (line 569) | BOND_ARP_VALIDATE_ACTIVE
constant BOND_ARP_VALIDATE_BACKUP (line 570) | BOND_ARP_VALIDATE_BACKUP
constant BOND_ARP_VALIDATE_ALL (line 571) | BOND_ARP_VALIDATE_ALL
type BondPrimaryReselect (line 596) | type BondPrimaryReselect
method String (line 616) | func (b BondPrimaryReselect) String() string {
constant BOND_PRIMARY_RESELECT_ALWAYS (line 600) | BOND_PRIMARY_RESELECT_ALWAYS BondPrimaryReselect = iota
constant BOND_PRIMARY_RESELECT_BETTER (line 601) | BOND_PRIMARY_RESELECT_BETTER
constant BOND_PRIMARY_RESELECT_FAILURE (line 602) | BOND_PRIMARY_RESELECT_FAILURE
type BondArpAllTargets (line 625) | type BondArpAllTargets
method String (line 642) | func (b BondArpAllTargets) String() string {
constant BOND_ARP_ALL_TARGETS_ANY (line 629) | BOND_ARP_ALL_TARGETS_ANY BondArpAllTargets = iota
constant BOND_ARP_ALL_TARGETS_ALL (line 630) | BOND_ARP_ALL_TARGETS_ALL
type BondFailOverMac (line 651) | type BondFailOverMac
method String (line 671) | func (b BondFailOverMac) String() string {
constant BOND_FAIL_OVER_MAC_NONE (line 655) | BOND_FAIL_OVER_MAC_NONE BondFailOverMac = iota
constant BOND_FAIL_OVER_MAC_ACTIVE (line 656) | BOND_FAIL_OVER_MAC_ACTIVE
constant BOND_FAIL_OVER_MAC_FOLLOW (line 657) | BOND_FAIL_OVER_MAC_FOLLOW
type BondXmitHashPolicy (line 680) | type BondXmitHashPolicy
method String (line 682) | func (b BondXmitHashPolicy) String() string {
function StringToBondXmitHashPolicy (line 691) | func StringToBondXmitHashPolicy(s string) BondXmitHashPolicy {
constant BOND_XMIT_HASH_POLICY_LAYER2 (line 701) | BOND_XMIT_HASH_POLICY_LAYER2 BondXmitHashPolicy = iota
constant BOND_XMIT_HASH_POLICY_LAYER3_4 (line 702) | BOND_XMIT_HASH_POLICY_LAYER3_4
constant BOND_XMIT_HASH_POLICY_LAYER2_3 (line 703) | BOND_XMIT_HASH_POLICY_LAYER2_3
constant BOND_XMIT_HASH_POLICY_ENCAP2_3 (line 704) | BOND_XMIT_HASH_POLICY_ENCAP2_3
constant BOND_XMIT_HASH_POLICY_ENCAP3_4 (line 705) | BOND_XMIT_HASH_POLICY_ENCAP3_4
constant BOND_XMIT_HASH_POLICY_UNKNOWN (line 706) | BOND_XMIT_HASH_POLICY_UNKNOWN
type BondLacpRate (line 725) | type BondLacpRate
method String (line 727) | func (b BondLacpRate) String() string {
function StringToBondLacpRate (line 736) | func StringToBondLacpRate(s string) BondLacpRate {
constant BOND_LACP_RATE_SLOW (line 746) | BOND_LACP_RATE_SLOW BondLacpRate = iota
constant BOND_LACP_RATE_FAST (line 747) | BOND_LACP_RATE_FAST
constant BOND_LACP_RATE_UNKNOWN (li
Copy disabled (too large)
Download .json
Condensed preview — 763 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (14,260K chars).
[
{
"path": ".cirrus.yml",
"chars": 2633,
"preview": "---\n\nenv:\n GOPATH: \"/var/tmp/go\"\n CIRRUS_WORKING_DIR: \"${GOPATH}/src/github.com/containers/dnsname\"\n GOSRC: \"$C"
},
{
"path": ".github/renovate.json5",
"chars": 1927,
"preview": "/*\n Renovate is a service similar to GitHub Dependabot, but with\n (fantastically) more configuration options. So ma"
},
{
"path": ".gitignore",
"chars": 6,
"preview": "bin/*\n"
},
{
"path": "CODE-OF-CONDUCT.md",
"chars": 189,
"preview": "## The dnsname Project Community Code of Conduct\n\nThe dnsname project follows the [Containers Community Code of Conduct]"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "Makefile",
"chars": 2597,
"preview": "export GOPROXY=https://proxy.golang.org\n\nGO ?= go\nEPOCH_TEST_COMMIT ?= 394c06f491fe9f1c28a410e3b0b91916a5119406\nDESTDIR "
},
{
"path": "OWNERS",
"chars": 230,
"preview": "approvers:\n - mheon\n - baude\n - mrunalp\n - rhatdan\n - TomSweeneyRedHat\n - giuseppe\n - vrothberg\n - jwhonce\nrevie"
},
{
"path": "README.md",
"chars": 2499,
"preview": "# dnsname plugin\n\n## IMPORTANT\n\nAs of 2023, this repository is no longer actively maintained. Our development efforts ar"
},
{
"path": "README_PODMAN.md",
"chars": 2919,
"preview": "# Using the dnsname plugin with Podman\n\nThe *dnsname* plugin allows containers to resolve each other by name. The plugi"
},
{
"path": "RELEASE_NOTES.md",
"chars": 865,
"preview": "# Release Notes\n\n## 1.3.1\n- Fixed an issue where an incorrect use of `LDFLAGS` made `dnsname` unable to build in some pa"
},
{
"path": "SECURITY.md",
"chars": 237,
"preview": "## Security and Disclosure Information Policy for the dnsname Project\n\nThe dnsname Project follows the [Security and Dis"
},
{
"path": "ci/Dockerfile",
"chars": 124,
"preview": "FROM registry.fedoraproject.org/fedora:latest\nRUN dnf update -y && dnf install -y golang make findutils && dnf -y clean "
},
{
"path": "example/foobar.conflist",
"chars": 939,
"preview": "{\n \"cniVersion\": \"0.4.0\",\n \"name\": \"foobar\",\n \"plugins\": [\n {\n \"type\": \"bridge\",\n \"bridge\": \""
},
{
"path": "go.mod",
"chars": 438,
"preview": "module github.com/containers/dnsname\n\ngo 1.13\n\nrequire (\n\tgithub.com/containernetworking/cni v1.1.2\n\tgithub.com/containe"
},
{
"path": "go.sum",
"chars": 14838,
"preview": "github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=\ngithub.com/Microsoft/hcsshi"
},
{
"path": "hack/get_ci_vm.sh",
"chars": 2094,
"preview": "#!/usr/bin/env bash\n\n#\n# For help and usage information, simply execute the script w/o any arguments.\n#\n# This script is"
},
{
"path": "hack/tree_status.sh",
"chars": 257,
"preview": "#!/bin/bash\nset -e\n\nSUGGESTION=\"${SUGGESTION:-sync the vendor.conf and commit all changes.}\"\n\nSTATUS=$(git status --porc"
},
{
"path": "plugins/meta/dnsname/config.go",
"chars": 1835,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/containernetworking/cni/pkg/types\"\n)\n\nconst (\n\t// "
},
{
"path": "plugins/meta/dnsname/dnsname_suite_test.go",
"chars": 815,
"preview": "// Copyright 2019 dnsname authors\n// Copyright 2017 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "plugins/meta/dnsname/dnsname_test.go",
"chars": 5129,
"preview": "package main\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"syscall\"\n\t\"time\"\n\n\t\"github.com/containernetworki"
},
{
"path": "plugins/meta/dnsname/files.go",
"chars": 5014,
"preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"os\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"github.com/cont"
},
{
"path": "plugins/meta/dnsname/files_test.go",
"chars": 1340,
"preview": "package main\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc Test_generateDNSMasqConfig(t *testing.T) {\n\ttestResult := `## WARNI"
},
{
"path": "plugins/meta/dnsname/main.go",
"chars": 8104,
"preview": "// Copyright 2019 dnsname authors\n// Copyright 2017 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "plugins/meta/dnsname/result.go",
"chars": 1653,
"preview": "package main\n\nimport (\n\t\"net\"\n\n\tcurrent \"github.com/containernetworking/cni/pkg/types/100\"\n\t\"github.com/pkg/errors\"\n)\n\n/"
},
{
"path": "plugins/meta/dnsname/service.go",
"chars": 2694,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github."
},
{
"path": "plugins/meta/dnsname/version.go",
"chars": 241,
"preview": "package main\n\nimport \"fmt\"\n\n// overwritten at build time\nvar gitCommit = \"unknown\"\n\nconst dnsnameVersion = \"1.4.0-dev\"\n\n"
},
{
"path": "vendor/github.com/alexflint/go-filemutex/LICENSE",
"chars": 1098,
"preview": "The MIT License\r\n\r\nCopyright (c) 2010-2017 Alex Flint.\r\n\r\nPermission is hereby granted, free of charge, to any person ob"
},
{
"path": "vendor/github.com/alexflint/go-filemutex/README.md",
"chars": 695,
"preview": "# FileMutex\n\nFileMutex is similar to `sync.RWMutex`, but also synchronizes across processes.\nOn Linux, OSX, and other PO"
},
{
"path": "vendor/github.com/alexflint/go-filemutex/filemutex_flock.go",
"chars": 1490,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/alexflint/go-filemutex/filemutex_windows.go",
"chars": 2676,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/containernetworking/cni/LICENSE",
"chars": 11358,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/skel/skel.go",
"chars": 8347,
"preview": "// Copyright 2014-2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not "
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/020/types.go",
"chars": 4976,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/040/types.go",
"chars": 8269,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/100/types.go",
"chars": 7916,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/args.go",
"chars": 3707,
"preview": "// Copyright 2015 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/create/create.go",
"chars": 1833,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/internal/convert.go",
"chars": 2812,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/internal/create.go",
"chars": 1841,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/types/types.go",
"chars": 5474,
"preview": "// Copyright 2015 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/utils/utils.go",
"chars": 3070,
"preview": "// Copyright 2019 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/version/conf.go",
"chars": 886,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/version/plugin.go",
"chars": 4269,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/version/reconcile.go",
"chars": 1433,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/cni/pkg/version/version.go",
"chars": 2918,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/ns/README.md",
"chars": 3990,
"preview": "### Namespaces, Threads, and Go\nOn Linux each OS thread can have a different network namespace. Go's thread scheduling "
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/ns/ns_linux.go",
"chars": 6549,
"preview": "// Copyright 2015-2017 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not "
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/testutils/bad_reader.go",
"chars": 898,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/testutils/cmd.go",
"chars": 3101,
"preview": "// Copyright 2016 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/testutils/dns.go",
"chars": 2046,
"preview": "// Copyright 2019 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/testutils/netns_linux.go",
"chars": 5322,
"preview": "// Copyright 2018 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/pkg/testutils/ping.go",
"chars": 1280,
"preview": "// Copyright 2017 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/backend.go",
"chars": 5355,
"preview": "// Copyright 2015 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/disk/lock.go",
"chars": 1375,
"preview": "// Copyright 2015 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/containernetworking/plugins/plugins/ipam/host-local/backend/store.go",
"chars": 929,
"preview": "// Copyright 2015 CNI authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use t"
},
{
"path": "vendor/github.com/coreos/go-iptables/LICENSE",
"chars": 10273,
"preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
},
{
"path": "vendor/github.com/coreos/go-iptables/NOTICE",
"chars": 126,
"preview": "CoreOS Project\nCopyright 2018 CoreOS, Inc\n\nThis product includes software developed at CoreOS, Inc.\n(http://www.coreos.c"
},
{
"path": "vendor/github.com/coreos/go-iptables/iptables/iptables.go",
"chars": 18349,
"preview": "// Copyright 2015 CoreOS, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use "
},
{
"path": "vendor/github.com/coreos/go-iptables/iptables/lock.go",
"chars": 2507,
"preview": "// Copyright 2015 CoreOS, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/.editorconfig",
"chars": 196,
"preview": "root = true\n\n[*.go]\nindent_style = tab\nindent_size = 4\ninsert_final_newline = true\n\n[*.{yml,yaml}]\nindent_style = space\n"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/.gitattributes",
"chars": 26,
"preview": "go.sum linguist-generated\n"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/.gitignore",
"chars": 201,
"preview": "# Setup a Global .gitignore for OS and editor generated files:\n# https://help.github.com/articles/ignoring-files\n# git c"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/.travis.yml",
"chars": 589,
"preview": "sudo: false\nlanguage: go\n\ngo:\n - \"stable\"\n - \"1.11.x\"\n - \"1.10.x\"\n - \"1.9.x\"\n\nmatrix:\n include:\n - go: \"stable\"\n"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/AUTHORS",
"chars": 1780,
"preview": "# Names should be added to this file as\n#\tName or Organization <email address>\n# The email address is not required for o"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/CHANGELOG.md",
"chars": 11778,
"preview": "# Changelog\n\n## v1.4.7 / 2018-01-09\n\n* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md",
"chars": 3976,
"preview": "# Contributing\n\n## Issues\n\n* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnoti"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/LICENSE",
"chars": 1542,
"preview": "Copyright (c) 2012 The Go Authors. All rights reserved.\nCopyright (c) 2012-2019 fsnotify Authors. All rights reserved.\n\n"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/README.md",
"chars": 6029,
"preview": "# File system notifications for Go\n\n[](https://godoc."
},
{
"path": "vendor/github.com/fsnotify/fsnotify/fen.go",
"chars": 935,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/fsnotify.go",
"chars": 1519,
"preview": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/go.mod",
"chars": 106,
"preview": "module github.com/fsnotify/fsnotify\n\ngo 1.13\n\nrequire golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9\n"
},
{
"path": "vendor/github.com/fsnotify/fsnotify/go.sum",
"chars": 207,
"preview": "golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0=\ngolang.org/x/sys v0."
},
{
"path": "vendor/github.com/fsnotify/fsnotify/inotify.go",
"chars": 9452,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/inotify_poller.go",
"chars": 4713,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/kqueue.go",
"chars": 13615,
"preview": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go",
"chars": 320,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go",
"chars": 322,
"preview": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/fsnotify/fsnotify/windows.go",
"chars": 13758,
"preview": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "vendor/github.com/nxadm/tail/.gitignore",
"chars": 25,
"preview": ".idea/\n.test/\nexamples/_*"
},
{
"path": "vendor/github.com/nxadm/tail/CHANGES.md",
"chars": 1612,
"preview": "# Version v1.4.7-v1.4.8\n* Documentation updates.\n* Small linter cleanups.\n* Added example in test. \n\n# Version v1.4.6\n\n*"
},
{
"path": "vendor/github.com/nxadm/tail/Dockerfile",
"chars": 473,
"preview": "FROM golang\n\nRUN mkdir -p $GOPATH/src/github.com/nxadm/tail/\nADD . $GOPATH/src/github.com/nxadm/tail/\n\n# expecting to fe"
},
{
"path": "vendor/github.com/nxadm/tail/LICENSE",
"chars": 1140,
"preview": "# The MIT License (MIT)\n\n# © Copyright 2015 Hewlett Packard Enterprise Development LP\nCopyright (c) 2014 ActiveState\n\nPe"
},
{
"path": "vendor/github.com/nxadm/tail/README.md",
"chars": 1529,
"preview": "[ 2013 99designs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this softw"
},
{
"path": "vendor/github.com/nxadm/tail/ratelimiter/leakybucket.go",
"chars": 2070,
"preview": "// Package ratelimiter implements the Leaky Bucket ratelimiting algorithm with memcached and in-memory backends.\npackage"
},
{
"path": "vendor/github.com/nxadm/tail/ratelimiter/memory.go",
"chars": 1031,
"preview": "package ratelimiter\n\nimport (\n\t\"errors\"\n\t\"time\"\n)\n\nconst (\n\tGC_SIZE int = 100\n\tGC_PERIOD time.Duration = 60 "
},
{
"path": "vendor/github.com/nxadm/tail/ratelimiter/storage.go",
"chars": 133,
"preview": "package ratelimiter\n\ntype Storage interface {\n\tGetBucketFor(string) (*LeakyBucket, error)\n\tSetBucketFor(string, LeakyBuc"
},
{
"path": "vendor/github.com/nxadm/tail/tail.go",
"chars": 11679,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/tail_posix.go",
"chars": 463,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// +build !windows\n\npackage tail\n\nimport (\n\t\"os"
},
{
"path": "vendor/github.com/nxadm/tail/tail_windows.go",
"chars": 521,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// +build windows\n\npackage tail\n\nimport (\n\t\"os\""
},
{
"path": "vendor/github.com/nxadm/tail/util/util.go",
"chars": 1151,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/watch/filechanges.go",
"chars": 1029,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\npackage watch\n\ntype FileChanges struct {\n\tModif"
},
{
"path": "vendor/github.com/nxadm/tail/watch/inotify.go",
"chars": 2832,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/watch/inotify_tracker.go",
"chars": 6091,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/watch/polling.go",
"chars": 2593,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/watch/watch.go",
"chars": 829,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// Copyright (c) 2015 HPE Software Inc. All rig"
},
{
"path": "vendor/github.com/nxadm/tail/winfile/winfile.go",
"chars": 2777,
"preview": "// Copyright (c) 2019 FOSS contributors of https://github.com/nxadm/tail\n// +build windows\n\npackage winfile\n\nimport (\n\t\""
},
{
"path": "vendor/github.com/onsi/ginkgo/.gitignore",
"chars": 60,
"preview": ".DS_Store\nTODO\ntmp/**/*\n*.coverprofile\n.vscode\n.idea/\n*.log\n"
},
{
"path": "vendor/github.com/onsi/ginkgo/.travis.yml",
"chars": 616,
"preview": "language: go\ngo:\n - tip\n - 1.16.x\n - 1.15.x\n\ncache:\n directories:\n - $GOPATH/pkg/mod\n\n# allow internal package im"
},
{
"path": "vendor/github.com/onsi/ginkgo/CHANGELOG.md",
"chars": 17402,
"preview": "## 1.16.5\n\nGinkgo 2.0 now has a Release Candidate. 1.16.5 advertises the existence of the RC.\n1.16.5 deprecates GinkgoP"
},
{
"path": "vendor/github.com/onsi/ginkgo/CONTRIBUTING.md",
"chars": 1196,
"preview": "# Contributing to Ginkgo\n\nYour contributions to Ginkgo are essential for its long-term maintenance and improvement.\n\n- P"
},
{
"path": "vendor/github.com/onsi/ginkgo/LICENSE",
"chars": 1062,
"preview": "Copyright (c) 2013-2014 Onsi Fakhouri\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of t"
},
{
"path": "vendor/github.com/onsi/ginkgo/README.md",
"chars": 10286,
"preview": "\n\n[\n\nconst COLS = 80\n\ntype ColorMode uint8\n\nconst (\n\tColorModeNone"
},
{
"path": "vendor/github.com/onsi/ginkgo/ginkgo_dsl.go",
"chars": 26873,
"preview": "/*\nGinkgo is a BDD-style testing framework for Golang\n\nThe godoc documentation describes Ginkgo's API. More comprehensi"
},
{
"path": "vendor/github.com/onsi/ginkgo/go.mod",
"chars": 366,
"preview": "module github.com/onsi/ginkgo\n\ngo 1.16\n\nrequire (\n\tgithub.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0\n\tgit"
},
{
"path": "vendor/github.com/onsi/ginkgo/go.sum",
"chars": 8344,
"preview": "github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go",
"chars": 1696,
"preview": "package codelocation\n\nimport (\n\t\"regexp\"\n\t\"runtime\"\n\t\"runtime/debug\"\n\t\"strings\"\n\n\t\"github.com/onsi/ginkgo/types\"\n)\n\nfunc"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go",
"chars": 4150,
"preview": "package containernode\n\nimport (\n\t\"math/rand\"\n\t\"sort\"\n\n\t\"github.com/onsi/ginkgo/internal/leafnodes\"\n\t\"github.com/onsi/gin"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/failer/failer.go",
"chars": 1951,
"preview": "package failer\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype Failer struct {\n\tlock *sync.Mutex\n\tf"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/global/init.go",
"chars": 342,
"preview": "package global\n\nimport (\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\"\n\t\"github.com/onsi/ginkgo/internal/suite\"\n)\n\n"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go",
"chars": 2780,
"preview": "package leafnodes\n\nimport (\n\t\"math\"\n\t\"time\"\n\n\t\"sync\"\n\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype benchmarker struct {\n\tmu "
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go",
"chars": 300,
"preview": "package leafnodes\n\nimport (\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype BasicNode interface {\n\tType() types.SpecComponentTyp"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go",
"chars": 983,
"preview": "package leafnodes\n\nimport (\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype I"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go",
"chars": 1438,
"preview": "package leafnodes\n\nimport (\n\t\"reflect\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntyp"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go",
"chars": 2872,
"preview": "package leafnodes\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/codelocation\"\n\t\"github.com/onsi"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go",
"chars": 1616,
"preview": "package leafnodes\n\nimport (\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype S"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go",
"chars": 1504,
"preview": "package leafnodes\n\nimport (\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype S"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go",
"chars": 2186,
"preview": "package leafnodes\n\nimport (\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/failer\""
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go",
"chars": 5814,
"preview": "package leafnodes\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/onsi/gin"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go",
"chars": 9137,
"preview": "/*\n\nAggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output\ncoherently as tests co"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go",
"chars": 4749,
"preview": "package remote\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/onsi/ginkgo/internal/wri"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go",
"chars": 304,
"preview": "package remote\n\nimport \"os\"\n\n/*\nThe OutputInterceptor is used by the ForwardingReporter to\nintercept and capture all std"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go",
"chars": 1937,
"preview": "// +build freebsd openbsd netbsd dragonfly darwin linux solaris\n\npackage remote\n\nimport (\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"os\"\n\n"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go",
"chars": 669,
"preview": "// +build windows\n\npackage remote\n\nimport (\n\t\"errors\"\n\t\"os\"\n)\n\nfunc NewOutputInterceptor() OutputInterceptor {\n\treturn &"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/remote/server.go",
"chars": 6398,
"preview": "/*\n\nThe remote package provides the pieces to allow Ginkgo test suites to report to remote listeners.\nThis is used, prim"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec/spec.go",
"chars": 6832,
"preview": "package spec\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n\n\t\"sync\"\n\n\t\"github.com/onsi/ginkgo/internal/containernode\"\n\t\"github.com/onsi"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec/specs.go",
"chars": 2826,
"preview": "package spec\n\nimport (\n\t\"math/rand\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n)\n\ntype Specs struct {\n\tspecs []*Spec\n\tnames []string\n\n"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go",
"chars": 1703,
"preview": "package spec_iterator\n\nfunc ParallelizedIndexRange(length int, parallelTotal int, parallelNode int) (startIndex int, cou"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go",
"chars": 1149,
"preview": "package spec_iterator\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/onsi/ginkgo/internal/spec\"\n)\n\ntype Par"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go",
"chars": 814,
"preview": "package spec_iterator\n\nimport (\n\t\"github.com/onsi/ginkgo/internal/spec\"\n)\n\ntype SerialIterator struct {\n\tspecs []*spec.S"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go",
"chars": 1079,
"preview": "package spec_iterator\n\nimport \"github.com/onsi/ginkgo/internal/spec\"\n\ntype ShardedParallelIterator struct {\n\tspecs []"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go",
"chars": 380,
"preview": "package spec_iterator\n\nimport (\n\t\"errors\"\n\n\t\"github.com/onsi/ginkgo/internal/spec\"\n)\n\nvar ErrClosed = errors.New(\"no mor"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go",
"chars": 226,
"preview": "package specrunner\n\nimport (\n\t\"crypto/rand\"\n\t\"fmt\"\n)\n\nfunc randomID() string {\n\tb := make([]byte, 8)\n\t_, err := rand.Rea"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go",
"chars": 10824,
"preview": "package specrunner\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/onsi/ginkgo/internal/spec_iterat"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/suite/suite.go",
"chars": 8802,
"preview": "package suite\n\nimport (\n\t\"math/rand\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/onsi/ginkgo/internal/spec_iterator\"\n\n\t\"github.com"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go",
"chars": 2348,
"preview": "package testingtproxy\n\nimport (\n\t\"fmt\"\n\t\"io\"\n)\n\ntype failFunc func(message string, callerSkip ...int)\ntype skipFunc func"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go",
"chars": 855,
"preview": "package writer\n\ntype FakeGinkgoWriter struct {\n\tEventStream []string\n}\n\nfunc NewFake() *FakeGinkgoWriter {\n\treturn &Fake"
},
{
"path": "vendor/github.com/onsi/ginkgo/internal/writer/writer.go",
"chars": 1463,
"preview": "package writer\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"sync\"\n)\n\ntype WriterInterface interface {\n\tio.Writer\n\n\tTruncate()\n\tDumpOut()\n\t"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/default_reporter.go",
"chars": 3745,
"preview": "/*\nGinkgo's Default Reporter\n\nA number of command line flags are available to tweak Ginkgo's default output.\n\nThese are "
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go",
"chars": 1727,
"preview": "package reporters\n\nimport (\n\t\"github.com/onsi/ginkgo/config\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\n//FakeReporter is useful"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go",
"chars": 5814,
"preview": "/*\n\nJUnit XML Reporter for Ginkgo\n\nFor usage instructions: http://onsi.github.io/ginkgo/#generating_junit_xml_output\n\n*/"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/reporter.go",
"chars": 450,
"preview": "package reporters\n\nimport (\n\t\"github.com/onsi/ginkgo/config\"\n\t\"github.com/onsi/ginkgo/types\"\n)\n\ntype Reporter interface "
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go",
"chars": 1501,
"preview": "package stenographer\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nfunc (s *consoleStenographer) colorize(colorCode string, format stri"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go",
"chars": 4902,
"preview": "package stenographer\n\nimport (\n\t\"sync\"\n\n\t\"github.com/onsi/ginkgo/types\"\n)\n\nfunc NewFakeStenographerCall(method string, a"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go",
"chars": 18147,
"preview": "/*\nThe stenographer is used by Ginkgo's reporters to generate output.\n\nMove along, nothing to see here.\n*/\n\npackage sten"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/LICENSE",
"chars": 1085,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2016 Yasuhiro Matsumoto\n\nPermission is hereby granted, free of charge, to any perso"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/README.md",
"chars": 840,
"preview": "# go-colorable\n\nColorable writer for windows.\n\nFor example, most of logger packages doesn't show colors on windows. (I k"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go",
"chars": 323,
"preview": "// +build !windows\n\npackage colorable\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\nfunc NewColorable(file *os.File) io.Writer {\n\tif file == "
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go",
"chars": 17803,
"preview": "package colorable\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"github.com"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go",
"chars": 978,
"preview": "package colorable\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n)\n\ntype NonColorable struct {\n\tout io.Writer\n\tlastbuf bytes.Buffer"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/LICENSE",
"chars": 1099,
"preview": "Copyright (c) Yasuhiro MATSUMOTO <mattn.jp@gmail.com>\n\nMIT License (Expat)\n\nPermission is hereby granted, free of charge"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/README.md",
"chars": 374,
"preview": "# go-isatty\n\nisatty for golang\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mattn/go-isatty\"\n\t\"os\"\n)\n\nfun"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go",
"chars": 64,
"preview": "// Package isatty implements interface to isatty\npackage isatty\n"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go",
"chars": 226,
"preview": "// +build appengine\n\npackage isatty\n\n// IsTerminal returns true if the file descriptor is terminal which\n// is always fa"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go",
"chars": 415,
"preview": "// +build darwin freebsd openbsd netbsd\n// +build !appengine\n\npackage isatty\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nconst ioc"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go",
"chars": 389,
"preview": "// +build linux\n// +build !appengine\n\npackage isatty\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nconst ioctlReadTermios = syscall."
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go",
"chars": 402,
"preview": "// +build solaris\n// +build !appengine\n\npackage isatty\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\n// IsTerminal returns true "
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go",
"chars": 434,
"preview": "// +build windows\n// +build !appengine\n\npackage isatty\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar kernel32 = syscall.NewLazyD"
},
{
"path": "vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go",
"chars": 4150,
"preview": "/*\n\nTeamCity Reporter for Ginkgo\n\nMakes use of TeamCity's support for Service Messages\nhttp://confluence.jetbrains.com/d"
},
{
"path": "vendor/github.com/onsi/ginkgo/types/code_location.go",
"chars": 260,
"preview": "package types\n\nimport (\n\t\"fmt\"\n)\n\ntype CodeLocation struct {\n\tFileName string\n\tLineNumber int\n\tFullStackTrace "
},
{
"path": "vendor/github.com/onsi/ginkgo/types/deprecation_support.go",
"chars": 5609,
"preview": "package types\n\nimport (\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode\"\n\n\t\"github.com/onsi/ginkgo/config\"\n\t\"github.com/onsi/ginkg"
},
{
"path": "vendor/github.com/onsi/ginkgo/types/synchronization.go",
"chars": 502,
"preview": "package types\n\nimport (\n\t\"encoding/json\"\n)\n\ntype RemoteBeforeSuiteState int\n\nconst (\n\tRemoteBeforeSuiteStateInvalid Remo"
},
{
"path": "vendor/github.com/onsi/ginkgo/types/types.go",
"chars": 3588,
"preview": "package types\n\nimport (\n\t\"strconv\"\n\t\"time\"\n)\n\nconst GINKGO_FOCUS_EXIT_CODE = 197\n\n/*\nSuiteSummary represents the a summa"
},
{
"path": "vendor/github.com/onsi/gomega/.gitignore",
"chars": 36,
"preview": ".DS_Store\n*.test\n.\n.idea\ngomega.iml\n"
},
{
"path": "vendor/github.com/onsi/gomega/.travis.yml",
"chars": 195,
"preview": "language: go\narch:\n - amd64\n - ppc64le\n\ngo:\n - gotip\n - 1.16.x\n - 1.15.x\n\nenv:\n - GO111MODULE=on\n\ninstall: skip\n\ns"
},
{
"path": "vendor/github.com/onsi/gomega/CHANGELOG.md",
"chars": 12425,
"preview": "## 1.17.0\n\n### Features\n- Add HaveField matcher [3a26311]\n- add Error() assertions on the final error value of multi-ret"
},
{
"path": "vendor/github.com/onsi/gomega/CONTRIBUTING.md",
"chars": 927,
"preview": "# Contributing to Gomega\n\nYour contributions to Gomega are essential for its long-term maintenance and improvement. To "
},
{
"path": "vendor/github.com/onsi/gomega/Dockerfile",
"chars": 17,
"preview": "FROM golang:1.15\n"
},
{
"path": "vendor/github.com/onsi/gomega/LICENSE",
"chars": 1062,
"preview": "Copyright (c) 2013-2014 Onsi Fakhouri\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of t"
},
{
"path": "vendor/github.com/onsi/gomega/Makefile",
"chars": 1120,
"preview": "###### Help ###################################################################\n\n.DEFAULT_GOAL = help\n\n.PHONY: help\n\nhel"
},
{
"path": "vendor/github.com/onsi/gomega/README.md",
"chars": 973,
"preview": "\n\n[\n\ntype Assertion struct {\n\tactuals []"
},
{
"path": "vendor/github.com/onsi/gomega/internal/async_assertion.go",
"chars": 6637,
"preview": "package internal\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github.com/onsi/gomega/types\"\n)\n\ntype Async"
},
{
"path": "vendor/github.com/onsi/gomega/internal/duration_bundle.go",
"chars": 2272,
"preview": "package internal\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n)\n\ntype DurationBundle struct {\n\tEventuallyTimeout "
},
{
"path": "vendor/github.com/onsi/gomega/internal/gomega.go",
"chars": 2947,
"preview": "package internal\n\nimport (\n\t\"time\"\n\n\t\"github.com/onsi/gomega/types\"\n)\n\ntype Gomega struct {\n\tFail types.Gomega"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/and.go",
"chars": 1834,
"preview": "package matchers\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/onsi/gomega/format\"\n\t\"github.com/onsi/gomega/types\"\n)\n\ntype AndMatcher s"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go",
"chars": 1319,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype Assignab"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/attributes_slice.go",
"chars": 364,
"preview": "package matchers\n\nimport (\n\t\"encoding/xml\"\n\t\"strings\"\n)\n\ntype attributesSlice []xml.Attr\n\nfunc (attrs attributesSlice) L"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_a_directory.go",
"chars": 1245,
"preview": "// untested sections: 5\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype notADirectory"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go",
"chars": 1257,
"preview": "// untested sections: 5\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype notARegularFi"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go",
"chars": 881,
"preview": "// untested sections: 3\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeAnExistingF"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go",
"chars": 1183,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeClosed"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go",
"chars": 1007,
"preview": "// untested sections: 1\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeElemen"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go",
"chars": 689,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeEmptyMatcher stru"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go",
"chars": 1047,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeEquiva"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_false_matcher.go",
"chars": 635,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeFalseMatcher stru"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_identical_to.go",
"chars": 1013,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\n\t\"github.com/onsi/gomega/format\"\n)\n\ntype BeIdenti"
},
{
"path": "vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go",
"chars": 496,
"preview": "// untested sections: 2\n\npackage matchers\n\nimport \"github.com/onsi/gomega/format\"\n\ntype BeNilMatcher struct {\n}\n\nfunc (m"
}
]
// ... and 563 more files (download for full content)
About this extraction
This page contains the full source code of the containers/dnsname GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 763 files (12.7 MB), approximately 3.4M tokens, and a symbol index with 94670 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.