├── .gitignore ├── Dockerfile ├── Dockerfile_origin ├── README.md ├── dcgm-exporter ├── Dockerfile └── dcgm-exporter ├── docker_build.sh ├── example ├── dual-process.sh ├── main.py ├── pod-dual.yaml └── pod-single.yaml ├── grafana ├── dcgm_gpu_logic_used_metrics.json ├── dcgm_process_mem_used_metrics.json ├── grafana-configmap.yaml ├── grafana-dashboard-cm.yaml ├── grafana-dashboard-providers.yaml ├── grafana-deploy.yaml ├── grafana-ingress.yaml └── grafana-servife.yaml ├── pod-gpu-metrics-exporter-daemonset.yaml ├── prometheus ├── pod-gpu-metrics-exporter-daemonset.yaml ├── prometheus-configmap.yaml ├── prometheus-deployment.yaml ├── prometheus-service.yaml └── rbac.yaml └── src ├── device_pod.go ├── docker_utils.go ├── file_utils.go ├── go.mod ├── go.sum ├── http.go ├── kubelet_server.go ├── main.go ├── vendor ├── github.com │ ├── Microsoft │ │ └── go-winio │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backup.go │ │ │ ├── ea.go │ │ │ ├── file.go │ │ │ ├── fileinfo.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── hvsock.go │ │ │ ├── pipe.go │ │ │ ├── pkg │ │ │ └── guid │ │ │ │ └── guid.go │ │ │ ├── privilege.go │ │ │ ├── reparse.go │ │ │ ├── sd.go │ │ │ ├── syscall.go │ │ │ └── zsyscall_windows.go │ ├── NVIDIA │ │ └── gpu-monitoring-tools │ │ │ ├── LICENSE │ │ │ └── bindings │ │ │ └── go │ │ │ └── nvml │ │ │ ├── bindings.go │ │ │ ├── nvml.go │ │ │ ├── nvml.h │ │ │ └── nvml_dl.go │ ├── docker │ │ ├── distribution │ │ │ ├── LICENSE │ │ │ ├── digestset │ │ │ │ └── set.go │ │ │ ├── reference │ │ │ │ ├── helpers.go │ │ │ │ ├── normalize.go │ │ │ │ ├── reference.go │ │ │ │ └── regexp.go │ │ │ └── registry │ │ │ │ └── api │ │ │ │ └── errcode │ │ │ │ ├── errors.go │ │ │ │ ├── handler.go │ │ │ │ └── register.go │ │ ├── docker │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ ├── api │ │ │ │ ├── README.md │ │ │ │ ├── common.go │ │ │ │ ├── common_unix.go │ │ │ │ ├── common_windows.go │ │ │ │ ├── swagger-gen.yaml │ │ │ │ ├── swagger.yaml │ │ │ │ └── types │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── blkiodev │ │ │ │ │ └── blkio.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── configs.go │ │ │ │ │ ├── container │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container_changes.go │ │ │ │ │ ├── container_create.go │ │ │ │ │ ├── container_top.go │ │ │ │ │ ├── container_update.go │ │ │ │ │ ├── container_wait.go │ │ │ │ │ ├── host_config.go │ │ │ │ │ ├── hostconfig_unix.go │ │ │ │ │ ├── hostconfig_windows.go │ │ │ │ │ └── waitcondition.go │ │ │ │ │ ├── error_response.go │ │ │ │ │ ├── events │ │ │ │ │ └── events.go │ │ │ │ │ ├── filters │ │ │ │ │ └── parse.go │ │ │ │ │ ├── graph_driver_data.go │ │ │ │ │ ├── id_response.go │ │ │ │ │ ├── image │ │ │ │ │ └── image_history.go │ │ │ │ │ ├── image_delete_response_item.go │ │ │ │ │ ├── image_summary.go │ │ │ │ │ ├── mount │ │ │ │ │ └── mount.go │ │ │ │ │ ├── network │ │ │ │ │ └── network.go │ │ │ │ │ ├── plugin.go │ │ │ │ │ ├── plugin_device.go │ │ │ │ │ ├── plugin_env.go │ │ │ │ │ ├── plugin_interface_type.go │ │ │ │ │ ├── plugin_mount.go │ │ │ │ │ ├── plugin_responses.go │ │ │ │ │ ├── port.go │ │ │ │ │ ├── registry │ │ │ │ │ ├── authenticate.go │ │ │ │ │ └── registry.go │ │ │ │ │ ├── seccomp.go │ │ │ │ │ ├── service_update_response.go │ │ │ │ │ ├── stats.go │ │ │ │ │ ├── strslice │ │ │ │ │ └── strslice.go │ │ │ │ │ ├── swarm │ │ │ │ │ ├── common.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container.go │ │ │ │ │ ├── network.go │ │ │ │ │ ├── node.go │ │ │ │ │ ├── runtime.go │ │ │ │ │ ├── runtime │ │ │ │ │ │ ├── gen.go │ │ │ │ │ │ ├── plugin.pb.go │ │ │ │ │ │ └── plugin.proto │ │ │ │ │ ├── secret.go │ │ │ │ │ ├── service.go │ │ │ │ │ ├── swarm.go │ │ │ │ │ └── task.go │ │ │ │ │ ├── time │ │ │ │ │ ├── duration_convert.go │ │ │ │ │ └── timestamp.go │ │ │ │ │ ├── types.go │ │ │ │ │ ├── versions │ │ │ │ │ ├── README.md │ │ │ │ │ └── compare.go │ │ │ │ │ ├── volume.go │ │ │ │ │ └── volume │ │ │ │ │ ├── volume_create.go │ │ │ │ │ └── volume_list.go │ │ │ ├── client │ │ │ │ ├── README.md │ │ │ │ ├── build_cancel.go │ │ │ │ ├── build_prune.go │ │ │ │ ├── checkpoint_create.go │ │ │ │ ├── checkpoint_delete.go │ │ │ │ ├── checkpoint_list.go │ │ │ │ ├── client.go │ │ │ │ ├── client_deprecated.go │ │ │ │ ├── client_unix.go │ │ │ │ ├── client_windows.go │ │ │ │ ├── config_create.go │ │ │ │ ├── config_inspect.go │ │ │ │ ├── config_list.go │ │ │ │ ├── config_remove.go │ │ │ │ ├── config_update.go │ │ │ │ ├── container_attach.go │ │ │ │ ├── container_commit.go │ │ │ │ ├── container_copy.go │ │ │ │ ├── container_create.go │ │ │ │ ├── container_diff.go │ │ │ │ ├── container_exec.go │ │ │ │ ├── container_export.go │ │ │ │ ├── container_inspect.go │ │ │ │ ├── container_kill.go │ │ │ │ ├── container_list.go │ │ │ │ ├── container_logs.go │ │ │ │ ├── container_pause.go │ │ │ │ ├── container_prune.go │ │ │ │ ├── container_remove.go │ │ │ │ ├── container_rename.go │ │ │ │ ├── container_resize.go │ │ │ │ ├── container_restart.go │ │ │ │ ├── container_start.go │ │ │ │ ├── container_stats.go │ │ │ │ ├── container_stop.go │ │ │ │ ├── container_top.go │ │ │ │ ├── container_unpause.go │ │ │ │ ├── container_update.go │ │ │ │ ├── container_wait.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── distribution_inspect.go │ │ │ │ ├── errors.go │ │ │ │ ├── events.go │ │ │ │ ├── hijack.go │ │ │ │ ├── image_build.go │ │ │ │ ├── image_create.go │ │ │ │ ├── image_history.go │ │ │ │ ├── image_import.go │ │ │ │ ├── image_inspect.go │ │ │ │ ├── image_list.go │ │ │ │ ├── image_load.go │ │ │ │ ├── image_prune.go │ │ │ │ ├── image_pull.go │ │ │ │ ├── image_push.go │ │ │ │ ├── image_remove.go │ │ │ │ ├── image_save.go │ │ │ │ ├── image_search.go │ │ │ │ ├── image_tag.go │ │ │ │ ├── info.go │ │ │ │ ├── interface.go │ │ │ │ ├── interface_experimental.go │ │ │ │ ├── interface_stable.go │ │ │ │ ├── login.go │ │ │ │ ├── network_connect.go │ │ │ │ ├── network_create.go │ │ │ │ ├── network_disconnect.go │ │ │ │ ├── network_inspect.go │ │ │ │ ├── network_list.go │ │ │ │ ├── network_prune.go │ │ │ │ ├── network_remove.go │ │ │ │ ├── node_inspect.go │ │ │ │ ├── node_list.go │ │ │ │ ├── node_remove.go │ │ │ │ ├── node_update.go │ │ │ │ ├── options.go │ │ │ │ ├── ping.go │ │ │ │ ├── plugin_create.go │ │ │ │ ├── plugin_disable.go │ │ │ │ ├── plugin_enable.go │ │ │ │ ├── plugin_inspect.go │ │ │ │ ├── plugin_install.go │ │ │ │ ├── plugin_list.go │ │ │ │ ├── plugin_push.go │ │ │ │ ├── plugin_remove.go │ │ │ │ ├── plugin_set.go │ │ │ │ ├── plugin_upgrade.go │ │ │ │ ├── request.go │ │ │ │ ├── secret_create.go │ │ │ │ ├── secret_inspect.go │ │ │ │ ├── secret_list.go │ │ │ │ ├── secret_remove.go │ │ │ │ ├── secret_update.go │ │ │ │ ├── service_create.go │ │ │ │ ├── service_inspect.go │ │ │ │ ├── service_list.go │ │ │ │ ├── service_logs.go │ │ │ │ ├── service_remove.go │ │ │ │ ├── service_update.go │ │ │ │ ├── swarm_get_unlock_key.go │ │ │ │ ├── swarm_init.go │ │ │ │ ├── swarm_inspect.go │ │ │ │ ├── swarm_join.go │ │ │ │ ├── swarm_leave.go │ │ │ │ ├── swarm_unlock.go │ │ │ │ ├── swarm_update.go │ │ │ │ ├── task_inspect.go │ │ │ │ ├── task_list.go │ │ │ │ ├── task_logs.go │ │ │ │ ├── transport.go │ │ │ │ ├── utils.go │ │ │ │ ├── version.go │ │ │ │ ├── volume_create.go │ │ │ │ ├── volume_inspect.go │ │ │ │ ├── volume_list.go │ │ │ │ ├── volume_prune.go │ │ │ │ └── volume_remove.go │ │ │ └── errdefs │ │ │ │ ├── defs.go │ │ │ │ ├── doc.go │ │ │ │ ├── helpers.go │ │ │ │ ├── http_helpers.go │ │ │ │ └── is.go │ │ ├── go-connections │ │ │ ├── LICENSE │ │ │ ├── nat │ │ │ │ ├── nat.go │ │ │ │ ├── parse.go │ │ │ │ └── sort.go │ │ │ ├── sockets │ │ │ │ ├── README.md │ │ │ │ ├── inmem_socket.go │ │ │ │ ├── proxy.go │ │ │ │ ├── sockets.go │ │ │ │ ├── sockets_unix.go │ │ │ │ ├── sockets_windows.go │ │ │ │ ├── tcp_socket.go │ │ │ │ └── unix_socket.go │ │ │ └── tlsconfig │ │ │ │ ├── certpool_go17.go │ │ │ │ ├── certpool_other.go │ │ │ │ ├── config.go │ │ │ │ ├── config_client_ciphers.go │ │ │ │ └── config_legacy_client_ciphers.go │ │ └── go-units │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── circle.yml │ │ │ ├── duration.go │ │ │ ├── size.go │ │ │ └── ulimit.go │ ├── gogo │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── gogoproto │ │ │ ├── Makefile │ │ │ ├── doc.go │ │ │ ├── gogo.pb.go │ │ │ ├── gogo.pb.golden │ │ │ ├── gogo.proto │ │ │ └── helper.go │ │ │ ├── proto │ │ │ ├── Makefile │ │ │ ├── clone.go │ │ │ ├── custom_gogo.go │ │ │ ├── decode.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── duration.go │ │ │ ├── duration_gogo.go │ │ │ ├── encode.go │ │ │ ├── encode_gogo.go │ │ │ ├── equal.go │ │ │ ├── extensions.go │ │ │ ├── extensions_gogo.go │ │ │ ├── lib.go │ │ │ ├── lib_gogo.go │ │ │ ├── message_set.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_reflect_gogo.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── pointer_unsafe_gogo.go │ │ │ ├── properties.go │ │ │ ├── properties_gogo.go │ │ │ ├── skip_gogo.go │ │ │ ├── table_marshal.go │ │ │ ├── table_marshal_gogo.go │ │ │ ├── table_merge.go │ │ │ ├── table_unmarshal.go │ │ │ ├── table_unmarshal_gogo.go │ │ │ ├── text.go │ │ │ ├── text_gogo.go │ │ │ ├── text_parser.go │ │ │ ├── timestamp.go │ │ │ ├── timestamp_gogo.go │ │ │ ├── wrappers.go │ │ │ └── wrappers_gogo.go │ │ │ └── protoc-gen-gogo │ │ │ └── descriptor │ │ │ ├── Makefile │ │ │ ├── descriptor.go │ │ │ ├── descriptor.pb.go │ │ │ ├── descriptor_gostring.gen.go │ │ │ └── helper.go │ ├── golang │ │ ├── glog │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── glog.go │ │ │ └── glog_file.go │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ ├── proto │ │ │ ├── clone.go │ │ │ ├── decode.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── encode.go │ │ │ ├── equal.go │ │ │ ├── extensions.go │ │ │ ├── lib.go │ │ │ ├── message_set.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── properties.go │ │ │ ├── table_marshal.go │ │ │ ├── table_merge.go │ │ │ ├── table_unmarshal.go │ │ │ ├── text.go │ │ │ └── text_parser.go │ │ │ └── ptypes │ │ │ ├── any.go │ │ │ ├── any │ │ │ ├── any.pb.go │ │ │ └── any.proto │ │ │ ├── doc.go │ │ │ ├── duration.go │ │ │ ├── duration │ │ │ ├── duration.pb.go │ │ │ └── duration.proto │ │ │ ├── timestamp.go │ │ │ └── timestamp │ │ │ ├── timestamp.pb.go │ │ │ └── timestamp.proto │ ├── konsorten │ │ └── go-windows-terminal-sequences │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ └── sequences.go │ ├── mitchellh │ │ └── go-ps │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── Vagrantfile │ │ │ ├── process.go │ │ │ ├── process_darwin.go │ │ │ ├── process_freebsd.go │ │ │ ├── process_linux.go │ │ │ ├── process_solaris.go │ │ │ ├── process_unix.go │ │ │ └── process_windows.go │ ├── opencontainers │ │ ├── go-digest │ │ │ ├── .pullapprove.yml │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.code │ │ │ ├── LICENSE.docs │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── algorithm.go │ │ │ ├── digest.go │ │ │ ├── digester.go │ │ │ ├── doc.go │ │ │ └── verifiers.go │ │ └── image-spec │ │ │ ├── LICENSE │ │ │ └── specs-go │ │ │ ├── v1 │ │ │ ├── annotations.go │ │ │ ├── config.go │ │ │ ├── descriptor.go │ │ │ ├── index.go │ │ │ ├── layout.go │ │ │ ├── manifest.go │ │ │ └── mediatype.go │ │ │ ├── version.go │ │ │ └── versioned.go │ ├── pkg │ │ └── errors │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── errors.go │ │ │ └── stack.go │ └── sirupsen │ │ └── logrus │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── hooks.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_bsd.go │ │ ├── terminal_check_no_terminal.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_solaris.go │ │ ├── terminal_check_unix.go │ │ ├── terminal_check_windows.go │ │ ├── text_formatter.go │ │ └── writer.go ├── golang.org │ └── x │ │ ├── net │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── context │ │ │ ├── context.go │ │ │ ├── go17.go │ │ │ ├── go19.go │ │ │ ├── pre_go17.go │ │ │ └── pre_go19.go │ │ ├── http │ │ │ └── httpguts │ │ │ │ ├── guts.go │ │ │ │ └── httplex.go │ │ ├── http2 │ │ │ ├── .gitignore │ │ │ ├── Dockerfile │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── ciphers.go │ │ │ ├── client_conn_pool.go │ │ │ ├── databuffer.go │ │ │ ├── errors.go │ │ │ ├── flow.go │ │ │ ├── frame.go │ │ │ ├── go111.go │ │ │ ├── gotrack.go │ │ │ ├── headermap.go │ │ │ ├── hpack │ │ │ │ ├── encode.go │ │ │ │ ├── hpack.go │ │ │ │ ├── huffman.go │ │ │ │ └── tables.go │ │ │ ├── http2.go │ │ │ ├── not_go111.go │ │ │ ├── pipe.go │ │ │ ├── server.go │ │ │ ├── transport.go │ │ │ ├── write.go │ │ │ ├── writesched.go │ │ │ ├── writesched_priority.go │ │ │ └── writesched_random.go │ │ ├── idna │ │ │ ├── idna10.0.0.go │ │ │ ├── idna9.0.0.go │ │ │ ├── punycode.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.00.go │ │ │ ├── tables9.0.0.go │ │ │ ├── trie.go │ │ │ └── trieval.go │ │ ├── internal │ │ │ ├── socks │ │ │ │ ├── client.go │ │ │ │ └── socks.go │ │ │ └── timeseries │ │ │ │ └── timeseries.go │ │ ├── proxy │ │ │ ├── dial.go │ │ │ ├── direct.go │ │ │ ├── per_host.go │ │ │ ├── proxy.go │ │ │ └── socks5.go │ │ └── trace │ │ │ ├── events.go │ │ │ ├── histogram.go │ │ │ └── trace.go │ │ ├── sys │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── unix │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_freebsd_arm64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_netbsd_arm64.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_openbsd_arm.s │ │ │ ├── asm_openbsd_arm64.s │ │ │ ├── asm_solaris_amd64.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 │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── errors_freebsd_386.go │ │ │ ├── errors_freebsd_amd64.go │ │ │ ├── errors_freebsd_arm.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ioctl.go │ │ │ ├── mkall.sh │ │ │ ├── mkasm_darwin.go │ │ │ ├── mkerrors.sh │ │ │ ├── mkpost.go │ │ │ ├── mksyscall.go │ │ │ ├── mksyscall_aix_ppc.go │ │ │ ├── mksyscall_aix_ppc64.go │ │ │ ├── mksyscall_solaris.go │ │ │ ├── mksysctl_openbsd.go │ │ │ ├── mksysnum.go │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_386.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm.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_linux.go │ │ │ ├── syscall_linux_386.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_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.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_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── timestruct.go │ │ │ ├── types_aix.go │ │ │ ├── types_darwin.go │ │ │ ├── types_dragonfly.go │ │ │ ├── types_freebsd.go │ │ │ ├── types_netbsd.go │ │ │ ├── types_openbsd.go │ │ │ ├── types_solaris.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.go │ │ │ ├── zerrors_darwin_386.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm.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_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.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_solaris_amd64.go │ │ │ ├── zptrace386_linux.go │ │ │ ├── zptracearm_linux.go │ │ │ ├── zptracemips_linux.go │ │ │ ├── zptracemipsle_linux.go │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_386.1_11.go │ │ │ ├── zsyscall_darwin_386.go │ │ │ ├── zsyscall_darwin_386.s │ │ │ ├── zsyscall_darwin_amd64.1_11.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm.1_11.go │ │ │ ├── zsyscall_darwin_arm.go │ │ │ ├── zsyscall_darwin_arm.s │ │ │ ├── zsyscall_darwin_arm64.1_11.go │ │ │ ├── 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_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.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_solaris_amd64.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysnum_darwin_386.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm.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_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.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 │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.go │ │ │ ├── ztypes_darwin_386.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm.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_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.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_solaris_amd64.go │ │ └── windows │ │ │ ├── aliases.go │ │ │ ├── asm_windows_386.s │ │ │ ├── asm_windows_amd64.s │ │ │ ├── asm_windows_arm.s │ │ │ ├── dll_windows.go │ │ │ ├── env_windows.go │ │ │ ├── eventlog.go │ │ │ ├── exec_windows.go │ │ │ ├── memory_windows.go │ │ │ ├── mkerrors.bash │ │ │ ├── mkerrors.go │ │ │ ├── mksyscall.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── security_windows.go │ │ │ ├── service.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_windows.go │ │ │ ├── types_windows.go │ │ │ ├── types_windows_386.go │ │ │ ├── types_windows_amd64.go │ │ │ ├── types_windows_arm.go │ │ │ ├── zerrors_windows.go │ │ │ └── zsyscall_windows.go │ │ └── text │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── secure │ │ └── bidirule │ │ │ ├── bidirule.go │ │ │ ├── bidirule10.0.0.go │ │ │ └── bidirule9.0.0.go │ │ ├── transform │ │ └── transform.go │ │ └── unicode │ │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── gen.go │ │ ├── gen_ranges.go │ │ ├── gen_trieval.go │ │ ├── prop.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ └── trieval.go │ │ └── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── maketables.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables10.0.0.go │ │ ├── tables9.0.0.go │ │ ├── transform.go │ │ ├── trie.go │ │ └── triegen.go ├── google.golang.org │ ├── genproto │ │ ├── LICENSE │ │ └── googleapis │ │ │ └── rpc │ │ │ └── status │ │ │ └── status.pb.go │ └── grpc │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CODE-OF-CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── GOVERNANCE.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── README.md │ │ ├── backoff.go │ │ ├── backoff │ │ └── backoff.go │ │ ├── balancer.go │ │ ├── balancer │ │ ├── balancer.go │ │ ├── base │ │ │ ├── balancer.go │ │ │ └── base.go │ │ └── roundrobin │ │ │ └── roundrobin.go │ │ ├── balancer_conn_wrappers.go │ │ ├── balancer_v1_wrapper.go │ │ ├── binarylog │ │ └── grpc_binarylog_v1 │ │ │ └── binarylog.pb.go │ │ ├── call.go │ │ ├── clientconn.go │ │ ├── codec.go │ │ ├── codegen.sh │ │ ├── codes │ │ ├── code_string.go │ │ └── codes.go │ │ ├── connectivity │ │ └── connectivity.go │ │ ├── credentials │ │ ├── credentials.go │ │ ├── internal │ │ │ ├── syscallconn.go │ │ │ └── syscallconn_appengine.go │ │ └── tls13.go │ │ ├── dialoptions.go │ │ ├── doc.go │ │ ├── encoding │ │ ├── encoding.go │ │ └── proto │ │ │ └── proto.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── grpclog │ │ ├── grpclog.go │ │ ├── logger.go │ │ └── loggerv2.go │ │ ├── install_gae.sh │ │ ├── interceptor.go │ │ ├── internal │ │ ├── backoff │ │ │ └── backoff.go │ │ ├── balancerload │ │ │ └── load.go │ │ ├── binarylog │ │ │ ├── binarylog.go │ │ │ ├── binarylog_testutil.go │ │ │ ├── env_config.go │ │ │ ├── method_logger.go │ │ │ ├── regenerate.sh │ │ │ ├── sink.go │ │ │ └── util.go │ │ ├── buffer │ │ │ └── unbounded.go │ │ ├── channelz │ │ │ ├── funcs.go │ │ │ ├── types.go │ │ │ ├── types_linux.go │ │ │ ├── types_nonlinux.go │ │ │ ├── util_linux.go │ │ │ └── util_nonlinux.go │ │ ├── envconfig │ │ │ └── envconfig.go │ │ ├── grpcrand │ │ │ └── grpcrand.go │ │ ├── grpcsync │ │ │ └── event.go │ │ ├── internal.go │ │ ├── resolver │ │ │ ├── dns │ │ │ │ └── dns_resolver.go │ │ │ └── passthrough │ │ │ │ └── passthrough.go │ │ ├── syscall │ │ │ ├── syscall_linux.go │ │ │ └── syscall_nonlinux.go │ │ └── transport │ │ │ ├── bdp_estimator.go │ │ │ ├── controlbuf.go │ │ │ ├── defaults.go │ │ │ ├── flowcontrol.go │ │ │ ├── handler_server.go │ │ │ ├── http2_client.go │ │ │ ├── http2_server.go │ │ │ ├── http_util.go │ │ │ ├── log.go │ │ │ └── transport.go │ │ ├── keepalive │ │ └── keepalive.go │ │ ├── metadata │ │ └── metadata.go │ │ ├── naming │ │ ├── dns_resolver.go │ │ └── naming.go │ │ ├── peer │ │ └── peer.go │ │ ├── picker_wrapper.go │ │ ├── pickfirst.go │ │ ├── preloader.go │ │ ├── proxy.go │ │ ├── resolver │ │ └── resolver.go │ │ ├── resolver_conn_wrapper.go │ │ ├── rpc_util.go │ │ ├── server.go │ │ ├── service_config.go │ │ ├── serviceconfig │ │ └── serviceconfig.go │ │ ├── stats │ │ ├── handlers.go │ │ └── stats.go │ │ ├── status │ │ └── status.go │ │ ├── stream.go │ │ ├── tap │ │ └── tap.go │ │ ├── trace.go │ │ ├── version.go │ │ └── vet.sh ├── gopkg.in │ └── fsnotify │ │ └── fsnotify.v1 │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── k8s.io │ └── kubernetes │ │ ├── LICENSE │ │ └── pkg │ │ └── kubelet │ │ └── apis │ │ └── podresources │ │ └── v1alpha1 │ │ ├── BUILD │ │ ├── api.pb.go │ │ └── api.proto └── modules.txt └── watchers.go /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Go template 3 | # Binaries for programs and plugins 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, built with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Dependency directories (remove the comment below to include it) 17 | # vendor/ 18 | .idea/ 19 | 20 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stretch-slim 2 | 3 | ADD src/pod-gpu-metrics-exporter /usr/bin/pod-gpu-metrics-exporter 4 | 5 | ENV NVIDIA_VISIBLE_DEVICES=all 6 | ENV NVIDIA_DRIVER_CAPABILITIES=utility 7 | 8 | ENTRYPOINT ["pod-gpu-metrics-exporter", "-logtostderr", "-v", "8"] 9 | #ENTRYPOINT ["pod-gpu-metrics-exporter"] 10 | -------------------------------------------------------------------------------- /Dockerfile_origin: -------------------------------------------------------------------------------- 1 | FROM golang:1.11 as build 2 | 3 | WORKDIR /go/src/pod-gpu-metrics-exporter 4 | COPY src . 5 | 6 | RUN go install -v pod-gpu-metrics-exporter 7 | 8 | FROM debian:stretch-slim 9 | 10 | COPY --from=build /go/bin/pod-gpu-metrics-exporter /usr/bin/pod-gpu-metrics-exporter 11 | 12 | ENTRYPOINT ["pod-gpu-metrics-exporter", "-logtostderr"] 13 | -------------------------------------------------------------------------------- /dcgm-exporter/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | ARG DCGM_VERSION=1.4.6 4 | 5 | COPY datacenter-gpu-manager_${DCGM_VERSION}_amd64.deb /tmp 6 | RUN dpkg -i /tmp/*.deb && rm -f /tmp/* 7 | 8 | COPY dcgm-exporter /usr/local/bin 9 | 10 | ENV NVIDIA_VISIBLE_DEVICES all 11 | ENV NVIDIA_DRIVER_CAPABILITIES utility 12 | 13 | VOLUME /run/prometheus 14 | 15 | ENTRYPOINT [ "dcgm-exporter", "-e" ] 16 | -------------------------------------------------------------------------------- /docker_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ROOT_PATH=$(pwd) 4 | 5 | cd ${ROOT_PATH}/src 6 | go build -o pod-gpu-metrics-exporter -v github.com/ruanxingbaozi/pod-gpu-metrics-exporter/src 7 | 8 | cd ${ROOT_PATH} 9 | sudo docker build -t ruanxingbaozi/pod-gpu-metrics-exporter:v1.0.0-alpha . 10 | 11 | kubectl apply -f pod-gpu-metrics-exporter-daemonset.yaml 12 | 13 | kubectl get po -nkube-system | grep pod-gpu-metrics-exporter | awk '{print $1}' | xargs kubectl delete po -nkube-system 14 | 15 | sleep 3 16 | kubectl get po -nkube-system | grep pod-gpu-metrics-exporter | awk '{print $1}' | xargs kubectl logs -f -nkube-system -c pod-nvidia-gpu-metrics-exporter 17 | 18 | 19 | # kubectl exec -it $(kubectl get po -nkube-system | grep pod-gpu-metrics-exporter | awk '{print $1}') -nkube-system -c pod-nvidia-gpu-metrics-exporter bash 20 | # kubectl exec -it $(kubectl get po -nkube-system | grep pod-gpu-metrics-exporter | awk '{print $1}') -nkube-system -c nvidia-dcgm-exporter bash -------------------------------------------------------------------------------- /example/dual-process.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Starting Process 01" 4 | nohup python /main.py >process1.log & 5 | echo "Running Process 01" 6 | 7 | 8 | 9 | echo "Starting Process 02" 10 | python /main.py -------------------------------------------------------------------------------- /example/pod-dual.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: test-pod-02 5 | spec: 6 | containers: 7 | - image: nvcr.io/nvidia/pytorch:19.10-py3 8 | name: nvidia-test 9 | imagePullPolicy: IfNotPresent 10 | command: ['sh','-c','sh /entrypoint.sh'] 11 | volumeMounts: 12 | - mountPath: /main.py 13 | name: program 14 | - mountPath: /entrypoint.sh 15 | name: entrypoint 16 | resources: 17 | limits: 18 | nvidia.com/gpu: 1 19 | requests: 20 | nvidia.com/gpu: 1 21 | volumes: 22 | - hostPath: 23 | path: /home/amax/package/main.py 24 | name: program 25 | - hostPath: 26 | path: /home/amax/package/dual-process.sh 27 | name: entrypoint 28 | -------------------------------------------------------------------------------- /example/pod-single.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: test-pod-01 5 | spec: 6 | containers: 7 | - image: nvcr.io/nvidia/pytorch:19.10-py3 8 | name: nvidia-test 9 | imagePullPolicy: IfNotPresent 10 | command: ['sh','-c','python /main.py'] 11 | volumeMounts: 12 | - mountPath: /main.py 13 | name: program 14 | resources: 15 | limits: 16 | nvidia.com/gpu: 1 17 | requests: 18 | nvidia.com/gpu: 1 19 | volumes: 20 | - hostPath: 21 | path: /home/amax/package/main.py 22 | name: program -------------------------------------------------------------------------------- /grafana/grafana-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: grafana-datasource 5 | namespace: kube-system 6 | labels: 7 | grafana_datasource: "true" 8 | data: 9 | datasource.yml: |- 10 | apiVersion: 1 11 | datasources: 12 | - name: Prometheus 13 | type: prometheus 14 | access: proxy 15 | orgId: 1 16 | url: http://prometheus:9090 17 | isDefault: true -------------------------------------------------------------------------------- /grafana/grafana-dashboard-providers.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: grafana-dashboard-providers 5 | namespace: kube-system 6 | labels: 7 | grafana_dashboard: "true" 8 | data: 9 | datasource.yml: |- 10 | apiVersion: 1 11 | providers: 12 | - name: 'default' 13 | orgId: 1 14 | folder: '' 15 | type: file 16 | disableDeletion: false 17 | updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards 18 | options: 19 | path: /var/lib/grafana/dashboards/ 20 | -------------------------------------------------------------------------------- /grafana/grafana-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: grafana-ingress 5 | namespace: kube-system 6 | annotations: 7 | nginx.ingress.kubernetes.io/rewrite-target: /$1 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /grafana/(.*) 13 | backend: 14 | serviceName: grafana 15 | servicePort: 3000 16 | -------------------------------------------------------------------------------- /grafana/grafana-servife.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: grafana 5 | namespace: kube-system 6 | labels: 7 | app: grafana 8 | component: core 9 | spec: 10 | type: NodePort 11 | ports: 12 | - port: 3000 13 | targetPort: 3000 14 | nodePort: 30000 15 | selector: 16 | app: grafana 17 | component: core 18 | -------------------------------------------------------------------------------- /prometheus/prometheus-configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | creationTimestamp: null 5 | name: prometheus-config 6 | namespace: monitoring 7 | data: 8 | prometheus.yaml: | 9 | global: 10 | scrape_interval: 15s 11 | scrape_configs: 12 | - job_name: prometheus 13 | scrape_interval: 5s 14 | static_configs: 15 | - targets: 16 | - localhost:9090 17 | - job_name: gpu_metrics 18 | scrape_interval: 1s 19 | metrics_path: /gpu/metrics 20 | scheme: http 21 | static_configs: 22 | - targets: 23 | - localhost:9400 -------------------------------------------------------------------------------- /prometheus/prometheus-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: prometheus 5 | namespace: monitoring 6 | spec: 7 | replicas: 1 8 | template: 9 | metadata: 10 | labels: 11 | app: prometheus 12 | name: prometheus 13 | spec: 14 | containers: 15 | - image: prom/prometheus:v2.7.1 16 | name: prometheus 17 | args: 18 | - "--config.file=/etc/prometheus/prometheus.yaml" 19 | ports: 20 | - containerPort: 9090 21 | hostPort: 9090 22 | volumeMounts: 23 | - name: config-volume 24 | mountPath: /etc/prometheus 25 | 26 | volumes: 27 | - name: config-volume 28 | configMap: 29 | name: prometheus-config 30 | 31 | hostNetwork: true -------------------------------------------------------------------------------- /prometheus/prometheus-service.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | labels: 5 | app: prometheus 6 | name: prometheus 7 | namespace: kube-system 8 | spec: 9 | type: NodePort 10 | ports: 11 | - port: 9090 12 | targetPort: 9090 13 | nodePort: 30003 14 | selector: 15 | app: prometheus 16 | -------------------------------------------------------------------------------- /prometheus/rbac.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: prometheus 5 | rules: 6 | - apiGroups: [""] 7 | resources: 8 | - nodes 9 | - nodes/proxy 10 | - services 11 | - endpoints 12 | - pods 13 | verbs: ["get", "list", "watch"] 14 | - apiGroups: 15 | - extensions 16 | resources: 17 | - ingresses 18 | verbs: ["get", "list", "watch"] 19 | - nonResourceURLs: ["/metrics"] 20 | verbs: ["get"] 21 | --- 22 | apiVersion: v1 23 | kind: ServiceAccount 24 | metadata: 25 | name: prometheus 26 | namespace: kube-system 27 | --- 28 | apiVersion: rbac.authorization.k8s.io/v1 29 | kind: ClusterRoleBinding 30 | metadata: 31 | name: prometheus 32 | roleRef: 33 | apiGroup: rbac.authorization.k8s.io 34 | kind: ClusterRole 35 | name: prometheus 36 | subjects: 37 | - kind: ServiceAccount 38 | name: prometheus 39 | namespace: kube-system 40 | -------------------------------------------------------------------------------- /src/file_utils.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "os" 8 | ) 9 | 10 | func writeDestFile(tmpF string, destFile string) error { 11 | err := os.Rename(tmpF, destFile) 12 | if err != nil { 13 | return fmt.Errorf("error replacing temp file with %s: %v", destFile, err) 14 | } 15 | 16 | // Set read permissions 17 | mode := os.FileMode(0644) 18 | err = os.Chmod(destFile, mode) 19 | if err != nil { 20 | return fmt.Errorf("error setting %s file permissions: %v", destFile, err) 21 | } 22 | return nil 23 | } 24 | 25 | func createMetricsDir(dir string) error { 26 | err := os.MkdirAll(dir, os.ModePerm) 27 | if err != nil { 28 | return fmt.Errorf("err creating directory %s: %v", dir, err) 29 | } 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/github.com/Microsoft/go-winio/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | -------------------------------------------------------------------------------- /src/vendor/github.com/Microsoft/go-winio/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/Microsoft/go-winio 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/pkg/errors v0.8.1 7 | github.com/sirupsen/logrus v1.4.1 8 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b 9 | ) 10 | -------------------------------------------------------------------------------- /src/vendor/github.com/Microsoft/go-winio/syscall.go: -------------------------------------------------------------------------------- 1 | package winio 2 | 3 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go file.go pipe.go sd.go fileinfo.go privilege.go backup.go hvsock.go 4 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/common.go: -------------------------------------------------------------------------------- 1 | package api // import "github.com/docker/docker/api" 2 | 3 | // Common constants for daemon and client. 4 | const ( 5 | // DefaultVersion of Current REST API 6 | DefaultVersion = "1.40" 7 | 8 | // NoBaseImageSpecifier is the symbol used by the FROM 9 | // command to specify that no base image is to be used. 10 | NoBaseImageSpecifier = "scratch" 11 | ) 12 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/common_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package api // import "github.com/docker/docker/api" 4 | 5 | // MinVersion represents Minimum REST API version supported 6 | const MinVersion = "1.12" 7 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/common_windows.go: -------------------------------------------------------------------------------- 1 | package api // import "github.com/docker/docker/api" 2 | 3 | // MinVersion represents Minimum REST API version supported 4 | // Technically the first daemon API version released on Windows is v1.25 in 5 | // engine version 1.13. However, some clients are explicitly using downlevel 6 | // APIs (e.g. docker-compose v2.1 file format) and that is just too restrictive. 7 | // Hence also allowing 1.24 on Windows. 8 | const MinVersion string = "1.24" 9 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/swagger-gen.yaml: -------------------------------------------------------------------------------- 1 | 2 | layout: 3 | models: 4 | - name: definition 5 | source: asset:model 6 | target: "{{ joinFilePath .Target .ModelPackage }}" 7 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 8 | operations: 9 | - name: handler 10 | source: asset:serverOperation 11 | target: "{{ joinFilePath .Target .APIPackage .Package }}" 12 | file_name: "{{ (snakize (pascalize .Name)) }}.go" 13 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/auth.go: -------------------------------------------------------------------------------- 1 | package types // import "github.com/docker/docker/api/types" 2 | 3 | // AuthConfig contains authorization information for connecting to a Registry 4 | type AuthConfig struct { 5 | Username string `json:"username,omitempty"` 6 | Password string `json:"password,omitempty"` 7 | Auth string `json:"auth,omitempty"` 8 | 9 | // Email is an optional value associated with the username. 10 | // This field is deprecated and will be removed in a later 11 | // version of docker. 12 | Email string `json:"email,omitempty"` 13 | 14 | ServerAddress string `json:"serveraddress,omitempty"` 15 | 16 | // IdentityToken is used to authenticate the user and get 17 | // an access token for the registry. 18 | IdentityToken string `json:"identitytoken,omitempty"` 19 | 20 | // RegistryToken is a bearer token to be sent to a registry 21 | RegistryToken string `json:"registrytoken,omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/blkiodev/blkio.go: -------------------------------------------------------------------------------- 1 | package blkiodev // import "github.com/docker/docker/api/types/blkiodev" 2 | 3 | import "fmt" 4 | 5 | // WeightDevice is a structure that holds device:weight pair 6 | type WeightDevice struct { 7 | Path string 8 | Weight uint16 9 | } 10 | 11 | func (w *WeightDevice) String() string { 12 | return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 | } 14 | 15 | // ThrottleDevice is a structure that holds device:rate_per_second pair 16 | type ThrottleDevice struct { 17 | Path string 18 | Rate uint64 19 | } 20 | 21 | func (t *ThrottleDevice) String() string { 22 | return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/container_changes.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerChangeResponseItem change item in response to ContainerChanges operation 11 | // swagger:model ContainerChangeResponseItem 12 | type ContainerChangeResponseItem struct { 13 | 14 | // Kind of change 15 | // Required: true 16 | Kind uint8 `json:"Kind"` 17 | 18 | // Path to file that has changed 19 | // Required: true 20 | Path string `json:"Path"` 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/container_create.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerCreateCreatedBody OK response to ContainerCreate operation 11 | // swagger:model ContainerCreateCreatedBody 12 | type ContainerCreateCreatedBody struct { 13 | 14 | // The ID of the created container 15 | // Required: true 16 | ID string `json:"Id"` 17 | 18 | // Warnings encountered when creating the container 19 | // Required: true 20 | Warnings []string `json:"Warnings"` 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/container_top.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerTopOKBody OK response to ContainerTop operation 11 | // swagger:model ContainerTopOKBody 12 | type ContainerTopOKBody struct { 13 | 14 | // Each process running in the container, where each is process is an array of values corresponding to the titles 15 | // Required: true 16 | Processes [][]string `json:"Processes"` 17 | 18 | // The ps column titles 19 | // Required: true 20 | Titles []string `json:"Titles"` 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/container_update.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerUpdateOKBody OK response to ContainerUpdate operation 11 | // swagger:model ContainerUpdateOKBody 12 | type ContainerUpdateOKBody struct { 13 | 14 | // warnings 15 | // Required: true 16 | Warnings []string `json:"Warnings"` 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/container_wait.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // ContainerWaitOKBodyError container waiting error, if any 11 | // swagger:model ContainerWaitOKBodyError 12 | type ContainerWaitOKBodyError struct { 13 | 14 | // Details of an error 15 | Message string `json:"Message,omitempty"` 16 | } 17 | 18 | // ContainerWaitOKBody OK response to ContainerWait operation 19 | // swagger:model ContainerWaitOKBody 20 | type ContainerWaitOKBody struct { 21 | 22 | // error 23 | // Required: true 24 | Error *ContainerWaitOKBodyError `json:"Error"` 25 | 26 | // Exit code of the container 27 | // Required: true 28 | StatusCode int64 `json:"StatusCode"` 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/container/waitcondition.go: -------------------------------------------------------------------------------- 1 | package container // import "github.com/docker/docker/api/types/container" 2 | 3 | // WaitCondition is a type used to specify a container state for which 4 | // to wait. 5 | type WaitCondition string 6 | 7 | // Possible WaitCondition Values. 8 | // 9 | // WaitConditionNotRunning (default) is used to wait for any of the non-running 10 | // states: "created", "exited", "dead", "removing", or "removed". 11 | // 12 | // WaitConditionNextExit is used to wait for the next time the state changes 13 | // to a non-running state. If the state is currently "created" or "exited", 14 | // this would cause Wait() to block until either the container runs and exits 15 | // or is removed. 16 | // 17 | // WaitConditionRemoved is used to wait for the container to be removed. 18 | const ( 19 | WaitConditionNotRunning WaitCondition = "not-running" 20 | WaitConditionNextExit WaitCondition = "next-exit" 21 | WaitConditionRemoved WaitCondition = "removed" 22 | ) 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/error_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ErrorResponse Represents an error. 7 | // swagger:model ErrorResponse 8 | type ErrorResponse struct { 9 | 10 | // The error message. 11 | // Required: true 12 | Message string `json:"message"` 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/graph_driver_data.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // GraphDriverData Information about a container's graph driver. 7 | // swagger:model GraphDriverData 8 | type GraphDriverData struct { 9 | 10 | // data 11 | // Required: true 12 | Data map[string]string `json:"Data"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/id_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // IDResponse Response to an API call that returns just an Id 7 | // swagger:model IdResponse 8 | type IDResponse struct { 9 | 10 | // The id of the newly created object. 11 | // Required: true 12 | ID string `json:"Id"` 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/image/image_history.go: -------------------------------------------------------------------------------- 1 | package image // import "github.com/docker/docker/api/types/image" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // HistoryResponseItem individual image layer information in response to ImageHistory operation 11 | // swagger:model HistoryResponseItem 12 | type HistoryResponseItem struct { 13 | 14 | // comment 15 | // Required: true 16 | Comment string `json:"Comment"` 17 | 18 | // created 19 | // Required: true 20 | Created int64 `json:"Created"` 21 | 22 | // created by 23 | // Required: true 24 | CreatedBy string `json:"CreatedBy"` 25 | 26 | // Id 27 | // Required: true 28 | ID string `json:"Id"` 29 | 30 | // size 31 | // Required: true 32 | Size int64 `json:"Size"` 33 | 34 | // tags 35 | // Required: true 36 | Tags []string `json:"Tags"` 37 | } 38 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/image_delete_response_item.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ImageDeleteResponseItem image delete response item 7 | // swagger:model ImageDeleteResponseItem 8 | type ImageDeleteResponseItem struct { 9 | 10 | // The image ID of an image that was deleted 11 | Deleted string `json:"Deleted,omitempty"` 12 | 13 | // The image ID of an image that was untagged 14 | Untagged string `json:"Untagged,omitempty"` 15 | } 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/plugin_device.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginDevice plugin device 7 | // swagger:model PluginDevice 8 | type PluginDevice struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // path 19 | // Required: true 20 | Path *string `json:"Path"` 21 | 22 | // settable 23 | // Required: true 24 | Settable []string `json:"Settable"` 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/plugin_env.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginEnv plugin env 7 | // swagger:model PluginEnv 8 | type PluginEnv struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // name 15 | // Required: true 16 | Name string `json:"Name"` 17 | 18 | // settable 19 | // Required: true 20 | Settable []string `json:"Settable"` 21 | 22 | // value 23 | // Required: true 24 | Value *string `json:"Value"` 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/plugin_interface_type.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginInterfaceType plugin interface type 7 | // swagger:model PluginInterfaceType 8 | type PluginInterfaceType struct { 9 | 10 | // capability 11 | // Required: true 12 | Capability string `json:"Capability"` 13 | 14 | // prefix 15 | // Required: true 16 | Prefix string `json:"Prefix"` 17 | 18 | // version 19 | // Required: true 20 | Version string `json:"Version"` 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/plugin_mount.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // PluginMount plugin mount 7 | // swagger:model PluginMount 8 | type PluginMount struct { 9 | 10 | // description 11 | // Required: true 12 | Description string `json:"Description"` 13 | 14 | // destination 15 | // Required: true 16 | Destination string `json:"Destination"` 17 | 18 | // name 19 | // Required: true 20 | Name string `json:"Name"` 21 | 22 | // options 23 | // Required: true 24 | Options []string `json:"Options"` 25 | 26 | // settable 27 | // Required: true 28 | Settable []string `json:"Settable"` 29 | 30 | // source 31 | // Required: true 32 | Source *string `json:"Source"` 33 | 34 | // type 35 | // Required: true 36 | Type string `json:"Type"` 37 | } 38 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/port.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // Port An open port on a container 7 | // swagger:model Port 8 | type Port struct { 9 | 10 | // Host IP address that the container's port is mapped to 11 | IP string `json:"IP,omitempty"` 12 | 13 | // Port on the container 14 | // Required: true 15 | PrivatePort uint16 `json:"PrivatePort"` 16 | 17 | // Port exposed on the host 18 | PublicPort uint16 `json:"PublicPort,omitempty"` 19 | 20 | // type 21 | // Required: true 22 | Type string `json:"Type"` 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/registry/authenticate.go: -------------------------------------------------------------------------------- 1 | package registry // import "github.com/docker/docker/api/types/registry" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // AuthenticateOKBody authenticate o k body 11 | // swagger:model AuthenticateOKBody 12 | type AuthenticateOKBody struct { 13 | 14 | // An opaque token used to authenticate a user after a successful login 15 | // Required: true 16 | IdentityToken string `json:"IdentityToken"` 17 | 18 | // The status of the authentication 19 | // Required: true 20 | Status string `json:"Status"` 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/service_update_response.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // This file was generated by the swagger tool. 4 | // Editing this file might prove futile when you re-run the swagger generate command 5 | 6 | // ServiceUpdateResponse service update response 7 | // swagger:model ServiceUpdateResponse 8 | type ServiceUpdateResponse struct { 9 | 10 | // Optional warning messages 11 | Warnings []string `json:"Warnings"` 12 | } 13 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/strslice/strslice.go: -------------------------------------------------------------------------------- 1 | package strslice // import "github.com/docker/docker/api/types/strslice" 2 | 3 | import "encoding/json" 4 | 5 | // StrSlice represents a string or an array of strings. 6 | // We need to override the json decoder to accept both options. 7 | type StrSlice []string 8 | 9 | // UnmarshalJSON decodes the byte slice whether it's a string or an array of 10 | // strings. This method is needed to implement json.Unmarshaler. 11 | func (e *StrSlice) UnmarshalJSON(b []byte) error { 12 | if len(b) == 0 { 13 | // With no input, we preserve the existing value by returning nil and 14 | // leaving the target alone. This allows defining default values for 15 | // the type. 16 | return nil 17 | } 18 | 19 | p := make([]string, 0, 1) 20 | if err := json.Unmarshal(b, &p); err != nil { 21 | var s string 22 | if err := json.Unmarshal(b, &s); err != nil { 23 | return err 24 | } 25 | p = append(p, s) 26 | } 27 | 28 | *e = p 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/swarm/runtime.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/swarm" 2 | 3 | // RuntimeType is the type of runtime used for the TaskSpec 4 | type RuntimeType string 5 | 6 | // RuntimeURL is the proto type url 7 | type RuntimeURL string 8 | 9 | const ( 10 | // RuntimeContainer is the container based runtime 11 | RuntimeContainer RuntimeType = "container" 12 | // RuntimePlugin is the plugin based runtime 13 | RuntimePlugin RuntimeType = "plugin" 14 | // RuntimeNetworkAttachment is the network attachment runtime 15 | RuntimeNetworkAttachment RuntimeType = "attachment" 16 | 17 | // RuntimeURLContainer is the proto url for the container type 18 | RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" 19 | // RuntimeURLPlugin is the proto url for the plugin type 20 | RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" 21 | ) 22 | 23 | // NetworkAttachmentSpec represents the runtime spec type for network 24 | // attachment tasks 25 | type NetworkAttachmentSpec struct { 26 | ContainerID string 27 | } 28 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go: -------------------------------------------------------------------------------- 1 | //go:generate protoc -I . --gogofast_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto 2 | 3 | package runtime // import "github.com/docker/docker/api/types/swarm/runtime" 4 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option go_package = "github.com/docker/docker/api/types/swarm/runtime;runtime"; 4 | 5 | // PluginSpec defines the base payload which clients can specify for creating 6 | // a service with the plugin runtime. 7 | message PluginSpec { 8 | string name = 1; 9 | string remote = 2; 10 | repeated PluginPrivilege privileges = 3; 11 | bool disabled = 4; 12 | } 13 | 14 | // PluginPrivilege describes a permission the user has to accept 15 | // upon installing a plugin. 16 | message PluginPrivilege { 17 | string name = 1; 18 | string description = 2; 19 | repeated string value = 3; 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/swarm/secret.go: -------------------------------------------------------------------------------- 1 | package swarm // import "github.com/docker/docker/api/types/swarm" 2 | 3 | import "os" 4 | 5 | // Secret represents a secret. 6 | type Secret struct { 7 | ID string 8 | Meta 9 | Spec SecretSpec 10 | } 11 | 12 | // SecretSpec represents a secret specification from a secret in swarm 13 | type SecretSpec struct { 14 | Annotations 15 | Data []byte `json:",omitempty"` 16 | Driver *Driver `json:",omitempty"` // name of the secrets driver used to fetch the secret's value from an external secret store 17 | 18 | // Templating controls whether and how to evaluate the secret payload as 19 | // a template. If it is not set, no templating is used. 20 | Templating *Driver `json:",omitempty"` 21 | } 22 | 23 | // SecretReferenceFileTarget is a file target in a secret reference 24 | type SecretReferenceFileTarget struct { 25 | Name string 26 | UID string 27 | GID string 28 | Mode os.FileMode 29 | } 30 | 31 | // SecretReference is a reference to a secret in swarm 32 | type SecretReference struct { 33 | File *SecretReferenceFileTarget 34 | SecretID string 35 | SecretName string 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/time/duration_convert.go: -------------------------------------------------------------------------------- 1 | package time // import "github.com/docker/docker/api/types/time" 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // DurationToSecondsString converts the specified duration to the number 9 | // seconds it represents, formatted as a string. 10 | func DurationToSecondsString(duration time.Duration) string { 11 | return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64) 12 | } 13 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/volume/volume_create.go: -------------------------------------------------------------------------------- 1 | package volume // import "github.com/docker/docker/api/types/volume" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | // VolumeCreateBody Volume configuration 11 | // swagger:model VolumeCreateBody 12 | type VolumeCreateBody struct { 13 | 14 | // Name of the volume driver to use. 15 | // Required: true 16 | Driver string `json:"Driver"` 17 | 18 | // A mapping of driver options and values. These options are passed directly to the driver and are driver specific. 19 | // Required: true 20 | DriverOpts map[string]string `json:"DriverOpts"` 21 | 22 | // User-defined key/value metadata. 23 | // Required: true 24 | Labels map[string]string `json:"Labels"` 25 | 26 | // The new volume's name. If not specified, Docker generates a name. 27 | // Required: true 28 | Name string `json:"Name"` 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/api/types/volume/volume_list.go: -------------------------------------------------------------------------------- 1 | package volume // import "github.com/docker/docker/api/types/volume" 2 | 3 | // ---------------------------------------------------------------------------- 4 | // DO NOT EDIT THIS FILE 5 | // This file was generated by `swagger generate operation` 6 | // 7 | // See hack/generate-swagger-api.sh 8 | // ---------------------------------------------------------------------------- 9 | 10 | import "github.com/docker/docker/api/types" 11 | 12 | // VolumeListOKBody Volume list response 13 | // swagger:model VolumeListOKBody 14 | type VolumeListOKBody struct { 15 | 16 | // List of volumes 17 | // Required: true 18 | Volumes []*types.Volume `json:"Volumes"` 19 | 20 | // Warnings that occurred when fetching the list of volumes 21 | // Required: true 22 | Warnings []string `json:"Warnings"` 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/README.md: -------------------------------------------------------------------------------- 1 | # Go client for the Docker Engine API 2 | 3 | The `docker` command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc. 4 | 5 | For example, to list running containers (the equivalent of `docker ps`): 6 | 7 | ```go 8 | package main 9 | 10 | import ( 11 | "context" 12 | "fmt" 13 | 14 | "github.com/docker/docker/api/types" 15 | "github.com/docker/docker/client" 16 | ) 17 | 18 | func main() { 19 | cli, err := client.NewClientWithOpts(client.FromEnv) 20 | if err != nil { 21 | panic(err) 22 | } 23 | 24 | containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) 25 | if err != nil { 26 | panic(err) 27 | } 28 | 29 | for _, container := range containers { 30 | fmt.Printf("%s %s\n", container.ID[:10], container.Image) 31 | } 32 | } 33 | ``` 34 | 35 | [Full documentation is available on GoDoc.](https://godoc.org/github.com/docker/docker/client) 36 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/build_cancel.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // BuildCancel requests the daemon to cancel ongoing build request 9 | func (cli *Client) BuildCancel(ctx context.Context, id string) error { 10 | query := url.Values{} 11 | query.Set("id", id) 12 | 13 | serverResp, err := cli.post(ctx, "/build/cancel", query, nil, nil) 14 | ensureReaderClosed(serverResp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/checkpoint_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | ) 8 | 9 | // CheckpointCreate creates a checkpoint from the given container with the given name 10 | func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error { 11 | resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/checkpoint_delete.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // CheckpointDelete deletes the checkpoint with the given name from the given container 11 | func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error { 12 | query := url.Values{} 13 | if options.CheckpointDir != "" { 14 | query.Set("dir", options.CheckpointDir) 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) 18 | ensureReaderClosed(resp) 19 | return err 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/checkpoint_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // CheckpointList returns the checkpoints of the given container in the docker host 12 | func (cli *Client) CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) { 13 | var checkpoints []types.Checkpoint 14 | 15 | query := url.Values{} 16 | if options.CheckpointDir != "" { 17 | query.Set("dir", options.CheckpointDir) 18 | } 19 | 20 | resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", query, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return checkpoints, wrapResponseError(err, resp, "container", container) 24 | } 25 | 26 | err = json.NewDecoder(resp.body).Decode(&checkpoints) 27 | return checkpoints, err 28 | } 29 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/client_deprecated.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "net/http" 4 | 5 | // NewClient initializes a new API client for the given host and API version. 6 | // It uses the given http client as transport. 7 | // It also initializes the custom http headers to add to each request. 8 | // 9 | // It won't send any version information if the version number is empty. It is 10 | // highly recommended that you set a version or your client may break if the 11 | // server is upgraded. 12 | // Deprecated: use NewClientWithOpts 13 | func NewClient(host string, version string, client *http.Client, httpHeaders map[string]string) (*Client, error) { 14 | return NewClientWithOpts(WithHost(host), WithVersion(version), WithHTTPClient(client), WithHTTPHeaders(httpHeaders)) 15 | } 16 | 17 | // NewEnvClient initializes a new API client based on environment variables. 18 | // See FromEnv for a list of support environment variables. 19 | // 20 | // Deprecated: use NewClientWithOpts(FromEnv) 21 | func NewEnvClient() (*Client, error) { 22 | return NewClientWithOpts(FromEnv) 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/client_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux freebsd openbsd darwin 2 | 3 | package client // import "github.com/docker/docker/client" 4 | 5 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 6 | const DefaultDockerHost = "unix:///var/run/docker.sock" 7 | 8 | const defaultProto = "unix" 9 | const defaultAddr = "/var/run/docker.sock" 10 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/client_windows.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | // DefaultDockerHost defines os specific default if DOCKER_HOST is unset 4 | const DefaultDockerHost = "npipe:////./pipe/docker_engine" 5 | 6 | const defaultProto = "npipe" 7 | const defaultAddr = "//./pipe/docker_engine" 8 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/config_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // ConfigCreate creates a new Config. 12 | func (cli *Client) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) { 13 | var response types.ConfigCreateResponse 14 | if err := cli.NewVersionError("1.30", "config create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/configs/create", nil, config, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return response, err 21 | } 22 | 23 | err = json.NewDecoder(resp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/config_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // ConfigInspectWithRaw returns the config information with raw data 13 | func (cli *Client) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) { 14 | if id == "" { 15 | return swarm.Config{}, nil, objectNotFoundError{object: "config", id: id} 16 | } 17 | if err := cli.NewVersionError("1.30", "config inspect"); err != nil { 18 | return swarm.Config{}, nil, err 19 | } 20 | resp, err := cli.get(ctx, "/configs/"+id, nil, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return swarm.Config{}, nil, wrapResponseError(err, resp, "config", id) 24 | } 25 | 26 | body, err := ioutil.ReadAll(resp.body) 27 | if err != nil { 28 | return swarm.Config{}, nil, err 29 | } 30 | 31 | var config swarm.Config 32 | rdr := bytes.NewReader(body) 33 | err = json.NewDecoder(rdr).Decode(&config) 34 | 35 | return config, body, err 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/config_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // ConfigList returns the list of configs. 14 | func (cli *Client) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) { 15 | if err := cli.NewVersionError("1.30", "config list"); err != nil { 16 | return nil, err 17 | } 18 | query := url.Values{} 19 | 20 | if options.Filters.Len() > 0 { 21 | filterJSON, err := filters.ToJSON(options.Filters) 22 | if err != nil { 23 | return nil, err 24 | } 25 | 26 | query.Set("filters", filterJSON) 27 | } 28 | 29 | resp, err := cli.get(ctx, "/configs", query, nil) 30 | defer ensureReaderClosed(resp) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | var configs []swarm.Config 36 | err = json.NewDecoder(resp.body).Decode(&configs) 37 | return configs, err 38 | } 39 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/config_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // ConfigRemove removes a Config. 6 | func (cli *Client) ConfigRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError("1.30", "config remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) 11 | defer ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "config", id) 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/config_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // ConfigUpdate attempts to update a Config 12 | func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { 13 | if err := cli.NewVersionError("1.30", "config update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_diff.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/container" 9 | ) 10 | 11 | // ContainerDiff shows differences in a container filesystem since it was started. 12 | func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]container.ContainerChangeResponseItem, error) { 13 | var changes []container.ContainerChangeResponseItem 14 | 15 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) 16 | defer ensureReaderClosed(serverResp) 17 | if err != nil { 18 | return changes, err 19 | } 20 | 21 | err = json.NewDecoder(serverResp.body).Decode(&changes) 22 | return changes, err 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_export.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | ) 8 | 9 | // ContainerExport retrieves the raw contents of a container 10 | // and returns them as an io.ReadCloser. It's up to the caller 11 | // to close the stream. 12 | func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { 13 | serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | return serverResp.body, nil 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_kill.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // ContainerKill terminates the container process but does not remove the container from the docker host. 9 | func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { 10 | query := url.Values{} 11 | query.Set("signal", signal) 12 | 13 | resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) 14 | ensureReaderClosed(resp) 15 | return err 16 | } 17 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_pause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // ContainerPause pauses the main process of a given container without terminating it. 6 | func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // ContainersPrune requests the daemon to delete unused data 13 | func (cli *Client) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) { 14 | var report types.ContainersPruneReport 15 | 16 | if err := cli.NewVersionError("1.25", "container prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/containers/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // ContainerRemove kills and removes a container from the docker host. 11 | func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { 12 | query := url.Values{} 13 | if options.RemoveVolumes { 14 | query.Set("v", "1") 15 | } 16 | if options.RemoveLinks { 17 | query.Set("link", "1") 18 | } 19 | 20 | if options.Force { 21 | query.Set("force", "1") 22 | } 23 | 24 | resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil) 25 | defer ensureReaderClosed(resp) 26 | return wrapResponseError(err, resp, "container", containerID) 27 | } 28 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_rename.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // ContainerRename changes the name of a given container. 9 | func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { 10 | query := url.Values{} 11 | query.Set("name", newContainerName) 12 | resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) 13 | ensureReaderClosed(resp) 14 | return err 15 | } 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_restart.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "time" 7 | 8 | timetypes "github.com/docker/docker/api/types/time" 9 | ) 10 | 11 | // ContainerRestart stops and starts a container again. 12 | // It makes the daemon to wait for the container to be up again for 13 | // a specific amount of time, given the timeout. 14 | func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error { 15 | query := url.Values{} 16 | if timeout != nil { 17 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 18 | } 19 | resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_start.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // ContainerStart sends a request to the docker daemon to start a container. 11 | func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 12 | query := url.Values{} 13 | if len(options.CheckpointID) != 0 { 14 | query.Set("checkpoint", options.CheckpointID) 15 | } 16 | if len(options.CheckpointDir) != 0 { 17 | query.Set("checkpoint-dir", options.CheckpointDir) 18 | } 19 | 20 | resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) 21 | ensureReaderClosed(resp) 22 | return err 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_stats.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // ContainerStats returns near realtime stats for a given container. 11 | // It's up to the caller to close the io.ReadCloser returned. 12 | func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (types.ContainerStats, error) { 13 | query := url.Values{} 14 | query.Set("stream", "0") 15 | if stream { 16 | query.Set("stream", "1") 17 | } 18 | 19 | resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) 20 | if err != nil { 21 | return types.ContainerStats{}, err 22 | } 23 | 24 | osType := getDockerOS(resp.header.Get("Server")) 25 | return types.ContainerStats{Body: resp.body, OSType: osType}, err 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_stop.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "time" 7 | 8 | timetypes "github.com/docker/docker/api/types/time" 9 | ) 10 | 11 | // ContainerStop stops a container. In case the container fails to stop 12 | // gracefully within a time frame specified by the timeout argument, 13 | // it is forcefully terminated (killed). 14 | // 15 | // If the timeout is nil, the container's StopTimeout value is used, if set, 16 | // otherwise the engine default. A negative timeout value can be specified, 17 | // meaning no timeout, i.e. no forceful termination is performed. 18 | func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error { 19 | query := url.Values{} 20 | if timeout != nil { 21 | query.Set("t", timetypes.DurationToSecondsString(*timeout)) 22 | } 23 | resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) 24 | ensureReaderClosed(resp) 25 | return err 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_top.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | "strings" 8 | 9 | "github.com/docker/docker/api/types/container" 10 | ) 11 | 12 | // ContainerTop shows process information from within a container. 13 | func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (container.ContainerTopOKBody, error) { 14 | var response container.ContainerTopOKBody 15 | query := url.Values{} 16 | if len(arguments) > 0 { 17 | query.Set("ps_args", strings.Join(arguments, " ")) 18 | } 19 | 20 | resp, err := cli.get(ctx, "/containers/"+containerID+"/top", query, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return response, err 24 | } 25 | 26 | err = json.NewDecoder(resp.body).Decode(&response) 27 | return response, err 28 | } 29 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_unpause.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // ContainerUnpause resumes the process execution within a container 6 | func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { 7 | resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) 8 | ensureReaderClosed(resp) 9 | return err 10 | } 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/container_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/container" 8 | ) 9 | 10 | // ContainerUpdate updates resources of a container 11 | func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { 12 | var response container.ContainerUpdateOKBody 13 | serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) 14 | defer ensureReaderClosed(serverResp) 15 | if err != nil { 16 | return response, err 17 | } 18 | 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/disk_usage.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // DiskUsage requests the current data usage from the daemon 12 | func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) { 13 | var du types.DiskUsage 14 | 15 | serverResp, err := cli.get(ctx, "/system/df", nil, nil) 16 | defer ensureReaderClosed(serverResp) 17 | if err != nil { 18 | return du, err 19 | } 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { 22 | return du, fmt.Errorf("Error retrieving disk usage: %v", err) 23 | } 24 | 25 | return du, nil 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_history.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/image" 9 | ) 10 | 11 | // ImageHistory returns the changes in an image in history format. 12 | func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error) { 13 | var history []image.HistoryResponseItem 14 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil) 15 | defer ensureReaderClosed(serverResp) 16 | if err != nil { 17 | return history, err 18 | } 19 | 20 | err = json.NewDecoder(serverResp.body).Decode(&history) 21 | return history, err 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // ImageInspectWithRaw returns the image information and its raw representation. 13 | func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { 14 | if imageID == "" { 15 | return types.ImageInspect{}, nil, objectNotFoundError{object: "image", id: imageID} 16 | } 17 | serverResp, err := cli.get(ctx, "/images/"+imageID+"/json", nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return types.ImageInspect{}, nil, wrapResponseError(err, serverResp, "image", imageID) 21 | } 22 | 23 | body, err := ioutil.ReadAll(serverResp.body) 24 | if err != nil { 25 | return types.ImageInspect{}, nil, err 26 | } 27 | 28 | var response types.ImageInspect 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_load.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ImageLoad loads an image in the docker host from the client host. 12 | // It's up to the caller to close the io.ReadCloser in the 13 | // ImageLoadResponse returned by this function. 14 | func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) { 15 | v := url.Values{} 16 | v.Set("quiet", "0") 17 | if quiet { 18 | v.Set("quiet", "1") 19 | } 20 | headers := map[string][]string{"Content-Type": {"application/x-tar"}} 21 | resp, err := cli.postRaw(ctx, "/images/load", v, input, headers) 22 | if err != nil { 23 | return types.ImageLoadResponse{}, err 24 | } 25 | return types.ImageLoadResponse{ 26 | Body: resp.body, 27 | JSON: resp.header.Get("Content-Type") == "application/json", 28 | }, nil 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // ImagesPrune requests the daemon to delete unused data 13 | func (cli *Client) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (types.ImagesPruneReport, error) { 14 | var report types.ImagesPruneReport 15 | 16 | if err := cli.NewVersionError("1.25", "image prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/images/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving disk usage: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // ImageRemove removes an image from the docker host. 12 | func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) { 13 | query := url.Values{} 14 | 15 | if options.Force { 16 | query.Set("force", "1") 17 | } 18 | if !options.PruneChildren { 19 | query.Set("noprune", "1") 20 | } 21 | 22 | var dels []types.ImageDeleteResponseItem 23 | resp, err := cli.delete(ctx, "/images/"+imageID, query, nil) 24 | defer ensureReaderClosed(resp) 25 | if err != nil { 26 | return dels, wrapResponseError(err, resp, "image", imageID) 27 | } 28 | 29 | err = json.NewDecoder(resp.body).Decode(&dels) 30 | return dels, err 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/image_save.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/url" 7 | ) 8 | 9 | // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. 10 | // It's up to the caller to store the images and close the stream. 11 | func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { 12 | query := url.Values{ 13 | "names": imageIDs, 14 | } 15 | 16 | resp, err := cli.get(ctx, "/images/get", query, nil) 17 | if err != nil { 18 | return nil, err 19 | } 20 | return resp.body, nil 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/info.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // Info returns information about the docker server. 13 | func (cli *Client) Info(ctx context.Context) (types.Info, error) { 14 | var info types.Info 15 | serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) 16 | defer ensureReaderClosed(serverResp) 17 | if err != nil { 18 | return info, err 19 | } 20 | 21 | if err := json.NewDecoder(serverResp.body).Decode(&info); err != nil { 22 | return info, fmt.Errorf("Error reading remote info: %v", err) 23 | } 24 | 25 | return info, nil 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/interface_experimental.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | ) 8 | 9 | type apiClientExperimental interface { 10 | CheckpointAPIClient 11 | } 12 | 13 | // CheckpointAPIClient defines API client methods for the checkpoints 14 | type CheckpointAPIClient interface { 15 | CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error 16 | CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error 17 | CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/interface_stable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | // APIClient is an interface that clients that talk with a docker server must implement. 4 | type APIClient interface { 5 | CommonAPIClient 6 | apiClientExperimental 7 | } 8 | 9 | // Ensure that Client always implements APIClient. 10 | var _ APIClient = &Client{} 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/login.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/registry" 10 | ) 11 | 12 | // RegistryLogin authenticates the docker server with a given docker registry. 13 | // It returns unauthorizedError when the authentication fails. 14 | func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) { 15 | resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil) 16 | defer ensureReaderClosed(resp) 17 | 18 | if err != nil { 19 | return registry.AuthenticateOKBody{}, err 20 | } 21 | 22 | var response registry.AuthenticateOKBody 23 | err = json.NewDecoder(resp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_connect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | "github.com/docker/docker/api/types/network" 8 | ) 9 | 10 | // NetworkConnect connects a container to an existent network in the docker host. 11 | func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { 12 | nc := types.NetworkConnect{ 13 | Container: containerID, 14 | EndpointConfig: config, 15 | } 16 | resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // NetworkCreate creates a new network in the docker host. 11 | func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { 12 | networkCreateRequest := types.NetworkCreateRequest{ 13 | NetworkCreate: options, 14 | Name: name, 15 | } 16 | var response types.NetworkCreateResponse 17 | serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return response, err 21 | } 22 | 23 | err = json.NewDecoder(serverResp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_disconnect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types" 7 | ) 8 | 9 | // NetworkDisconnect disconnects a container from an existent network in the docker host. 10 | func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { 11 | nd := types.NetworkDisconnect{Container: containerID, Force: force} 12 | resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) 13 | ensureReaderClosed(resp) 14 | return err 15 | } 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // NetworkList returns the list of networks configured in the docker host. 13 | func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 14 | query := url.Values{} 15 | if options.Filters.Len() > 0 { 16 | filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) 17 | if err != nil { 18 | return nil, err 19 | } 20 | 21 | query.Set("filters", filterJSON) 22 | } 23 | var networkResources []types.NetworkResource 24 | resp, err := cli.get(ctx, "/networks", query, nil) 25 | defer ensureReaderClosed(resp) 26 | if err != nil { 27 | return networkResources, err 28 | } 29 | err = json.NewDecoder(resp.body).Decode(&networkResources) 30 | return networkResources, err 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // NetworksPrune requests the daemon to delete unused networks 13 | func (cli *Client) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (types.NetworksPruneReport, error) { 14 | var report types.NetworksPruneReport 15 | 16 | if err := cli.NewVersionError("1.25", "network prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/networks/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving network prune report: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/network_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // NetworkRemove removes an existent network from the docker host. 6 | func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { 7 | resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) 8 | defer ensureReaderClosed(resp) 9 | return wrapResponseError(err, resp, "network", networkID) 10 | } 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/node_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // NodeInspectWithRaw returns the node information. 13 | func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { 14 | if nodeID == "" { 15 | return swarm.Node{}, nil, objectNotFoundError{object: "node", id: nodeID} 16 | } 17 | serverResp, err := cli.get(ctx, "/nodes/"+nodeID, nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return swarm.Node{}, nil, wrapResponseError(err, serverResp, "node", nodeID) 21 | } 22 | 23 | body, err := ioutil.ReadAll(serverResp.body) 24 | if err != nil { 25 | return swarm.Node{}, nil, err 26 | } 27 | 28 | var response swarm.Node 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/node_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // NodeList returns the list of nodes. 14 | func (cli *Client) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | 20 | if err != nil { 21 | return nil, err 22 | } 23 | 24 | query.Set("filters", filterJSON) 25 | } 26 | 27 | resp, err := cli.get(ctx, "/nodes", query, nil) 28 | defer ensureReaderClosed(resp) 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | var nodes []swarm.Node 34 | err = json.NewDecoder(resp.body).Decode(&nodes) 35 | return nodes, err 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/node_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // NodeRemove removes a Node. 11 | func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) 18 | defer ensureReaderClosed(resp) 19 | return wrapResponseError(err, resp, "node", nodeID) 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/node_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // NodeUpdate updates a Node. 12 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { 13 | query := url.Values{} 14 | query.Set("version", strconv.FormatUint(version.Index, 10)) 15 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) 16 | ensureReaderClosed(resp) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | "net/http" 7 | "net/url" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // PluginCreate creates a plugin 13 | func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error { 14 | headers := http.Header(make(map[string][]string)) 15 | headers.Set("Content-Type", "application/x-tar") 16 | 17 | query := url.Values{} 18 | query.Set("name", createOptions.RepoName) 19 | 20 | resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers) 21 | ensureReaderClosed(resp) 22 | return err 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_disable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // PluginDisable disables a plugin 11 | func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_enable.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types" 9 | ) 10 | 11 | // PluginEnable enables a plugin 12 | func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { 13 | query := url.Values{} 14 | query.Set("timeout", strconv.Itoa(options.Timeout)) 15 | 16 | resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) 17 | ensureReaderClosed(resp) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types" 10 | ) 11 | 12 | // PluginInspectWithRaw inspects an existing plugin 13 | func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { 14 | if name == "" { 15 | return nil, nil, objectNotFoundError{object: "plugin", id: name} 16 | } 17 | resp, err := cli.get(ctx, "/plugins/"+name+"/json", nil, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return nil, nil, wrapResponseError(err, resp, "plugin", name) 21 | } 22 | 23 | body, err := ioutil.ReadAll(resp.body) 24 | if err != nil { 25 | return nil, nil, err 26 | } 27 | var p types.Plugin 28 | rdr := bytes.NewReader(body) 29 | err = json.NewDecoder(rdr).Decode(&p) 30 | return &p, body, err 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // PluginList returns the installed plugins 13 | func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) { 14 | var plugins types.PluginsListResponse 15 | query := url.Values{} 16 | 17 | if filter.Len() > 0 { 18 | filterJSON, err := filters.ToParamWithVersion(cli.version, filter) 19 | if err != nil { 20 | return plugins, err 21 | } 22 | query.Set("filters", filterJSON) 23 | } 24 | resp, err := cli.get(ctx, "/plugins", query, nil) 25 | defer ensureReaderClosed(resp) 26 | if err != nil { 27 | return plugins, wrapResponseError(err, resp, "plugin", "") 28 | } 29 | 30 | err = json.NewDecoder(resp.body).Decode(&plugins) 31 | return plugins, err 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_push.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "io" 6 | ) 7 | 8 | // PluginPush pushes a plugin to a registry 9 | func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { 10 | headers := map[string][]string{"X-Registry-Auth": {registryAuth}} 11 | resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) 12 | if err != nil { 13 | return nil, err 14 | } 15 | return resp.body, nil 16 | } 17 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // PluginRemove removes a plugin 11 | func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { 12 | query := url.Values{} 13 | if options.Force { 14 | query.Set("force", "1") 15 | } 16 | 17 | resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) 18 | defer ensureReaderClosed(resp) 19 | return wrapResponseError(err, resp, "plugin", name) 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/plugin_set.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | ) 6 | 7 | // PluginSet modifies settings for an existing plugin 8 | func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { 9 | resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) 10 | ensureReaderClosed(resp) 11 | return err 12 | } 13 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/secret_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // SecretCreate creates a new Secret. 12 | func (cli *Client) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { 13 | var response types.SecretCreateResponse 14 | if err := cli.NewVersionError("1.25", "secret create"); err != nil { 15 | return response, err 16 | } 17 | resp, err := cli.post(ctx, "/secrets/create", nil, secret, nil) 18 | defer ensureReaderClosed(resp) 19 | if err != nil { 20 | return response, err 21 | } 22 | 23 | err = json.NewDecoder(resp.body).Decode(&response) 24 | return response, err 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/secret_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // SecretInspectWithRaw returns the secret information with raw data 13 | func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) (swarm.Secret, []byte, error) { 14 | if err := cli.NewVersionError("1.25", "secret inspect"); err != nil { 15 | return swarm.Secret{}, nil, err 16 | } 17 | if id == "" { 18 | return swarm.Secret{}, nil, objectNotFoundError{object: "secret", id: id} 19 | } 20 | resp, err := cli.get(ctx, "/secrets/"+id, nil, nil) 21 | defer ensureReaderClosed(resp) 22 | if err != nil { 23 | return swarm.Secret{}, nil, wrapResponseError(err, resp, "secret", id) 24 | } 25 | 26 | body, err := ioutil.ReadAll(resp.body) 27 | if err != nil { 28 | return swarm.Secret{}, nil, err 29 | } 30 | 31 | var secret swarm.Secret 32 | rdr := bytes.NewReader(body) 33 | err = json.NewDecoder(rdr).Decode(&secret) 34 | 35 | return secret, body, err 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/secret_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // SecretList returns the list of secrets. 14 | func (cli *Client) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { 15 | if err := cli.NewVersionError("1.25", "secret list"); err != nil { 16 | return nil, err 17 | } 18 | query := url.Values{} 19 | 20 | if options.Filters.Len() > 0 { 21 | filterJSON, err := filters.ToJSON(options.Filters) 22 | if err != nil { 23 | return nil, err 24 | } 25 | 26 | query.Set("filters", filterJSON) 27 | } 28 | 29 | resp, err := cli.get(ctx, "/secrets", query, nil) 30 | defer ensureReaderClosed(resp) 31 | if err != nil { 32 | return nil, err 33 | } 34 | 35 | var secrets []swarm.Secret 36 | err = json.NewDecoder(resp.body).Decode(&secrets) 37 | return secrets, err 38 | } 39 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/secret_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // SecretRemove removes a Secret. 6 | func (cli *Client) SecretRemove(ctx context.Context, id string) error { 7 | if err := cli.NewVersionError("1.25", "secret remove"); err != nil { 8 | return err 9 | } 10 | resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) 11 | defer ensureReaderClosed(resp) 12 | return wrapResponseError(err, resp, "secret", id) 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/secret_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | "strconv" 7 | 8 | "github.com/docker/docker/api/types/swarm" 9 | ) 10 | 11 | // SecretUpdate attempts to update a Secret 12 | func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { 13 | if err := cli.NewVersionError("1.25", "secret update"); err != nil { 14 | return err 15 | } 16 | query := url.Values{} 17 | query.Set("version", strconv.FormatUint(version.Index, 10)) 18 | resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) 19 | ensureReaderClosed(resp) 20 | return err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/service_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // ServiceList returns the list of services. 14 | func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/services", query, nil) 27 | defer ensureReaderClosed(resp) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | var services []swarm.Service 33 | err = json.NewDecoder(resp.body).Decode(&services) 34 | return services, err 35 | } 36 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/service_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import "context" 4 | 5 | // ServiceRemove kills and removes a service. 6 | func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { 7 | resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) 8 | defer ensureReaderClosed(resp) 9 | return wrapResponseError(err, resp, "service", serviceID) 10 | } 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_get_unlock_key.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // SwarmGetUnlockKey retrieves the swarm's unlock key. 11 | func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) { 12 | serverResp, err := cli.get(ctx, "/swarm/unlockkey", nil, nil) 13 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return types.SwarmUnlockKeyResponse{}, err 16 | } 17 | 18 | var response types.SwarmUnlockKeyResponse 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_init.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | ) 9 | 10 | // SwarmInit initializes the swarm. 11 | func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { 12 | serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) 13 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return "", err 16 | } 17 | 18 | var response string 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types/swarm" 8 | ) 9 | 10 | // SwarmInspect inspects the swarm. 11 | func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { 12 | serverResp, err := cli.get(ctx, "/swarm", nil, nil) 13 | defer ensureReaderClosed(serverResp) 14 | if err != nil { 15 | return swarm.Swarm{}, err 16 | } 17 | 18 | var response swarm.Swarm 19 | err = json.NewDecoder(serverResp.body).Decode(&response) 20 | return response, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_join.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | ) 8 | 9 | // SwarmJoin joins the swarm. 10 | func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { 11 | resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) 12 | ensureReaderClosed(resp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_leave.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | ) 7 | 8 | // SwarmLeave leaves the swarm. 9 | func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { 10 | query := url.Values{} 11 | if force { 12 | query.Set("force", "1") 13 | } 14 | resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) 15 | ensureReaderClosed(resp) 16 | return err 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_unlock.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/docker/docker/api/types/swarm" 7 | ) 8 | 9 | // SwarmUnlock unlocks locked swarm. 10 | func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { 11 | serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) 12 | ensureReaderClosed(serverResp) 13 | return err 14 | } 15 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/swarm_update.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "net/url" 7 | "strconv" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // SwarmUpdate updates the swarm. 13 | func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { 14 | query := url.Values{} 15 | query.Set("version", strconv.FormatUint(version.Index, 10)) 16 | query.Set("rotateWorkerToken", fmt.Sprintf("%v", flags.RotateWorkerToken)) 17 | query.Set("rotateManagerToken", fmt.Sprintf("%v", flags.RotateManagerToken)) 18 | query.Set("rotateManagerUnlockKey", fmt.Sprintf("%v", flags.RotateManagerUnlockKey)) 19 | resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) 20 | ensureReaderClosed(resp) 21 | return err 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/task_inspect.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io/ioutil" 8 | 9 | "github.com/docker/docker/api/types/swarm" 10 | ) 11 | 12 | // TaskInspectWithRaw returns the task information and its raw representation.. 13 | func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { 14 | if taskID == "" { 15 | return swarm.Task{}, nil, objectNotFoundError{object: "task", id: taskID} 16 | } 17 | serverResp, err := cli.get(ctx, "/tasks/"+taskID, nil, nil) 18 | defer ensureReaderClosed(serverResp) 19 | if err != nil { 20 | return swarm.Task{}, nil, wrapResponseError(err, serverResp, "task", taskID) 21 | } 22 | 23 | body, err := ioutil.ReadAll(serverResp.body) 24 | if err != nil { 25 | return swarm.Task{}, nil, err 26 | } 27 | 28 | var response swarm.Task 29 | rdr := bytes.NewReader(body) 30 | err = json.NewDecoder(rdr).Decode(&response) 31 | return response, body, err 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/task_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | "github.com/docker/docker/api/types/swarm" 11 | ) 12 | 13 | // TaskList returns the list of tasks. 14 | func (cli *Client) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { 15 | query := url.Values{} 16 | 17 | if options.Filters.Len() > 0 { 18 | filterJSON, err := filters.ToJSON(options.Filters) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | query.Set("filters", filterJSON) 24 | } 25 | 26 | resp, err := cli.get(ctx, "/tasks", query, nil) 27 | defer ensureReaderClosed(resp) 28 | if err != nil { 29 | return nil, err 30 | } 31 | 32 | var tasks []swarm.Task 33 | err = json.NewDecoder(resp.body).Decode(&tasks) 34 | return tasks, err 35 | } 36 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/transport.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "crypto/tls" 5 | "net/http" 6 | ) 7 | 8 | // resolveTLSConfig attempts to resolve the TLS configuration from the 9 | // RoundTripper. 10 | func resolveTLSConfig(transport http.RoundTripper) *tls.Config { 11 | switch tr := transport.(type) { 12 | case *http.Transport: 13 | return tr.TLSClientConfig 14 | default: 15 | return nil 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/utils.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "net/url" 5 | "regexp" 6 | 7 | "github.com/docker/docker/api/types/filters" 8 | ) 9 | 10 | var headerRegexp = regexp.MustCompile(`\ADocker/.+\s\((.+)\)\z`) 11 | 12 | // getDockerOS returns the operating system based on the server header from the daemon. 13 | func getDockerOS(serverHeader string) string { 14 | var osType string 15 | matches := headerRegexp.FindStringSubmatch(serverHeader) 16 | if len(matches) > 0 { 17 | osType = matches[1] 18 | } 19 | return osType 20 | } 21 | 22 | // getFiltersQuery returns a url query with "filters" query term, based on the 23 | // filters provided. 24 | func getFiltersQuery(f filters.Args) (url.Values, error) { 25 | query := url.Values{} 26 | if f.Len() > 0 { 27 | filterJSON, err := filters.ToJSON(f) 28 | if err != nil { 29 | return query, err 30 | } 31 | query.Set("filters", filterJSON) 32 | } 33 | return query, nil 34 | } 35 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/version.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | ) 9 | 10 | // ServerVersion returns information of the docker client and server host. 11 | func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { 12 | resp, err := cli.get(ctx, "/version", nil, nil) 13 | defer ensureReaderClosed(resp) 14 | if err != nil { 15 | return types.Version{}, err 16 | } 17 | 18 | var server types.Version 19 | err = json.NewDecoder(resp.body).Decode(&server) 20 | return server, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/volume_create.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | 7 | "github.com/docker/docker/api/types" 8 | volumetypes "github.com/docker/docker/api/types/volume" 9 | ) 10 | 11 | // VolumeCreate creates a volume in the docker host. 12 | func (cli *Client) VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error) { 13 | var volume types.Volume 14 | resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) 15 | defer ensureReaderClosed(resp) 16 | if err != nil { 17 | return volume, err 18 | } 19 | err = json.NewDecoder(resp.body).Decode(&volume) 20 | return volume, err 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/volume_list.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "net/url" 7 | 8 | "github.com/docker/docker/api/types/filters" 9 | volumetypes "github.com/docker/docker/api/types/volume" 10 | ) 11 | 12 | // VolumeList returns the volumes configured in the docker host. 13 | func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (volumetypes.VolumeListOKBody, error) { 14 | var volumes volumetypes.VolumeListOKBody 15 | query := url.Values{} 16 | 17 | if filter.Len() > 0 { 18 | filterJSON, err := filters.ToParamWithVersion(cli.version, filter) 19 | if err != nil { 20 | return volumes, err 21 | } 22 | query.Set("filters", filterJSON) 23 | } 24 | resp, err := cli.get(ctx, "/volumes", query, nil) 25 | defer ensureReaderClosed(resp) 26 | if err != nil { 27 | return volumes, err 28 | } 29 | 30 | err = json.NewDecoder(resp.body).Decode(&volumes) 31 | return volumes, err 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/volume_prune.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | 8 | "github.com/docker/docker/api/types" 9 | "github.com/docker/docker/api/types/filters" 10 | ) 11 | 12 | // VolumesPrune requests the daemon to delete unused data 13 | func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (types.VolumesPruneReport, error) { 14 | var report types.VolumesPruneReport 15 | 16 | if err := cli.NewVersionError("1.25", "volume prune"); err != nil { 17 | return report, err 18 | } 19 | 20 | query, err := getFiltersQuery(pruneFilters) 21 | if err != nil { 22 | return report, err 23 | } 24 | 25 | serverResp, err := cli.post(ctx, "/volumes/prune", query, nil, nil) 26 | defer ensureReaderClosed(serverResp) 27 | if err != nil { 28 | return report, err 29 | } 30 | 31 | if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { 32 | return report, fmt.Errorf("Error retrieving volume prune report: %v", err) 33 | } 34 | 35 | return report, nil 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/client/volume_remove.go: -------------------------------------------------------------------------------- 1 | package client // import "github.com/docker/docker/client" 2 | 3 | import ( 4 | "context" 5 | "net/url" 6 | 7 | "github.com/docker/docker/api/types/versions" 8 | ) 9 | 10 | // VolumeRemove removes a volume from the docker host. 11 | func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { 12 | query := url.Values{} 13 | if versions.GreaterThanOrEqualTo(cli.version, "1.25") { 14 | if force { 15 | query.Set("force", "1") 16 | } 17 | } 18 | resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) 19 | defer ensureReaderClosed(resp) 20 | return wrapResponseError(err, resp, "volume", volumeID) 21 | } 22 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/docker/errdefs/doc.go: -------------------------------------------------------------------------------- 1 | // Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. 2 | // Errors that cross the package boundary should implement one (and only one) of these interfaces. 3 | // 4 | // Packages should not reference these interfaces directly, only implement them. 5 | // To check if a particular error implements one of these interfaces, there are helper 6 | // functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. 7 | // If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). 8 | package errdefs // import "github.com/docker/docker/errdefs" 9 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/sockets/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/king-jingxiang/pod-gpushare-metrics-exporter/5fcbcbd9d6e3c777d907ac11802702e8599a089f/src/vendor/github.com/docker/go-connections/sockets/README.md -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/sockets/sockets_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "fmt" 7 | "net" 8 | "net/http" 9 | "syscall" 10 | "time" 11 | ) 12 | 13 | const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path) 14 | 15 | func configureUnixTransport(tr *http.Transport, proto, addr string) error { 16 | if len(addr) > maxUnixSocketPathSize { 17 | return fmt.Errorf("Unix socket path %q is too long", addr) 18 | } 19 | // No need for compression in local communications. 20 | tr.DisableCompression = true 21 | tr.Dial = func(_, _ string) (net.Conn, error) { 22 | return net.DialTimeout(proto, addr, defaultTimeout) 23 | } 24 | return nil 25 | } 26 | 27 | func configureNpipeTransport(tr *http.Transport, proto, addr string) error { 28 | return ErrProtocolNotAvailable 29 | } 30 | 31 | // DialPipe connects to a Windows named pipe. 32 | // This is not supported on other OSes. 33 | func DialPipe(_ string, _ time.Duration) (net.Conn, error) { 34 | return nil, syscall.EAFNOSUPPORT 35 | } 36 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/sockets/sockets_windows.go: -------------------------------------------------------------------------------- 1 | package sockets 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/Microsoft/go-winio" 9 | ) 10 | 11 | func configureUnixTransport(tr *http.Transport, proto, addr string) error { 12 | return ErrProtocolNotAvailable 13 | } 14 | 15 | func configureNpipeTransport(tr *http.Transport, proto, addr string) error { 16 | // No need for compression in local communications. 17 | tr.DisableCompression = true 18 | tr.Dial = func(_, _ string) (net.Conn, error) { 19 | return DialPipe(addr, defaultTimeout) 20 | } 21 | return nil 22 | } 23 | 24 | // DialPipe connects to a Windows named pipe. 25 | func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { 26 | return winio.DialPipe(addr, &timeout) 27 | } 28 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/sockets/tcp_socket.go: -------------------------------------------------------------------------------- 1 | // Package sockets provides helper functions to create and configure Unix or TCP sockets. 2 | package sockets 3 | 4 | import ( 5 | "crypto/tls" 6 | "net" 7 | ) 8 | 9 | // NewTCPSocket creates a TCP socket listener with the specified address and 10 | // the specified tls configuration. If TLSConfig is set, will encapsulate the 11 | // TCP listener inside a TLS one. 12 | func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { 13 | l, err := net.Listen("tcp", addr) 14 | if err != nil { 15 | return nil, err 16 | } 17 | if tlsConfig != nil { 18 | tlsConfig.NextProtos = []string{"http/1.1"} 19 | l = tls.NewListener(l, tlsConfig) 20 | } 21 | return l, nil 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/sockets/unix_socket.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package sockets 4 | 5 | import ( 6 | "net" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | // NewUnixSocket creates a unix socket with the specified path and group. 12 | func NewUnixSocket(path string, gid int) (net.Listener, error) { 13 | if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { 14 | return nil, err 15 | } 16 | mask := syscall.Umask(0777) 17 | defer syscall.Umask(mask) 18 | 19 | l, err := net.Listen("unix", path) 20 | if err != nil { 21 | return nil, err 22 | } 23 | if err := os.Chown(path, 0, gid); err != nil { 24 | l.Close() 25 | return nil, err 26 | } 27 | if err := os.Chmod(path, 0660); err != nil { 28 | l.Close() 29 | return nil, err 30 | } 31 | return l, nil 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/tlsconfig/certpool_go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | "runtime" 8 | ) 9 | 10 | // SystemCertPool returns a copy of the system cert pool, 11 | // returns an error if failed to load or empty pool on windows. 12 | func SystemCertPool() (*x509.CertPool, error) { 13 | certpool, err := x509.SystemCertPool() 14 | if err != nil && runtime.GOOS == "windows" { 15 | return x509.NewCertPool(), nil 16 | } 17 | return certpool, err 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go: -------------------------------------------------------------------------------- 1 | // +build !go1.7 2 | 3 | package tlsconfig 4 | 5 | import ( 6 | "crypto/x509" 7 | ) 8 | 9 | // SystemCertPool returns an new empty cert pool, 10 | // accessing system cert pool is supported in go 1.7 11 | func SystemCertPool() (*x509.CertPool, error) { 12 | return x509.NewCertPool(), nil 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 14 | tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 15 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 16 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. 4 | // 5 | package tlsconfig 6 | 7 | import ( 8 | "crypto/tls" 9 | ) 10 | 11 | // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) 12 | var clientCipherSuites = []uint16{ 13 | tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 14 | tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 15 | } 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. 14 | 15 | go-units is licensed under the Apache License, Version 2.0. 16 | See [LICENSE](LICENSE) for the full text of the license. 17 | -------------------------------------------------------------------------------- /src/vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get golang.org/x/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /src/vendor/github.com/gogo/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of GoGo authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS file, which 3 | # lists people. For example, employees are listed in CONTRIBUTORS, 4 | # but not in AUTHORS, because the employer holds the copyright. 5 | 6 | # Names should be added to this file as one of 7 | # Organization's name 8 | # Individual's name 9 | # Individual's name 10 | 11 | # Please keep the list sorted. 12 | 13 | Sendgrid, Inc 14 | Vastech SA (PTY) LTD 15 | Walter Schulze 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/gogo/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Anton Povarov 2 | Brian Goff 3 | Clayton Coleman 4 | Denis Smirnov 5 | DongYun Kang 6 | Dwayne Schultz 7 | Georg Apitz 8 | Gustav Paul 9 | Johan Brandhorst 10 | John Shahid 11 | John Tuley 12 | Laurent 13 | Patrick Lee 14 | Peter Edge 15 | Roger Johansson 16 | Sam Nguyen 17 | Sergio Arbeo 18 | Stephen J Day 19 | Tamir Duberstein 20 | Todd Eisenberger 21 | Tormod Erevik Lea 22 | Vyacheslav Kim 23 | Walter Schulze 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /src/vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /src/vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /src/vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sequences 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | var ( 11 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") 12 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") 13 | ) 14 | 15 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { 16 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 17 | 18 | var mode uint32 19 | err := syscall.GetConsoleMode(syscall.Stdout, &mode) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | if enable { 25 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING 26 | } else { 27 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING 28 | } 29 | 30 | ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) 31 | if ret == 0 { 32 | return err 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /src/vendor/github.com/mitchellh/go-ps/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | -------------------------------------------------------------------------------- /src/vendor/github.com/mitchellh/go-ps/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2.1 5 | -------------------------------------------------------------------------------- /src/vendor/github.com/mitchellh/go-ps/process_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package ps 4 | 5 | import ( 6 | "fmt" 7 | "io/ioutil" 8 | "strings" 9 | ) 10 | 11 | // Refresh reloads all the data associated with this process. 12 | func (p *UnixProcess) Refresh() error { 13 | statPath := fmt.Sprintf("/proc/%d/stat", p.pid) 14 | dataBytes, err := ioutil.ReadFile(statPath) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | // First, parse out the image name 20 | data := string(dataBytes) 21 | binStart := strings.IndexRune(data, '(') + 1 22 | binEnd := strings.IndexRune(data[binStart:], ')') 23 | p.binary = data[binStart : binStart+binEnd] 24 | 25 | // Move past the image name and start parsing the rest 26 | data = data[binStart+binEnd+2:] 27 | _, err = fmt.Sscanf(data, 28 | "%c %d %d %d", 29 | &p.state, 30 | &p.ppid, 31 | &p.pgrp, 32 | &p.sid) 33 | 34 | return err 35 | } 36 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/go-digest/.pullapprove.yml: -------------------------------------------------------------------------------- 1 | approve_by_comment: true 2 | approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' 3 | reject_regex: ^Rejected 4 | reset_on_push: true 5 | author_approval: ignored 6 | signed_off_by: 7 | required: true 8 | reviewers: 9 | teams: 10 | - go-digest-maintainers 11 | name: default 12 | required: 2 13 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/go-digest/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.7 4 | - master 5 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/go-digest/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Brendan Burns (@brendandburns) 3 | Jason Bouzane (@jbouzane) 4 | John Starks (@jstarks) 5 | Jonathan Boulle (@jonboulle) 6 | Stephen Day (@stevvooe) 7 | Vincent Batts (@vbatts) 8 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/go-digest/digester.go: -------------------------------------------------------------------------------- 1 | package digest 2 | 3 | import "hash" 4 | 5 | // Digester calculates the digest of written data. Writes should go directly 6 | // to the return value of Hash, while calling Digest will return the current 7 | // value of the digest. 8 | type Digester interface { 9 | Hash() hash.Hash // provides direct access to underlying hash instance. 10 | Digest() Digest 11 | } 12 | 13 | // digester provides a simple digester definition that embeds a hasher. 14 | type digester struct { 15 | alg Algorithm 16 | hash hash.Hash 17 | } 18 | 19 | func (d *digester) Hash() hash.Hash { 20 | return d.hash 21 | } 22 | 23 | func (d *digester) Digest() Digest { 24 | return NewDigest(d.alg, d.hash) 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/go-digest/verifiers.go: -------------------------------------------------------------------------------- 1 | package digest 2 | 3 | import ( 4 | "hash" 5 | "io" 6 | ) 7 | 8 | // Verifier presents a general verification interface to be used with message 9 | // digests and other byte stream verifications. Users instantiate a Verifier 10 | // from one of the various methods, write the data under test to it then check 11 | // the result with the Verified method. 12 | type Verifier interface { 13 | io.Writer 14 | 15 | // Verified will return true if the content written to Verifier matches 16 | // the digest. 17 | Verified() bool 18 | } 19 | 20 | type hashVerifier struct { 21 | digest Digest 22 | hash hash.Hash 23 | } 24 | 25 | func (hv hashVerifier) Write(p []byte) (n int, err error) { 26 | return hv.hash.Write(p) 27 | } 28 | 29 | func (hv hashVerifier) Verified() bool { 30 | return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash) 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Linux Foundation 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package v1 16 | 17 | const ( 18 | // ImageLayoutFile is the file name of oci image layout file 19 | ImageLayoutFile = "oci-layout" 20 | // ImageLayoutVersion is the version of ImageLayout 21 | ImageLayoutVersion = "1.0.0" 22 | ) 23 | 24 | // ImageLayout is the structure in the "oci-layout" file, found in the root 25 | // of an OCI Image-layout directory. 26 | type ImageLayout struct { 27 | Version string `json:"imageLayoutVersion"` 28 | } 29 | -------------------------------------------------------------------------------- /src/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Linux Foundation 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package specs 16 | 17 | // Versioned provides a struct with the manifest schemaVersion and mediaType. 18 | // Incoming content with unknown schema version can be decoded against this 19 | // struct to check the version. 20 | type Versioned struct { 21 | // SchemaVersion is the image manifest schema that this image follows 22 | SchemaVersion int `json:"schemaVersion"` 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /src/vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - 1.9.x 10 | - 1.10.x 11 | - 1.11.x 12 | - tip 13 | 14 | script: 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /src/vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/sirupsen/logrus 3 | git: 4 | depth: 1 5 | env: 6 | - GO111MODULE=on 7 | - GO111MODULE=off 8 | go: [ 1.11.x, 1.12.x ] 9 | os: [ linux, osx ] 10 | matrix: 11 | exclude: 12 | - go: 1.12.x 13 | env: GO111MODULE=off 14 | - go: 1.11.x 15 | os: osx 16 | install: 17 | - ./travis/install.sh 18 | - if [[ "$GO111MODULE" == "on" ]]; then go mod download; fi 19 | - if [[ "$GO111MODULE" == "off" ]]; then go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences; fi 20 | script: 21 | - ./travis/cross_build.sh 22 | - export GOMAXPROCS=4 23 | - export GORACE=halt_on_error=1 24 | - go test -race -v ./... 25 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi 26 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/objx v0.1.1 // indirect 8 | github.com/stretchr/testify v1.2.2 9 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894 10 | ) 11 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TIOCGETA 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go: -------------------------------------------------------------------------------- 1 | // +build js nacl plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows,!nacl,!plan9 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func checkIfTerminal(w io.Writer) bool { 11 | switch v := w.(type) { 12 | case *os.File: 13 | return isTerminal(int(v.Fd())) 14 | default: 15 | return false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "golang.org/x/sys/unix" 5 | ) 6 | 7 | // IsTerminal returns true if the given file descriptor is a terminal. 8 | func isTerminal(fd int) bool { 9 | _, err := unix.IoctlGetTermio(fd, unix.TCGETA) 10 | return err == nil 11 | } 12 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | 3 | package logrus 4 | 5 | import "golang.org/x/sys/unix" 6 | 7 | const ioctlReadTermios = unix.TCGETS 8 | 9 | func isTerminal(fd int) bool { 10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 11 | return err == nil 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | 20 | func checkIfTerminal(w io.Writer) bool { 21 | var ret bool 22 | switch v := w.(type) { 23 | case *os.File: 24 | var mode uint32 25 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 26 | ret = (err == nil) 27 | default: 28 | ret = false 29 | } 30 | if ret { 31 | initTerminal(w) 32 | } 33 | return ret 34 | } 35 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/http2/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | h2i/h2i 3 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/http2/README: -------------------------------------------------------------------------------- 1 | This is a work-in-progress HTTP/2 implementation for Go. 2 | 3 | It will eventually live in the Go standard library and won't require 4 | any changes to your code to use. It will just be automatic. 5 | 6 | Status: 7 | 8 | * The server support is pretty good. A few things are missing 9 | but are being worked on. 10 | * The client work has just started but shares a lot of code 11 | is coming along much quicker. 12 | 13 | Docs are at https://godoc.org/golang.org/x/net/http2 14 | 15 | Demo test server at https://http2.golang.org/ 16 | 17 | Help & bug reports welcome! 18 | 19 | Contributing: https://golang.org/doc/contribute.html 20 | Bugs: https://golang.org/issue/new?title=x/net/http2:+ 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/http2/go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.11 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http/httptrace" 11 | "net/textproto" 12 | ) 13 | 14 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { 15 | return trace != nil && trace.WroteHeaderField != nil 16 | } 17 | 18 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) { 19 | if trace != nil && trace.WroteHeaderField != nil { 20 | trace.WroteHeaderField(k, []string{v}) 21 | } 22 | } 23 | 24 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 25 | if trace != nil { 26 | return trace.Got1xxResponse 27 | } 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/http2/not_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.11 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http/httptrace" 11 | "net/textproto" 12 | ) 13 | 14 | func traceHasWroteHeaderField(trace *httptrace.ClientTrace) bool { return false } 15 | 16 | func traceWroteHeaderField(trace *httptrace.ClientTrace, k, v string) {} 17 | 18 | func traceGot1xxResponseFunc(trace *httptrace.ClientTrace) func(int, textproto.MIMEHeader) error { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/net/proxy/direct.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proxy 6 | 7 | import ( 8 | "context" 9 | "net" 10 | ) 11 | 12 | type direct struct{} 13 | 14 | // Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. 15 | var Direct = direct{} 16 | 17 | var ( 18 | _ Dialer = Direct 19 | _ ContextDialer = Direct 20 | ) 21 | 22 | // Dial directly invokes net.Dial with the supplied parameters. 23 | func (direct) Dial(network, addr string) (net.Conn, error) { 24 | return net.Dial(network, addr) 25 | } 26 | 27 | // DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. 28 | func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { 29 | var d net.Dialer 30 | return d.DialContext(ctx, network, addr) 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R3 21 | MOVD a2+16(FP), R4 22 | MOVD a3+24(FP), R5 23 | MOVD R0, R6 24 | MOVD R0, R7 25 | MOVD R0, R8 26 | MOVD trap+0(FP), R9 // syscall entry 27 | SYSCALL R9 28 | MOVD R3, r1+32(FP) 29 | MOVD R4, r2+40(FP) 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 34 | MOVD a1+8(FP), R3 35 | MOVD a2+16(FP), R4 36 | MOVD a3+24(FP), R5 37 | MOVD R0, R6 38 | MOVD R0, R7 39 | MOVD R0, R8 40 | MOVD trap+0(FP), R9 // syscall entry 41 | SYSCALL R9 42 | MOVD R3, r1+32(FP) 43 | MOVD R4, r2+40(FP) 44 | RET 45 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for arm64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/dirent.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // ParseDirent parses up to max directory entries in buf, 12 | // appending the names to names. It returns the number of 13 | // bytes consumed from buf, the number of entries added 14 | // to names, and the new names slice. 15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { 16 | return syscall.ParseDirent(buf, max, names) 17 | } 18 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/fcntl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 28 | if errno == 0 { 29 | return nil 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/ioctl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // For Unix, get the pagesize from the runtime. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getpagesize() int { 14 | return syscall.Getpagesize() 15 | } 16 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build aix 6 | // +build ppc64 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: sec, Nsec: nsec} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int64(sec), Usec: int32(usec)} 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,linux 6 | // +build !gccgo 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo,!ppc64le,!ppc64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build !gccgo 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/asm_windows_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/asm_windows_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/asm_windows_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·getprocaddress(SB),NOSPLIT,$0 8 | B syscall·getprocaddress(SB) 9 | 10 | TEXT ·loadlibrary(SB),NOSPLIT,$0 11 | B syscall·loadlibrary(SB) 12 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/env_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | 27 | func Unsetenv(key string) error { 28 | return syscall.Unsetenv(key) 29 | } 30 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/memory_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/mkerrors.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate ./mkerrors.bash zerrors_windows.go 8 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /src/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Community Code of Conduct 2 | 3 | gRPC follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md). 2 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script serves as an example to demonstrate how to generate the gRPC-Go 4 | # interface and the related messages from .proto file. 5 | # 6 | # It assumes the installation of i) Google proto buffer compiler at 7 | # https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen 8 | # plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have 9 | # not, please install them first. 10 | # 11 | # We recommend running this script at $GOPATH/src. 12 | # 13 | # If this is not what you need, feel free to make your own scripts. Again, this 14 | # script is for demonstration purpose. 15 | # 16 | proto=$1 17 | protoc --go_out=plugins=grpc:. $proto 18 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/credentials/internal/syscallconn_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package internal 22 | 23 | import ( 24 | "net" 25 | ) 26 | 27 | // WrapSyscallConn returns newConn on appengine. 28 | func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn { 29 | return newConn 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/credentials/tls13.go: -------------------------------------------------------------------------------- 1 | // +build go1.12 2 | 3 | /* 4 | * 5 | * Copyright 2019 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package credentials 22 | 23 | import "crypto/tls" 24 | 25 | // This init function adds cipher suite constants only defined in Go 1.12. 26 | func init() { 27 | cipherSuiteLookup[tls.TLS_AES_128_GCM_SHA256] = "TLS_AES_128_GCM_SHA256" 28 | cipherSuiteLookup[tls.TLS_AES_256_GCM_SHA384] = "TLS_AES_256_GCM_SHA384" 29 | cipherSuiteLookup[tls.TLS_CHACHA20_POLY1305_SHA256] = "TLS_CHACHA20_POLY1305_SHA256" 30 | } 31 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | /* 20 | Package grpc implements an RPC system called gRPC. 21 | 22 | See grpc.io for more information about gRPC. 23 | */ 24 | package grpc // import "google.golang.org/grpc" 25 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/go.mod: -------------------------------------------------------------------------------- 1 | module google.golang.org/grpc 2 | 3 | go 1.11 4 | 5 | require ( 6 | github.com/envoyproxy/go-control-plane v0.9.0 7 | github.com/envoyproxy/protoc-gen-validate v0.1.0 8 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b 9 | github.com/golang/mock v1.1.1 10 | github.com/golang/protobuf v1.3.2 11 | github.com/google/go-cmp v0.2.0 12 | golang.org/x/net v0.0.0-20190311183353-d8887717615a 13 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be 14 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a 15 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 16 | ) 17 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/install_gae.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TMP=$(mktemp -d /tmp/sdk.XXX) \ 4 | && curl -o $TMP.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip" \ 5 | && unzip -q $TMP.zip -d $TMP \ 6 | && export PATH="$PATH:$TMP/go_appengine" 7 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux appengine 2 | 3 | /* 4 | * 5 | * Copyright 2018 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package channelz 22 | 23 | // GetSocketOption gets the socket option info of the conn. 24 | func GetSocketOption(c interface{}) *SocketOptionData { 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // Package envconfig contains grpc settings configured by environment variables. 20 | package envconfig 21 | 22 | import ( 23 | "os" 24 | "strings" 25 | ) 26 | 27 | const ( 28 | prefix = "GRPC_GO_" 29 | retryStr = prefix + "RETRY" 30 | ) 31 | 32 | var ( 33 | // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on". 34 | Retry = strings.EqualFold(os.Getenv(retryStr), "on") 35 | ) 36 | -------------------------------------------------------------------------------- /src/vendor/google.golang.org/grpc/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2018 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package grpc 20 | 21 | // Version is the current grpc version. 22 | const Version = "1.25.1" 23 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.8.x 6 | - 1.9.x 7 | - tip 8 | 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | 14 | before_script: 15 | - go get -u github.com/golang/lint/golint 16 | 17 | script: 18 | - go test -v --race ./... 19 | 20 | after_script: 21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 22 | - test -z "$(golint ./... | tee /dev/stderr)" 23 | - go vet ./... 24 | 25 | os: 26 | - linux 27 | - osx 28 | 29 | notifications: 30 | email: false 31 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/fen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build solaris 6 | 7 | package fsnotify 8 | 9 | import ( 10 | "errors" 11 | ) 12 | 13 | // Watcher watches a set of files, delivering events to a channel. 14 | type Watcher struct { 15 | Events chan Event 16 | Errors chan error 17 | } 18 | 19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. 20 | func NewWatcher() (*Watcher, error) { 21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") 22 | } 23 | 24 | // Close removes all watches and closes the events channel. 25 | func (w *Watcher) Close() error { 26 | return nil 27 | } 28 | 29 | // Add starts watching the named file or directory (non-recursively). 30 | func (w *Watcher) Add(name string) error { 31 | return nil 32 | } 33 | 34 | // Remove stops watching the the named file or directory (non-recursively). 35 | func (w *Watcher) Remove(name string) error { 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY 12 | -------------------------------------------------------------------------------- /src/vendor/gopkg.in/fsnotify/fsnotify.v1/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = unix.O_EVTONLY 13 | -------------------------------------------------------------------------------- /src/vendor/k8s.io/kubernetes/pkg/kubelet/apis/podresources/v1alpha1/BUILD: -------------------------------------------------------------------------------- 1 | load("@io_bazel_rules_go//go:def.bzl", "go_library") 2 | 3 | go_library( 4 | name = "go_default_library", 5 | srcs = ["api.pb.go"], 6 | importpath = "k8s.io/kubernetes/pkg/kubelet/apis/podresources/v1alpha1", 7 | visibility = ["//visibility:public"], 8 | deps = [ 9 | "//vendor/github.com/gogo/protobuf/gogoproto:go_default_library", 10 | "//vendor/github.com/gogo/protobuf/proto:go_default_library", 11 | "//vendor/golang.org/x/net/context:go_default_library", 12 | "//vendor/google.golang.org/grpc:go_default_library", 13 | ], 14 | ) 15 | 16 | filegroup( 17 | name = "package-srcs", 18 | srcs = glob(["**"]), 19 | tags = ["automanaged"], 20 | visibility = ["//visibility:private"], 21 | ) 22 | 23 | filegroup( 24 | name = "all-srcs", 25 | srcs = [":package-srcs"], 26 | tags = ["automanaged"], 27 | visibility = ["//visibility:public"], 28 | ) 29 | --------------------------------------------------------------------------------