├── .github └── workflows │ ├── semgrep.yml │ └── tests.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── adjRIBIn.go ├── example_data └── bmp.raw ├── go.mod ├── go.sum ├── main.go ├── protos └── bbmp │ ├── bbmp.pb.go │ └── bbmp.proto ├── tokenBucket.go └── vendor ├── github.com ├── IBM │ └── sarama │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── .pre-commit-config.yaml │ │ ├── CHANGELOG.md │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── Dockerfile.kafka │ │ ├── LICENSE.md │ │ ├── Makefile │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── Vagrantfile │ │ ├── acl_bindings.go │ │ ├── acl_create_request.go │ │ ├── acl_create_response.go │ │ ├── acl_delete_request.go │ │ ├── acl_delete_response.go │ │ ├── acl_describe_request.go │ │ ├── acl_describe_response.go │ │ ├── acl_filter.go │ │ ├── acl_types.go │ │ ├── add_offsets_to_txn_request.go │ │ ├── add_offsets_to_txn_response.go │ │ ├── add_partitions_to_txn_request.go │ │ ├── add_partitions_to_txn_response.go │ │ ├── admin.go │ │ ├── alter_client_quotas_request.go │ │ ├── alter_client_quotas_response.go │ │ ├── alter_configs_request.go │ │ ├── alter_configs_response.go │ │ ├── alter_partition_reassignments_request.go │ │ ├── alter_partition_reassignments_response.go │ │ ├── alter_user_scram_credentials_request.go │ │ ├── alter_user_scram_credentials_response.go │ │ ├── api_versions_request.go │ │ ├── api_versions_response.go │ │ ├── async_producer.go │ │ ├── balance_strategy.go │ │ ├── broker.go │ │ ├── client.go │ │ ├── compress.go │ │ ├── config.go │ │ ├── config_resource_type.go │ │ ├── consumer.go │ │ ├── consumer_group.go │ │ ├── consumer_group_members.go │ │ ├── consumer_metadata_request.go │ │ ├── consumer_metadata_response.go │ │ ├── control_record.go │ │ ├── crc32_field.go │ │ ├── create_partitions_request.go │ │ ├── create_partitions_response.go │ │ ├── create_topics_request.go │ │ ├── create_topics_response.go │ │ ├── decompress.go │ │ ├── delete_groups_request.go │ │ ├── delete_groups_response.go │ │ ├── delete_offsets_request.go │ │ ├── delete_offsets_response.go │ │ ├── delete_records_request.go │ │ ├── delete_records_response.go │ │ ├── delete_topics_request.go │ │ ├── delete_topics_response.go │ │ ├── describe_client_quotas_request.go │ │ ├── describe_client_quotas_response.go │ │ ├── describe_configs_request.go │ │ ├── describe_configs_response.go │ │ ├── describe_groups_request.go │ │ ├── describe_groups_response.go │ │ ├── describe_log_dirs_request.go │ │ ├── describe_log_dirs_response.go │ │ ├── describe_user_scram_credentials_request.go │ │ ├── describe_user_scram_credentials_response.go │ │ ├── dev.yml │ │ ├── docker-compose.yml │ │ ├── elect_leaders_request.go │ │ ├── elect_leaders_response.go │ │ ├── election_type.go │ │ ├── encoder_decoder.go │ │ ├── end_txn_request.go │ │ ├── end_txn_response.go │ │ ├── entrypoint.sh │ │ ├── errors.go │ │ ├── fetch_request.go │ │ ├── fetch_response.go │ │ ├── find_coordinator_request.go │ │ ├── find_coordinator_response.go │ │ ├── gssapi_kerberos.go │ │ ├── heartbeat_request.go │ │ ├── heartbeat_response.go │ │ ├── incremental_alter_configs_request.go │ │ ├── incremental_alter_configs_response.go │ │ ├── init_producer_id_request.go │ │ ├── init_producer_id_response.go │ │ ├── interceptors.go │ │ ├── join_group_request.go │ │ ├── join_group_response.go │ │ ├── kerberos_client.go │ │ ├── leave_group_request.go │ │ ├── leave_group_response.go │ │ ├── length_field.go │ │ ├── list_groups_request.go │ │ ├── list_groups_response.go │ │ ├── list_partition_reassignments_request.go │ │ ├── list_partition_reassignments_response.go │ │ ├── message.go │ │ ├── message_set.go │ │ ├── metadata_request.go │ │ ├── metadata_response.go │ │ ├── metrics.go │ │ ├── mockbroker.go │ │ ├── mockkerberos.go │ │ ├── mockresponses.go │ │ ├── offset_commit_request.go │ │ ├── offset_commit_response.go │ │ ├── offset_fetch_request.go │ │ ├── offset_fetch_response.go │ │ ├── offset_manager.go │ │ ├── offset_request.go │ │ ├── offset_response.go │ │ ├── packet_decoder.go │ │ ├── packet_encoder.go │ │ ├── partitioner.go │ │ ├── prep_encoder.go │ │ ├── produce_request.go │ │ ├── produce_response.go │ │ ├── produce_set.go │ │ ├── quota_types.go │ │ ├── real_decoder.go │ │ ├── real_encoder.go │ │ ├── record.go │ │ ├── record_batch.go │ │ ├── records.go │ │ ├── request.go │ │ ├── response_header.go │ │ ├── sarama.go │ │ ├── sasl_authenticate_request.go │ │ ├── sasl_authenticate_response.go │ │ ├── sasl_handshake_request.go │ │ ├── sasl_handshake_response.go │ │ ├── scram_formatter.go │ │ ├── server.properties │ │ ├── sticky_assignor_user_data.go │ │ ├── sync_group_request.go │ │ ├── sync_group_response.go │ │ ├── sync_producer.go │ │ ├── timestamp.go │ │ ├── transaction_manager.go │ │ ├── txn_offset_commit_request.go │ │ ├── txn_offset_commit_response.go │ │ ├── utils.go │ │ ├── version.go │ │ └── zstd.go ├── beorn7 │ └── perks │ │ ├── LICENSE │ │ └── quantile │ │ ├── exampledata.txt │ │ └── stream.go ├── bio-routing │ ├── bio-rd │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── metrics │ │ │ ├── bgp │ │ │ │ └── adapter │ │ │ │ │ └── prom │ │ │ │ │ └── bgp_prom_adapter.go │ │ │ ├── bmp │ │ │ │ └── adapter │ │ │ │ │ └── prom │ │ │ │ │ └── bmp_prom_adapter.go │ │ │ └── vrf │ │ │ │ └── adapter │ │ │ │ └── prom │ │ │ │ └── vrf_prom_adapter.go │ │ ├── net │ │ │ ├── api │ │ │ │ ├── net.pb.go │ │ │ │ └── net.proto │ │ │ ├── convert.go │ │ │ ├── ip.go │ │ │ ├── ip_cache.go │ │ │ ├── prefix.go │ │ │ ├── prefix_cache.go │ │ │ └── tcp │ │ │ │ ├── listen.go │ │ │ │ ├── md5sig.go │ │ │ │ ├── tcp.go │ │ │ │ └── tcpsock_posix.go │ │ ├── protocols │ │ │ ├── bgp │ │ │ │ ├── api │ │ │ │ │ ├── bgp.pb.go │ │ │ │ │ ├── bgp.proto │ │ │ │ │ ├── bgp_grpc.pb.go │ │ │ │ │ ├── session.pb.go │ │ │ │ │ └── session.proto │ │ │ │ ├── metrics │ │ │ │ │ ├── bgp_address_family_metrics.go │ │ │ │ │ ├── bgp_metrics.go │ │ │ │ │ ├── bgp_peer_metrics.go │ │ │ │ │ └── bmp_metrics.go │ │ │ │ ├── packet │ │ │ │ │ ├── bgp.go │ │ │ │ │ ├── decode_options.go │ │ │ │ │ ├── decoder.go │ │ │ │ │ ├── encode_options.go │ │ │ │ │ ├── encoder.go │ │ │ │ │ ├── fuzzing.go │ │ │ │ │ ├── helper.go │ │ │ │ │ ├── label.go │ │ │ │ │ ├── mp_reach_nlri.go │ │ │ │ │ ├── mp_unreach_nlri.go │ │ │ │ │ ├── nlri.go │ │ │ │ │ ├── parameters.go │ │ │ │ │ ├── path_attribute_flags.go │ │ │ │ │ ├── path_attributes.go │ │ │ │ │ └── update.go │ │ │ │ ├── server │ │ │ │ │ ├── bgp_api.go │ │ │ │ │ ├── bmp_metrics_service.go │ │ │ │ │ ├── bmp_neighbor_manager.go │ │ │ │ │ ├── bmp_receiver.go │ │ │ │ │ ├── bmp_router.go │ │ │ │ │ ├── fake_conn.go │ │ │ │ │ ├── fsm.go │ │ │ │ │ ├── fsm_active.go │ │ │ │ │ ├── fsm_address_family.go │ │ │ │ │ ├── fsm_cease.go │ │ │ │ │ ├── fsm_connect.go │ │ │ │ │ ├── fsm_counters.go │ │ │ │ │ ├── fsm_established.go │ │ │ │ │ ├── fsm_idle.go │ │ │ │ │ ├── fsm_manager.go │ │ │ │ │ ├── fsm_open_confirm.go │ │ │ │ │ ├── fsm_open_sent.go │ │ │ │ │ ├── metrics_service.go │ │ │ │ │ ├── peer.go │ │ │ │ │ ├── peer_manager.go │ │ │ │ │ ├── peer_role.go │ │ │ │ │ ├── server.go │ │ │ │ │ ├── sockopt.go │ │ │ │ │ ├── tcplistener.go │ │ │ │ │ ├── update_helper.go │ │ │ │ │ └── update_sender.go │ │ │ │ └── types │ │ │ │ │ ├── aggregator.go │ │ │ │ │ ├── as_path.go │ │ │ │ │ ├── cluster_list.go │ │ │ │ │ ├── community.go │ │ │ │ │ ├── large_community.go │ │ │ │ │ └── unknown_attribute.go │ │ │ └── bmp │ │ │ │ └── packet │ │ │ │ ├── common_header.go │ │ │ │ ├── decode.go │ │ │ │ ├── information_tlv.go │ │ │ │ ├── initiation_message.go │ │ │ │ ├── peer_down.go │ │ │ │ ├── peer_up.go │ │ │ │ ├── per_peer_header.go │ │ │ │ ├── route_mirroring.go │ │ │ │ ├── route_monitoring.go │ │ │ │ ├── stats_report.go │ │ │ │ └── termination_message.go │ │ ├── route │ │ │ ├── api │ │ │ │ ├── route.pb.go │ │ │ │ └── route.proto │ │ │ ├── bgp_path.go │ │ │ ├── bgp_path_cache.go │ │ │ ├── bgp_path_manager.go │ │ │ ├── fib_path.go │ │ │ ├── path.go │ │ │ ├── route.go │ │ │ └── static.go │ │ ├── routingtable │ │ │ ├── adjRIBIn │ │ │ │ └── adj_rib_in.go │ │ │ ├── adjRIBOut │ │ │ │ ├── adj_rib_out.go │ │ │ │ └── path_id_manager.go │ │ │ ├── client_interface.go │ │ │ ├── client_manager.go │ │ │ ├── contributing_asn_list.go │ │ │ ├── filter │ │ │ │ ├── actions │ │ │ │ │ ├── accept_action.go │ │ │ │ │ ├── action.go │ │ │ │ │ ├── add_community_action.go │ │ │ │ │ ├── add_large_community_action.go │ │ │ │ │ ├── as_path_prepend_action.go │ │ │ │ │ ├── reject_action.go │ │ │ │ │ ├── set_local_pref_action.go │ │ │ │ │ ├── set_med_action.go │ │ │ │ │ └── set_nexthop_action.go │ │ │ │ ├── chain.go │ │ │ │ ├── community_filter.go │ │ │ │ ├── filter.go │ │ │ │ ├── helper.go │ │ │ │ ├── large_community_filter.go │ │ │ │ ├── prefix_list.go │ │ │ │ ├── prefix_matcher.go │ │ │ │ ├── route_filter.go │ │ │ │ ├── term.go │ │ │ │ └── term_condition.go │ │ │ ├── locRIB │ │ │ │ └── loc_rib.go │ │ │ ├── mock_client.go │ │ │ ├── rib_interface.go │ │ │ ├── session_attrs.go │ │ │ ├── table.go │ │ │ ├── trie.go │ │ │ ├── update_helper.go │ │ │ └── vrf │ │ │ │ ├── metrics.go │ │ │ │ ├── metrics │ │ │ │ ├── rib_metrics.go │ │ │ │ └── vrf_metrics.go │ │ │ │ ├── vrf.go │ │ │ │ └── vrf_registry.go │ │ └── util │ │ │ ├── decode │ │ │ └── decode.go │ │ │ ├── decoder │ │ │ └── decoder.go │ │ │ ├── log │ │ │ ├── log.go │ │ │ └── logrus.go │ │ │ ├── math │ │ │ ├── max.go │ │ │ └── min.go │ │ │ └── net │ │ │ └── net_addr.go │ └── tflow2 │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── convert │ │ └── convert.go ├── cespare │ └── xxhash │ │ └── v2 │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── testall.sh │ │ ├── xxhash.go │ │ ├── xxhash_amd64.s │ │ ├── xxhash_arm64.s │ │ ├── xxhash_asm.go │ │ ├── xxhash_other.go │ │ ├── xxhash_safe.go │ │ └── xxhash_unsafe.go ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go ├── eapache │ ├── go-resiliency │ │ ├── LICENSE │ │ └── breaker │ │ │ ├── README.md │ │ │ └── breaker.go │ ├── go-xerial-snappy │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── snappy.go │ └── queue │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── queue.go ├── golang │ ├── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── jsonpb │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ └── json.go │ │ ├── proto │ │ │ ├── buffer.go │ │ │ ├── defaults.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── extensions.go │ │ │ ├── properties.go │ │ │ ├── proto.go │ │ │ ├── registry.go │ │ │ ├── text_decode.go │ │ │ ├── text_encode.go │ │ │ ├── wire.go │ │ │ └── wrappers.go │ │ └── ptypes │ │ │ ├── any.go │ │ │ ├── any │ │ │ └── any.pb.go │ │ │ ├── doc.go │ │ │ ├── duration.go │ │ │ ├── duration │ │ │ └── duration.pb.go │ │ │ ├── timestamp.go │ │ │ └── timestamp │ │ │ └── timestamp.pb.go │ └── snappy │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README │ │ ├── decode.go │ │ ├── decode_amd64.s │ │ ├── decode_arm64.s │ │ ├── decode_asm.go │ │ ├── decode_other.go │ │ ├── encode.go │ │ ├── encode_amd64.s │ │ ├── encode_arm64.s │ │ ├── encode_asm.go │ │ ├── encode_other.go │ │ └── snappy.go ├── hashicorp │ ├── errwrap │ │ ├── LICENSE │ │ ├── README.md │ │ └── errwrap.go │ ├── go-multierror │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── append.go │ │ ├── flatten.go │ │ ├── format.go │ │ ├── group.go │ │ ├── multierror.go │ │ ├── prefix.go │ │ └── sort.go │ └── go-uuid │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── uuid.go ├── jcmturner │ ├── aescts │ │ └── v2 │ │ │ ├── LICENSE │ │ │ └── aescts.go │ ├── dnsutils │ │ └── v2 │ │ │ ├── LICENSE │ │ │ └── srv.go │ ├── gofork │ │ ├── LICENSE │ │ ├── encoding │ │ │ └── asn1 │ │ │ │ ├── README.md │ │ │ │ ├── asn1.go │ │ │ │ ├── common.go │ │ │ │ └── marshal.go │ │ └── x │ │ │ └── crypto │ │ │ └── pbkdf2 │ │ │ └── pbkdf2.go │ ├── gokrb5 │ │ └── v8 │ │ │ ├── LICENSE │ │ │ ├── asn1tools │ │ │ └── tools.go │ │ │ ├── client │ │ │ ├── ASExchange.go │ │ │ ├── TGSExchange.go │ │ │ ├── cache.go │ │ │ ├── client.go │ │ │ ├── network.go │ │ │ ├── passwd.go │ │ │ ├── session.go │ │ │ └── settings.go │ │ │ ├── config │ │ │ ├── error.go │ │ │ ├── hosts.go │ │ │ └── krb5conf.go │ │ │ ├── credentials │ │ │ ├── ccache.go │ │ │ └── credentials.go │ │ │ ├── crypto │ │ │ ├── aes128-cts-hmac-sha1-96.go │ │ │ ├── aes128-cts-hmac-sha256-128.go │ │ │ ├── aes256-cts-hmac-sha1-96.go │ │ │ ├── aes256-cts-hmac-sha384-192.go │ │ │ ├── common │ │ │ │ └── common.go │ │ │ ├── crypto.go │ │ │ ├── des3-cbc-sha1-kd.go │ │ │ ├── etype │ │ │ │ └── etype.go │ │ │ ├── rc4-hmac.go │ │ │ ├── rfc3961 │ │ │ │ ├── encryption.go │ │ │ │ ├── keyDerivation.go │ │ │ │ └── nfold.go │ │ │ ├── rfc3962 │ │ │ │ ├── encryption.go │ │ │ │ └── keyDerivation.go │ │ │ ├── rfc4757 │ │ │ │ ├── checksum.go │ │ │ │ ├── encryption.go │ │ │ │ ├── keyDerivation.go │ │ │ │ └── msgtype.go │ │ │ └── rfc8009 │ │ │ │ ├── encryption.go │ │ │ │ └── keyDerivation.go │ │ │ ├── gssapi │ │ │ ├── MICToken.go │ │ │ ├── README.md │ │ │ ├── contextFlags.go │ │ │ ├── gssapi.go │ │ │ └── wrapToken.go │ │ │ ├── iana │ │ │ ├── addrtype │ │ │ │ └── constants.go │ │ │ ├── adtype │ │ │ │ └── constants.go │ │ │ ├── asnAppTag │ │ │ │ └── constants.go │ │ │ ├── chksumtype │ │ │ │ └── constants.go │ │ │ ├── constants.go │ │ │ ├── errorcode │ │ │ │ └── constants.go │ │ │ ├── etypeID │ │ │ │ └── constants.go │ │ │ ├── flags │ │ │ │ └── constants.go │ │ │ ├── keyusage │ │ │ │ └── constants.go │ │ │ ├── msgtype │ │ │ │ └── constants.go │ │ │ ├── nametype │ │ │ │ └── constants.go │ │ │ └── patype │ │ │ │ └── constants.go │ │ │ ├── kadmin │ │ │ ├── changepasswddata.go │ │ │ ├── message.go │ │ │ └── passwd.go │ │ │ ├── keytab │ │ │ └── keytab.go │ │ │ ├── krberror │ │ │ └── error.go │ │ │ ├── messages │ │ │ ├── APRep.go │ │ │ ├── APReq.go │ │ │ ├── KDCRep.go │ │ │ ├── KDCReq.go │ │ │ ├── KRBCred.go │ │ │ ├── KRBError.go │ │ │ ├── KRBPriv.go │ │ │ ├── KRBSafe.go │ │ │ └── Ticket.go │ │ │ ├── pac │ │ │ ├── client_claims.go │ │ │ ├── client_info.go │ │ │ ├── credentials_info.go │ │ │ ├── device_claims.go │ │ │ ├── device_info.go │ │ │ ├── kerb_validation_info.go │ │ │ ├── pac_type.go │ │ │ ├── s4u_delegation_info.go │ │ │ ├── signature_data.go │ │ │ ├── supplemental_cred.go │ │ │ └── upn_dns_info.go │ │ │ └── types │ │ │ ├── Authenticator.go │ │ │ ├── AuthorizationData.go │ │ │ ├── Cryptosystem.go │ │ │ ├── HostAddress.go │ │ │ ├── KerberosFlags.go │ │ │ ├── PAData.go │ │ │ ├── PrincipalName.go │ │ │ └── TypedData.go │ └── rpc │ │ └── v2 │ │ ├── LICENSE │ │ ├── mstypes │ │ ├── claims.go │ │ ├── common.go │ │ ├── filetime.go │ │ ├── group_membership.go │ │ ├── kerb_sid_and_attributes.go │ │ ├── reader.go │ │ ├── rpc_unicode_string.go │ │ ├── sid.go │ │ └── user_session_key.go │ │ └── ndr │ │ ├── arrays.go │ │ ├── decoder.go │ │ ├── error.go │ │ ├── header.go │ │ ├── pipe.go │ │ ├── primitives.go │ │ ├── rawbytes.go │ │ ├── strings.go │ │ ├── tags.go │ │ └── union.go ├── klauspost │ └── compress │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .goreleaser.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── compressible.go │ │ ├── flate │ │ ├── deflate.go │ │ ├── dict_decoder.go │ │ ├── fast_encoder.go │ │ ├── huffman_bit_writer.go │ │ ├── huffman_code.go │ │ ├── huffman_sortByFreq.go │ │ ├── huffman_sortByLiteral.go │ │ ├── inflate.go │ │ ├── inflate_gen.go │ │ ├── level1.go │ │ ├── level2.go │ │ ├── level3.go │ │ ├── level4.go │ │ ├── level5.go │ │ ├── level6.go │ │ ├── matchlen_amd64.go │ │ ├── matchlen_amd64.s │ │ ├── matchlen_generic.go │ │ ├── regmask_amd64.go │ │ ├── regmask_other.go │ │ ├── stateless.go │ │ └── token.go │ │ ├── fse │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── bytereader.go │ │ ├── compress.go │ │ ├── decompress.go │ │ └── fse.go │ │ ├── gen.sh │ │ ├── gzip │ │ ├── gunzip.go │ │ └── gzip.go │ │ ├── huff0 │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── compress.go │ │ ├── decompress.go │ │ ├── decompress_amd64.go │ │ ├── decompress_amd64.s │ │ ├── decompress_generic.go │ │ └── huff0.go │ │ ├── internal │ │ ├── cpuinfo │ │ │ ├── cpuinfo.go │ │ │ ├── cpuinfo_amd64.go │ │ │ └── cpuinfo_amd64.s │ │ └── snapref │ │ │ ├── LICENSE │ │ │ ├── decode.go │ │ │ ├── decode_other.go │ │ │ ├── encode.go │ │ │ ├── encode_other.go │ │ │ └── snappy.go │ │ ├── s2sx.mod │ │ ├── s2sx.sum │ │ └── zstd │ │ ├── README.md │ │ ├── bitreader.go │ │ ├── bitwriter.go │ │ ├── blockdec.go │ │ ├── blockenc.go │ │ ├── blocktype_string.go │ │ ├── bytebuf.go │ │ ├── bytereader.go │ │ ├── decodeheader.go │ │ ├── decoder.go │ │ ├── decoder_options.go │ │ ├── dict.go │ │ ├── enc_base.go │ │ ├── enc_best.go │ │ ├── enc_better.go │ │ ├── enc_dfast.go │ │ ├── enc_fast.go │ │ ├── encoder.go │ │ ├── encoder_options.go │ │ ├── framedec.go │ │ ├── frameenc.go │ │ ├── fse_decoder.go │ │ ├── fse_decoder_amd64.go │ │ ├── fse_decoder_amd64.s │ │ ├── fse_decoder_generic.go │ │ ├── fse_encoder.go │ │ ├── fse_predefined.go │ │ ├── hash.go │ │ ├── history.go │ │ ├── internal │ │ └── xxhash │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── xxhash.go │ │ │ ├── xxhash_amd64.s │ │ │ ├── xxhash_arm64.s │ │ │ ├── xxhash_asm.go │ │ │ ├── xxhash_other.go │ │ │ └── xxhash_safe.go │ │ ├── matchlen_amd64.go │ │ ├── matchlen_amd64.s │ │ ├── matchlen_generic.go │ │ ├── seqdec.go │ │ ├── seqdec_amd64.go │ │ ├── seqdec_amd64.s │ │ ├── seqdec_generic.go │ │ ├── seqenc.go │ │ ├── snappy.go │ │ ├── zip.go │ │ └── zstd.go ├── munnerz │ └── goautoneg │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.txt │ │ └── autoneg.go ├── pierrec │ └── lz4 │ │ └── v4 │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── compressing_reader.go │ │ ├── internal │ │ ├── lz4block │ │ │ ├── block.go │ │ │ ├── blocks.go │ │ │ ├── decode_amd64.s │ │ │ ├── decode_arm.s │ │ │ ├── decode_arm64.s │ │ │ ├── decode_asm.go │ │ │ └── decode_other.go │ │ ├── lz4errors │ │ │ └── errors.go │ │ ├── lz4stream │ │ │ ├── block.go │ │ │ ├── frame.go │ │ │ └── frame_gen.go │ │ └── xxh32 │ │ │ ├── xxh32zero.go │ │ │ ├── xxh32zero_arm.go │ │ │ ├── xxh32zero_arm.s │ │ │ └── xxh32zero_other.go │ │ ├── lz4.go │ │ ├── options.go │ │ ├── options_gen.go │ │ ├── reader.go │ │ ├── state.go │ │ ├── state_gen.go │ │ └── writer.go ├── prometheus │ ├── client_golang │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── internal │ │ │ └── github.com │ │ │ │ └── golang │ │ │ │ └── gddo │ │ │ │ ├── LICENSE │ │ │ │ └── httputil │ │ │ │ ├── header │ │ │ │ └── header.go │ │ │ │ └── negotiate.go │ │ └── prometheus │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── build_info_collector.go │ │ │ ├── collector.go │ │ │ ├── counter.go │ │ │ ├── desc.go │ │ │ ├── doc.go │ │ │ ├── expvar_collector.go │ │ │ ├── fnv.go │ │ │ ├── gauge.go │ │ │ ├── get_pid.go │ │ │ ├── get_pid_gopherjs.go │ │ │ ├── go_collector.go │ │ │ ├── go_collector_go116.go │ │ │ ├── go_collector_latest.go │ │ │ ├── histogram.go │ │ │ ├── internal │ │ │ ├── almost_equal.go │ │ │ ├── difflib.go │ │ │ ├── go_collector_options.go │ │ │ ├── go_runtime_metrics.go │ │ │ └── metric.go │ │ │ ├── labels.go │ │ │ ├── metric.go │ │ │ ├── num_threads.go │ │ │ ├── num_threads_gopherjs.go │ │ │ ├── observer.go │ │ │ ├── process_collector.go │ │ │ ├── process_collector_darwin.go │ │ │ ├── process_collector_mem_cgo_darwin.c │ │ │ ├── process_collector_mem_cgo_darwin.go │ │ │ ├── process_collector_mem_nocgo_darwin.go │ │ │ ├── process_collector_not_supported.go │ │ │ ├── process_collector_procfsenabled.go │ │ │ ├── process_collector_windows.go │ │ │ ├── promhttp │ │ │ ├── delegator.go │ │ │ ├── http.go │ │ │ ├── instrument_client.go │ │ │ ├── instrument_server.go │ │ │ └── option.go │ │ │ ├── registry.go │ │ │ ├── summary.go │ │ │ ├── timer.go │ │ │ ├── untyped.go │ │ │ ├── value.go │ │ │ ├── vec.go │ │ │ ├── vnext.go │ │ │ └── wrap.go │ ├── client_model │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── go │ │ │ └── metrics.pb.go │ ├── common │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── expfmt │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ ├── expfmt.go │ │ │ ├── fuzz.go │ │ │ ├── openmetrics_create.go │ │ │ ├── text_create.go │ │ │ └── text_parse.go │ │ └── model │ │ │ ├── alert.go │ │ │ ├── fingerprinting.go │ │ │ ├── fnv.go │ │ │ ├── labels.go │ │ │ ├── labelset.go │ │ │ ├── labelset_string.go │ │ │ ├── metadata.go │ │ │ ├── metric.go │ │ │ ├── model.go │ │ │ ├── signature.go │ │ │ ├── silence.go │ │ │ ├── time.go │ │ │ ├── value.go │ │ │ ├── value_float.go │ │ │ ├── value_histogram.go │ │ │ └── value_type.go │ └── procfs │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── Makefile │ │ ├── Makefile.common │ │ ├── NOTICE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── arp.go │ │ ├── buddyinfo.go │ │ ├── cmdline.go │ │ ├── cpuinfo.go │ │ ├── cpuinfo_armx.go │ │ ├── cpuinfo_loong64.go │ │ ├── cpuinfo_mipsx.go │ │ ├── cpuinfo_others.go │ │ ├── cpuinfo_ppcx.go │ │ ├── cpuinfo_riscvx.go │ │ ├── cpuinfo_s390x.go │ │ ├── cpuinfo_x86.go │ │ ├── crypto.go │ │ ├── doc.go │ │ ├── fs.go │ │ ├── fs_statfs_notype.go │ │ ├── fs_statfs_type.go │ │ ├── fscache.go │ │ ├── internal │ │ ├── fs │ │ │ └── fs.go │ │ └── util │ │ │ ├── parse.go │ │ │ ├── readfile.go │ │ │ ├── sysreadfile.go │ │ │ ├── sysreadfile_compat.go │ │ │ └── valueparser.go │ │ ├── ipvs.go │ │ ├── kernel_random.go │ │ ├── loadavg.go │ │ ├── mdstat.go │ │ ├── meminfo.go │ │ ├── mountinfo.go │ │ ├── mountstats.go │ │ ├── net_conntrackstat.go │ │ ├── net_dev.go │ │ ├── net_ip_socket.go │ │ ├── net_protocols.go │ │ ├── net_route.go │ │ ├── net_sockstat.go │ │ ├── net_softnet.go │ │ ├── net_tcp.go │ │ ├── net_tls_stat.go │ │ ├── net_udp.go │ │ ├── net_unix.go │ │ ├── net_wireless.go │ │ ├── net_xfrm.go │ │ ├── netstat.go │ │ ├── proc.go │ │ ├── proc_cgroup.go │ │ ├── proc_cgroups.go │ │ ├── proc_environ.go │ │ ├── proc_fdinfo.go │ │ ├── proc_interrupts.go │ │ ├── proc_io.go │ │ ├── proc_limits.go │ │ ├── proc_maps.go │ │ ├── proc_netstat.go │ │ ├── proc_ns.go │ │ ├── proc_psi.go │ │ ├── proc_smaps.go │ │ ├── proc_snmp.go │ │ ├── proc_snmp6.go │ │ ├── proc_stat.go │ │ ├── proc_status.go │ │ ├── proc_sys.go │ │ ├── schedstat.go │ │ ├── slab.go │ │ ├── softirqs.go │ │ ├── stat.go │ │ ├── swaps.go │ │ ├── thread.go │ │ ├── ttar │ │ ├── vm.go │ │ └── zoneinfo.go ├── rcrowley │ └── go-metrics │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── counter.go │ │ ├── debug.go │ │ ├── ewma.go │ │ ├── gauge.go │ │ ├── gauge_float64.go │ │ ├── graphite.go │ │ ├── healthcheck.go │ │ ├── histogram.go │ │ ├── json.go │ │ ├── log.go │ │ ├── memory.md │ │ ├── meter.go │ │ ├── metrics.go │ │ ├── opentsdb.go │ │ ├── registry.go │ │ ├── runtime.go │ │ ├── runtime_cgo.go │ │ ├── runtime_gccpufraction.go │ │ ├── runtime_no_cgo.go │ │ ├── runtime_no_gccpufraction.go │ │ ├── sample.go │ │ ├── syslog.go │ │ ├── timer.go │ │ ├── validate.sh │ │ └── writer.go └── sirupsen │ └── logrus │ ├── .gitignore │ ├── .golangci.yml │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── alt_exit.go │ ├── appveyor.yml │ ├── buffer_pool.go │ ├── doc.go │ ├── entry.go │ ├── exported.go │ ├── formatter.go │ ├── hooks.go │ ├── json_formatter.go │ ├── logger.go │ ├── logrus.go │ ├── terminal_check_appengine.go │ ├── terminal_check_bsd.go │ ├── terminal_check_js.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 │ ├── crypto │ ├── LICENSE │ ├── PATENTS │ ├── md4 │ │ ├── md4.go │ │ └── md4block.go │ └── pbkdf2 │ │ └── pbkdf2.go │ ├── net │ ├── LICENSE │ ├── PATENTS │ ├── http │ │ └── httpguts │ │ │ ├── guts.go │ │ │ └── httplex.go │ ├── http2 │ │ ├── .gitignore │ │ ├── ascii.go │ │ ├── ciphers.go │ │ ├── client_conn_pool.go │ │ ├── config.go │ │ ├── config_go124.go │ │ ├── config_pre_go124.go │ │ ├── databuffer.go │ │ ├── errors.go │ │ ├── flow.go │ │ ├── frame.go │ │ ├── gotrack.go │ │ ├── hpack │ │ │ ├── encode.go │ │ │ ├── hpack.go │ │ │ ├── huffman.go │ │ │ ├── static_table.go │ │ │ └── tables.go │ │ ├── http2.go │ │ ├── pipe.go │ │ ├── server.go │ │ ├── timer.go │ │ ├── transport.go │ │ ├── unencrypted.go │ │ ├── write.go │ │ ├── writesched.go │ │ ├── writesched_priority.go │ │ ├── writesched_random.go │ │ └── writesched_roundrobin.go │ ├── idna │ │ ├── go118.go │ │ ├── idna10.0.0.go │ │ ├── idna9.0.0.go │ │ ├── pre_go118.go │ │ ├── punycode.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables15.0.0.go │ │ ├── tables9.0.0.go │ │ ├── trie.go │ │ ├── trie12.0.0.go │ │ ├── trie13.0.0.go │ │ └── trieval.go │ ├── internal │ │ ├── httpcommon │ │ │ ├── ascii.go │ │ │ ├── headermap.go │ │ │ └── request.go │ │ ├── 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 │ ├── LICENSE │ ├── PATENTS │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_bsd_ppc64.s │ │ ├── asm_bsd_riscv64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── auxv.go │ │ ├── auxv_unsupported.go │ │ ├── bluetooth_linux.go │ │ ├── bpxsvc_zos.go │ │ ├── bpxsvc_zos.s │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_signed.go │ │ ├── ioctl_unsigned.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mmap_nomremap.go │ │ ├── mremap.go │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── sockcmsg_zos.go │ │ ├── symaddr_zos_s390x.s │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_freebsd_riscv64.go │ │ ├── syscall_hurd.go │ │ ├── syscall_hurd_386.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_libc.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_openbsd_ppc64.go │ │ ├── syscall_openbsd_riscv64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── vgetrandom_linux.go │ │ ├── vgetrandom_unsupported.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_freebsd_riscv64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_openbsd_ppc64.go │ │ ├── zerrors_openbsd_riscv64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsymaddr_zos_s390x.s │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_freebsd_riscv64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_386.s │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_amd64.s │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm.s │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_arm64.s │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_openbsd_mips64.s │ │ ├── zsyscall_openbsd_ppc64.go │ │ ├── zsyscall_openbsd_ppc64.s │ │ ├── zsyscall_openbsd_riscv64.go │ │ ├── zsyscall_openbsd_riscv64.s │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysctl_openbsd_ppc64.go │ │ ├── zsysctl_openbsd_riscv64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_freebsd_riscv64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_openbsd_ppc64.go │ │ ├── zsysnum_openbsd_riscv64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_freebsd_riscv64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_openbsd_ppc64.go │ │ ├── ztypes_openbsd_riscv64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── text │ ├── 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 │ ├── prop.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables15.0.0.go │ ├── tables9.0.0.go │ └── trieval.go │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables15.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ └── trie.go ├── google.golang.org ├── genproto │ ├── LICENSE │ └── googleapis │ │ └── rpc │ │ └── status │ │ └── status.pb.go ├── grpc │ ├── AUTHORS │ ├── CODE-OF-CONDUCT.md │ ├── CONTRIBUTING.md │ ├── GOVERNANCE.md │ ├── LICENSE │ ├── MAINTAINERS.md │ ├── Makefile │ ├── NOTICE.txt │ ├── README.md │ ├── SECURITY.md │ ├── attributes │ │ └── attributes.go │ ├── backoff.go │ ├── backoff │ │ └── backoff.go │ ├── balancer │ │ ├── balancer.go │ │ ├── base │ │ │ ├── balancer.go │ │ │ └── base.go │ │ ├── conn_state_evaluator.go │ │ ├── grpclb │ │ │ └── state │ │ │ │ └── state.go │ │ └── roundrobin │ │ │ └── roundrobin.go │ ├── balancer_conn_wrappers.go │ ├── binarylog │ │ └── grpc_binarylog_v1 │ │ │ └── binarylog.pb.go │ ├── call.go │ ├── channelz │ │ └── channelz.go │ ├── clientconn.go │ ├── codec.go │ ├── codegen.sh │ ├── codes │ │ ├── code_string.go │ │ └── codes.go │ ├── connectivity │ │ └── connectivity.go │ ├── credentials │ │ ├── credentials.go │ │ ├── insecure │ │ │ └── insecure.go │ │ └── tls.go │ ├── dialoptions.go │ ├── doc.go │ ├── encoding │ │ ├── encoding.go │ │ └── proto │ │ │ └── proto.go │ ├── grpclog │ │ ├── component.go │ │ ├── grpclog.go │ │ ├── logger.go │ │ └── loggerv2.go │ ├── idle.go │ ├── interceptor.go │ ├── internal │ │ ├── backoff │ │ │ └── backoff.go │ │ ├── balancer │ │ │ └── gracefulswitch │ │ │ │ └── gracefulswitch.go │ │ ├── balancerload │ │ │ └── load.go │ │ ├── binarylog │ │ │ ├── binarylog.go │ │ │ ├── binarylog_testutil.go │ │ │ ├── env_config.go │ │ │ ├── method_logger.go │ │ │ └── sink.go │ │ ├── buffer │ │ │ └── unbounded.go │ │ ├── channelz │ │ │ ├── funcs.go │ │ │ ├── id.go │ │ │ ├── logging.go │ │ │ ├── types.go │ │ │ ├── types_linux.go │ │ │ ├── types_nonlinux.go │ │ │ ├── util_linux.go │ │ │ └── util_nonlinux.go │ │ ├── credentials │ │ │ ├── credentials.go │ │ │ ├── spiffe.go │ │ │ ├── syscallconn.go │ │ │ └── util.go │ │ ├── envconfig │ │ │ ├── envconfig.go │ │ │ ├── observability.go │ │ │ └── xds.go │ │ ├── grpclog │ │ │ ├── grpclog.go │ │ │ └── prefixLogger.go │ │ ├── grpcrand │ │ │ └── grpcrand.go │ │ ├── grpcsync │ │ │ ├── callback_serializer.go │ │ │ ├── event.go │ │ │ └── oncefunc.go │ │ ├── grpcutil │ │ │ ├── compressor.go │ │ │ ├── encode_duration.go │ │ │ ├── grpcutil.go │ │ │ ├── metadata.go │ │ │ ├── method.go │ │ │ └── regex.go │ │ ├── internal.go │ │ ├── metadata │ │ │ └── metadata.go │ │ ├── pretty │ │ │ └── pretty.go │ │ ├── resolver │ │ │ ├── config_selector.go │ │ │ ├── dns │ │ │ │ └── dns_resolver.go │ │ │ ├── passthrough │ │ │ │ └── passthrough.go │ │ │ └── unix │ │ │ │ └── unix.go │ │ ├── serviceconfig │ │ │ ├── duration.go │ │ │ └── serviceconfig.go │ │ ├── status │ │ │ └── status.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 │ │ │ ├── logging.go │ │ │ ├── networktype │ │ │ │ └── networktype.go │ │ │ ├── proxy.go │ │ │ └── transport.go │ │ └── xds_handshake_cluster.go │ ├── keepalive │ │ └── keepalive.go │ ├── metadata │ │ └── metadata.go │ ├── peer │ │ └── peer.go │ ├── picker_wrapper.go │ ├── pickfirst.go │ ├── preloader.go │ ├── regenerate.sh │ ├── resolver │ │ ├── map.go │ │ └── 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 └── protobuf │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── protodelim │ │ └── protodelim.go │ ├── protojson │ │ ├── decode.go │ │ ├── doc.go │ │ ├── encode.go │ │ └── well_known_types.go │ ├── prototext │ │ ├── decode.go │ │ ├── doc.go │ │ └── encode.go │ └── protowire │ │ └── wire.go │ ├── internal │ ├── descfmt │ │ └── stringer.go │ ├── descopts │ │ └── options.go │ ├── detrand │ │ └── rand.go │ ├── editiondefaults │ │ ├── defaults.go │ │ └── editions_defaults.binpb │ ├── editionssupport │ │ └── editions.go │ ├── encoding │ │ ├── defval │ │ │ └── default.go │ │ ├── json │ │ │ ├── decode.go │ │ │ ├── decode_number.go │ │ │ ├── decode_string.go │ │ │ ├── decode_token.go │ │ │ └── encode.go │ │ ├── messageset │ │ │ └── messageset.go │ │ ├── tag │ │ │ └── tag.go │ │ └── text │ │ │ ├── decode.go │ │ │ ├── decode_number.go │ │ │ ├── decode_string.go │ │ │ ├── decode_token.go │ │ │ ├── doc.go │ │ │ └── encode.go │ ├── errors │ │ └── errors.go │ ├── filedesc │ │ ├── build.go │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_lazy.go │ │ ├── desc_list.go │ │ ├── desc_list_gen.go │ │ ├── editions.go │ │ └── placeholder.go │ ├── filetype │ │ └── build.go │ ├── flags │ │ ├── flags.go │ │ ├── proto_legacy_disable.go │ │ └── proto_legacy_enable.go │ ├── genid │ │ ├── any_gen.go │ │ ├── api_gen.go │ │ ├── descriptor_gen.go │ │ ├── doc.go │ │ ├── duration_gen.go │ │ ├── empty_gen.go │ │ ├── field_mask_gen.go │ │ ├── go_features_gen.go │ │ ├── goname.go │ │ ├── map_entry.go │ │ ├── name.go │ │ ├── source_context_gen.go │ │ ├── struct_gen.go │ │ ├── timestamp_gen.go │ │ ├── type_gen.go │ │ ├── wrappers.go │ │ └── wrappers_gen.go │ ├── impl │ │ ├── api_export.go │ │ ├── api_export_opaque.go │ │ ├── bitmap.go │ │ ├── bitmap_race.go │ │ ├── checkinit.go │ │ ├── codec_extension.go │ │ ├── codec_field.go │ │ ├── codec_field_opaque.go │ │ ├── codec_gen.go │ │ ├── codec_map.go │ │ ├── codec_message.go │ │ ├── codec_message_opaque.go │ │ ├── codec_messageset.go │ │ ├── codec_tables.go │ │ ├── codec_unsafe.go │ │ ├── convert.go │ │ ├── convert_list.go │ │ ├── convert_map.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── enum.go │ │ ├── equal.go │ │ ├── extension.go │ │ ├── lazy.go │ │ ├── legacy_enum.go │ │ ├── legacy_export.go │ │ ├── legacy_extension.go │ │ ├── legacy_file.go │ │ ├── legacy_message.go │ │ ├── merge.go │ │ ├── merge_gen.go │ │ ├── message.go │ │ ├── message_opaque.go │ │ ├── message_opaque_gen.go │ │ ├── message_reflect.go │ │ ├── message_reflect_field.go │ │ ├── message_reflect_field_gen.go │ │ ├── message_reflect_gen.go │ │ ├── pointer_unsafe.go │ │ ├── pointer_unsafe_opaque.go │ │ ├── presence.go │ │ └── validate.go │ ├── order │ │ ├── order.go │ │ └── range.go │ ├── pragma │ │ └── pragma.go │ ├── protolazy │ │ ├── bufferreader.go │ │ ├── lazy.go │ │ └── pointer_unsafe.go │ ├── set │ │ └── ints.go │ ├── strs │ │ ├── strings.go │ │ ├── strings_unsafe_go120.go │ │ └── strings_unsafe_go121.go │ └── version │ │ └── version.go │ ├── proto │ ├── checkinit.go │ ├── decode.go │ ├── decode_gen.go │ ├── doc.go │ ├── encode.go │ ├── encode_gen.go │ ├── equal.go │ ├── extension.go │ ├── merge.go │ ├── messageset.go │ ├── proto.go │ ├── proto_methods.go │ ├── proto_reflect.go │ ├── reset.go │ ├── size.go │ ├── size_gen.go │ ├── wrapperopaque.go │ └── wrappers.go │ ├── reflect │ ├── protodesc │ │ ├── desc.go │ │ ├── desc_init.go │ │ ├── desc_resolve.go │ │ ├── desc_validate.go │ │ ├── editions.go │ │ └── proto.go │ ├── protoreflect │ │ ├── methods.go │ │ ├── proto.go │ │ ├── source.go │ │ ├── source_gen.go │ │ ├── type.go │ │ ├── value.go │ │ ├── value_equal.go │ │ ├── value_union.go │ │ ├── value_unsafe_go120.go │ │ └── value_unsafe_go121.go │ └── protoregistry │ │ └── registry.go │ ├── runtime │ ├── protoiface │ │ ├── legacy.go │ │ └── methods.go │ └── protoimpl │ │ ├── impl.go │ │ └── version.go │ └── types │ ├── descriptorpb │ └── descriptor.pb.go │ ├── gofeaturespb │ └── go_features.pb.go │ └── known │ ├── anypb │ └── any.pb.go │ ├── durationpb │ └── duration.pb.go │ └── timestamppb │ └── timestamp.pb.go └── modules.txt /.github/workflows/semgrep.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: {} 3 | workflow_dispatch: {} 4 | push: 5 | branches: 6 | - main 7 | - master 8 | schedule: 9 | - cron: '0 0 * * *' 10 | name: Semgrep config 11 | jobs: 12 | semgrep: 13 | name: semgrep/ci 14 | runs-on: ubuntu-latest 15 | env: 16 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} 17 | SEMGREP_URL: https://cloudflare.semgrep.dev 18 | SEMGREP_APP_URL: https://cloudflare.semgrep.dev 19 | SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version 20 | container: 21 | image: returntocorp/semgrep 22 | steps: 23 | - uses: actions/checkout@v4 24 | - run: semgrep ci 25 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | name: Tests 3 | jobs: 4 | test: 5 | strategy: 6 | matrix: 7 | go-version: [1.23.x] 8 | platform: [ubuntu-latest] 9 | runs-on: ${{ matrix.platform }} 10 | steps: 11 | - name: Install Go 12 | uses: actions/setup-go@v1 13 | with: 14 | go-version: ${{ matrix.go-version }} 15 | 16 | - name: Checkout code 17 | uses: actions/checkout@v2 18 | 19 | - name: Build & Test 20 | run: make build test 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore binary 2 | bbmp2kafka 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 Cloudflare, Inc. 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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean 2 | clean: 3 | go clean 4 | 5 | .PHONY: build 6 | build: 7 | go build -mod=vendor 8 | 9 | .PHONY: vet 10 | vet: 11 | go vet -mod=vendor github.com/cloudflare/bbmp2kafka/... 12 | 13 | .PHONY: test 14 | test: vet 15 | go test -v -mod=vendor -race ./... 16 | 17 | proto-go: 18 | protoc -Ivendor/github.com/bio-routing/bio-rd/ --proto_path=protos --go_out=protos/ --go_opt=paths=source_relative bbmp/bbmp.proto 19 | 20 | -------------------------------------------------------------------------------- /example_data/bmp.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudflare/bbmp2kafka/a3602cef4ea3d7ac7bc484f53e6f9873815e9f7d/example_data/bmp.raw -------------------------------------------------------------------------------- /protos/bbmp/bbmp.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cloudflare.net.bbmp; 4 | option go_package = "github.com/cloudflare/bbmp2kafka/bbmp"; 5 | 6 | 7 | import "net/api/net.proto"; 8 | import "route/api/route.proto"; 9 | 10 | message BBMPMessage { 11 | enum MessageType { 12 | Unknown = 0; 13 | PeerUpNotification = 1; 14 | PeerDownNotification = 2; 15 | InitiationMessage = 3; 16 | TerminationMessage = 4; 17 | RouteMonitoringMessage = 5; 18 | RouteMirroringMessage = 6; 19 | } 20 | MessageType message_type = 1; 21 | BBMPUnicastMonitoringMessage bbmp_unicast_monitoring_message = 2; 22 | } 23 | 24 | message BBMPUnicastMonitoringMessage { 25 | bio.net.IP router_ip = 1; 26 | bio.net.IP local_bpg_ip = 2; 27 | bio.net.IP neighbor_bgp_ip = 3; 28 | uint32 local_as = 4; 29 | uint32 remote_as = 5; 30 | bool announcement = 6; 31 | 32 | bio.net.Prefix pfx = 7; 33 | bio.route.BGPPath bgp_path = 8; 34 | uint32 timestamp = 9; 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | *.test 6 | 7 | # Folders 8 | _obj 9 | _test 10 | .vagrant 11 | 12 | # Architecture specific extensions/prefixes 13 | *.[568vq] 14 | [568vq].out 15 | 16 | *.cgo1.go 17 | *.cgo2.c 18 | _cgo_defun.c 19 | _cgo_gotypes.go 20 | _cgo_export.* 21 | 22 | _testmain.go 23 | 24 | *.exe 25 | 26 | /bin 27 | /coverage.txt 28 | /profile.out 29 | /output.json 30 | 31 | .idea 32 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | ## Reporting Security Issues 4 | 5 | **Please do not report security vulnerabilities through public GitHub issues.** 6 | 7 | The easiest way to report a security issue is privately through GitHub [here](https://github.com/IBM/sarama/security/advisories/new). 8 | 9 | See [Privately reporting a security vulnerability](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability) for full instructions. 10 | 11 | Alternatively, you can report them via e-mail or anonymous form to the IBM Product Security Incident Response Team (PSIRT) following the guidelines under the [IBM Security Vulnerability Management](https://www.ibm.com/support/pages/ibm-security-vulnerability-management) pages. 12 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/Vagrantfile: -------------------------------------------------------------------------------- 1 | # We have 5 * 192MB ZK processes and 5 * 320MB Kafka processes => 2560MB 2 | MEMORY = 3072 3 | 4 | Vagrant.configure("2") do |config| 5 | config.vm.box = "ubuntu/bionic64" 6 | 7 | config.vm.provision :shell, path: "vagrant/provision.sh" 8 | 9 | config.vm.network "private_network", ip: "192.168.100.67" 10 | 11 | config.vm.provider "virtualbox" do |v| 12 | v.memory = MEMORY 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/acl_describe_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | // DescribeAclsRequest is a describe acl request type 4 | type DescribeAclsRequest struct { 5 | Version int 6 | AclFilter 7 | } 8 | 9 | func (d *DescribeAclsRequest) encode(pe packetEncoder) error { 10 | d.AclFilter.Version = d.Version 11 | return d.AclFilter.encode(pe) 12 | } 13 | 14 | func (d *DescribeAclsRequest) decode(pd packetDecoder, version int16) (err error) { 15 | d.Version = int(version) 16 | d.AclFilter.Version = int(version) 17 | return d.AclFilter.decode(pd, version) 18 | } 19 | 20 | func (d *DescribeAclsRequest) key() int16 { 21 | return 29 22 | } 23 | 24 | func (d *DescribeAclsRequest) version() int16 { 25 | return int16(d.Version) 26 | } 27 | 28 | func (d *DescribeAclsRequest) headerVersion() int16 { 29 | return 1 30 | } 31 | 32 | func (d *DescribeAclsRequest) isValidVersion() bool { 33 | return d.Version >= 0 && d.Version <= 1 34 | } 35 | 36 | func (d *DescribeAclsRequest) requiredVersion() KafkaVersion { 37 | switch d.Version { 38 | case 1: 39 | return V2_0_0_0 40 | default: 41 | return V0_11_0_0 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/config_resource_type.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | // ConfigResourceType is a type for resources that have configs. 4 | type ConfigResourceType int8 5 | 6 | // Taken from: 7 | // https://github.com/apache/kafka/blob/ed7c071e07f1f90e4c2895582f61ca090ced3c42/clients/src/main/java/org/apache/kafka/common/config/ConfigResource.java#L32-L55 8 | 9 | const ( 10 | // UnknownResource constant type 11 | UnknownResource ConfigResourceType = 0 12 | // TopicResource constant type 13 | TopicResource ConfigResourceType = 2 14 | // BrokerResource constant type 15 | BrokerResource ConfigResourceType = 4 16 | // BrokerLoggerResource constant type 17 | BrokerLoggerResource ConfigResourceType = 8 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/delete_groups_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type DeleteGroupsRequest struct { 4 | Version int16 5 | Groups []string 6 | } 7 | 8 | func (r *DeleteGroupsRequest) encode(pe packetEncoder) error { 9 | return pe.putStringArray(r.Groups) 10 | } 11 | 12 | func (r *DeleteGroupsRequest) decode(pd packetDecoder, version int16) (err error) { 13 | r.Groups, err = pd.getStringArray() 14 | return 15 | } 16 | 17 | func (r *DeleteGroupsRequest) key() int16 { 18 | return 42 19 | } 20 | 21 | func (r *DeleteGroupsRequest) version() int16 { 22 | return r.Version 23 | } 24 | 25 | func (r *DeleteGroupsRequest) headerVersion() int16 { 26 | return 1 27 | } 28 | 29 | func (r *DeleteGroupsRequest) isValidVersion() bool { 30 | return r.Version >= 0 && r.Version <= 1 31 | } 32 | 33 | func (r *DeleteGroupsRequest) requiredVersion() KafkaVersion { 34 | switch r.Version { 35 | case 1: 36 | return V2_0_0_0 37 | case 0: 38 | return V1_1_0_0 39 | default: 40 | return V2_0_0_0 41 | } 42 | } 43 | 44 | func (r *DeleteGroupsRequest) AddGroup(group string) { 45 | r.Groups = append(r.Groups, group) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/dev.yml: -------------------------------------------------------------------------------- 1 | name: sarama 2 | 3 | up: 4 | - go: 5 | version: '1.17.6' 6 | 7 | commands: 8 | test: 9 | run: make test 10 | desc: 'run unit tests' 11 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/election_type.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type ElectionType int8 4 | 5 | const ( 6 | // PreferredElection constant type 7 | PreferredElection ElectionType = 0 8 | // UncleanElection constant type 9 | UncleanElection ElectionType = 1 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | set -o pipefail 5 | 6 | KAFKA_VERSION="${KAFKA_VERSION:-3.6.2}" 7 | KAFKA_HOME="/opt/kafka-${KAFKA_VERSION}" 8 | 9 | if [ ! -d "${KAFKA_HOME}" ]; then 10 | echo 'Error: KAFKA_VERSION '$KAFKA_VERSION' not available in this image at '$KAFKA_HOME 11 | exit 1 12 | fi 13 | 14 | cd "${KAFKA_HOME}" || exit 1 15 | 16 | # discard all empty/commented lines from default config and copy to /tmp 17 | sed -e '/^#/d' -e '/^$/d' config/server.properties >/tmp/server.properties 18 | 19 | echo "########################################################################" >>/tmp/server.properties 20 | 21 | # emulate kafka_configure_from_environment_variables from bitnami/bitnami-docker-kafka 22 | for var in "${!KAFKA_CFG_@}"; do 23 | key="$(echo "$var" | sed -e 's/^KAFKA_CFG_//g' -e 's/_/\./g' -e 's/.*/\L&/')" 24 | sed -e '/^'$key'/d' -i"" /tmp/server.properties 25 | value="${!var}" 26 | echo "$key=$value" >>/tmp/server.properties 27 | done 28 | 29 | sort /tmp/server.properties 30 | 31 | exec bin/kafka-server-start.sh /tmp/server.properties 32 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/quota_types.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type ( 4 | QuotaEntityType string 5 | 6 | QuotaMatchType int 7 | ) 8 | 9 | // ref: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/quota/ClientQuotaEntity.java 10 | const ( 11 | QuotaEntityUser QuotaEntityType = "user" 12 | QuotaEntityClientID QuotaEntityType = "client-id" 13 | QuotaEntityIP QuotaEntityType = "ip" 14 | ) 15 | 16 | // ref: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/requests/DescribeClientQuotasRequest.java 17 | const ( 18 | QuotaMatchExact QuotaMatchType = iota 19 | QuotaMatchDefault 20 | QuotaMatchAny 21 | ) 22 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/response_header.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | import "fmt" 4 | 5 | type responseHeader struct { 6 | length int32 7 | correlationID int32 8 | } 9 | 10 | func (r *responseHeader) decode(pd packetDecoder, version int16) (err error) { 11 | r.length, err = pd.getInt32() 12 | if err != nil { 13 | return err 14 | } 15 | if r.length <= 4 || r.length > MaxResponseSize { 16 | return PacketDecodingError{fmt.Sprintf("message of length %d too large or too small", r.length)} 17 | } 18 | 19 | r.correlationID, err = pd.getInt32() 20 | 21 | if version >= 1 { 22 | if _, err := pd.getEmptyTaggedFieldArray(); err != nil { 23 | return err 24 | } 25 | } 26 | 27 | return err 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/sasl_handshake_request.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | type SaslHandshakeRequest struct { 4 | Mechanism string 5 | Version int16 6 | } 7 | 8 | func (r *SaslHandshakeRequest) encode(pe packetEncoder) error { 9 | if err := pe.putString(r.Mechanism); err != nil { 10 | return err 11 | } 12 | 13 | return nil 14 | } 15 | 16 | func (r *SaslHandshakeRequest) decode(pd packetDecoder, version int16) (err error) { 17 | if r.Mechanism, err = pd.getString(); err != nil { 18 | return err 19 | } 20 | 21 | return nil 22 | } 23 | 24 | func (r *SaslHandshakeRequest) key() int16 { 25 | return 17 26 | } 27 | 28 | func (r *SaslHandshakeRequest) version() int16 { 29 | return r.Version 30 | } 31 | 32 | func (r *SaslHandshakeRequest) headerVersion() int16 { 33 | return 1 34 | } 35 | 36 | func (r *SaslHandshakeRequest) isValidVersion() bool { 37 | return r.Version >= 0 && r.Version <= 1 38 | } 39 | 40 | func (r *SaslHandshakeRequest) requiredVersion() KafkaVersion { 41 | switch r.Version { 42 | case 1: 43 | return V1_0_0_0 44 | default: 45 | return V0_10_0_0 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/timestamp.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | ) 7 | 8 | type Timestamp struct { 9 | *time.Time 10 | } 11 | 12 | func (t Timestamp) encode(pe packetEncoder) error { 13 | timestamp := int64(-1) 14 | 15 | if !t.Before(time.Unix(0, 0)) { 16 | timestamp = t.UnixNano() / int64(time.Millisecond) 17 | } else if !t.IsZero() { 18 | return PacketEncodingError{fmt.Sprintf("invalid timestamp (%v)", t)} 19 | } 20 | 21 | pe.putInt64(timestamp) 22 | return nil 23 | } 24 | 25 | func (t Timestamp) decode(pd packetDecoder) error { 26 | millis, err := pd.getInt64() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | // negative timestamps are invalid, in these cases we should return 32 | // a zero time 33 | timestamp := time.Time{} 34 | if millis >= 0 { 35 | timestamp = time.Unix(millis/1000, (millis%1000)*int64(time.Millisecond)) 36 | } 37 | 38 | *t.Time = timestamp 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/IBM/sarama/version.go: -------------------------------------------------------------------------------- 1 | package sarama 2 | 3 | import ( 4 | "runtime/debug" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | v string 10 | vOnce sync.Once 11 | ) 12 | 13 | func version() string { 14 | vOnce.Do(func() { 15 | bi, ok := debug.ReadBuildInfo() 16 | if ok { 17 | v = bi.Main.Version 18 | } 19 | if v == "" || v == "(devel)" { 20 | // if we can't read a go module version then they're using a git 21 | // clone or vendored module so all we can do is report "dev" for 22 | // the version to make a valid ApiVersions request 23 | v = "dev" 24 | } 25 | }) 26 | return v 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of bio-routing‚ authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as one of 6 | # Organization's name 7 | # Individual's name 8 | # Individual's name 9 | # See CONTRIBUTORS for the meaning of multiple email addresses. 10 | 11 | # Please keep the list sorted. 12 | 13 | Cedric Kienzler 14 | Christoph Petrausch 15 | Daniel Czerwonk 16 | Maximilian Wilhelm 17 | Oliver Herms 18 | Serge Bazanski 19 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This is the official list of people who can contribute 2 | # (and typically have contributed) code to the bio-rd repository. 3 | # The AUTHORS file lists the copyright holders; this file 4 | # lists people. For example, Google employees are listed here 5 | # but not in AUTHORS, because Google holds the copyright. 6 | 7 | Annika Wickert 8 | Cedric Kienzler 9 | Christoph Petrausch 10 | Daniel Czerwonk 11 | Julian Kornberger 12 | Maximilian Wilhelm 13 | Oliver Herms 14 | Serge Bazanski 15 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/net/api/net.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package bio.net; 4 | option go_package = "github.com/bio-routing/bio-rd/net/api"; 5 | 6 | message Prefix { 7 | IP address = 1; 8 | uint32 length = 2; 9 | } 10 | 11 | message IP { 12 | uint64 higher = 1; 13 | uint64 lower = 2; 14 | enum Version { 15 | IPv4 = 0; 16 | IPv6 = 1; 17 | } 18 | Version version = 3; 19 | } -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/net/ip_cache.go: -------------------------------------------------------------------------------- 1 | package net 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | const ( 8 | ipCachePreAlloc = 0 9 | ) 10 | 11 | var ( 12 | ipc *ipCache 13 | ) 14 | 15 | func init() { 16 | ipc = newIPCache() 17 | } 18 | 19 | type ipCache struct { 20 | cache map[IP]*IP 21 | cacheMu sync.Mutex 22 | } 23 | 24 | func newIPCache() *ipCache { 25 | return &ipCache{ 26 | cache: make(map[IP]*IP, ipCachePreAlloc), 27 | } 28 | } 29 | 30 | func (ipc *ipCache) get(addr IP) *IP { 31 | ipc.cacheMu.Lock() 32 | 33 | if a, exists := ipc.cache[addr]; exists { 34 | ipc.cacheMu.Unlock() 35 | return a 36 | } 37 | 38 | ipc._set(addr) 39 | res := ipc.cache[addr] 40 | ipc.cacheMu.Unlock() 41 | return res 42 | } 43 | 44 | func (ipc *ipCache) _set(addr IP) { 45 | ipc.cache[addr] = &addr 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/net/prefix_cache.go: -------------------------------------------------------------------------------- 1 | package net 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | const ( 8 | prefixCachePreAlloc = 0 9 | ) 10 | 11 | var ( 12 | pfxc *pfxCache 13 | ) 14 | 15 | func init() { 16 | pfxc = newPfxCache() 17 | } 18 | 19 | type pfxCache struct { 20 | cache map[Prefix]*Prefix 21 | cacheMu sync.Mutex 22 | } 23 | 24 | func newPfxCache() *pfxCache { 25 | return &pfxCache{ 26 | cache: make(map[Prefix]*Prefix, prefixCachePreAlloc), 27 | } 28 | } 29 | 30 | func (pfxc *pfxCache) get(pfx Prefix) *Prefix { 31 | pfxc.cacheMu.Lock() 32 | 33 | if p, exists := pfxc.cache[pfx]; exists { 34 | pfxc.cacheMu.Unlock() 35 | return p 36 | } 37 | 38 | pfxc._set(pfx) 39 | ret := pfxc.cache[pfx] 40 | pfxc.cacheMu.Unlock() 41 | return ret 42 | } 43 | 44 | func (pfxc *pfxCache) _set(pfx Prefix) { 45 | pfxc.cache[pfx] = &pfx 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/api/bgp.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package bio.bgp; 4 | 5 | import "net/api/net.proto"; 6 | import "route/api/route.proto"; 7 | import "protocols/bgp/api/session.proto"; 8 | option go_package = "github.com/bio-routing/bio-rd/protocols/bgp/api"; 9 | 10 | message ListSessionsRequest { 11 | SessionFilter filter = 1; 12 | } 13 | 14 | message SessionFilter { 15 | bio.net.IP neighbor_ip = 1; 16 | string vrf_name = 2; 17 | } 18 | 19 | message ListSessionsResponse { 20 | repeated Session sessions = 1; 21 | } 22 | 23 | message DumpRIBRequest { 24 | bio.net.IP peer = 1; 25 | uint32 afi = 2; 26 | uint32 safi = 3; 27 | } 28 | 29 | service BgpService { 30 | rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {} 31 | rpc DumpRIBIn(DumpRIBRequest) returns (stream bio.route.Route) {} 32 | rpc DumpRIBOut(DumpRIBRequest) returns (stream bio.route.Route) {} 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/api/session.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package bio.bgp; 4 | 5 | import "net/api/net.proto"; 6 | option go_package = "github.com/bio-routing/bio-rd/protocols/bgp/api"; 7 | 8 | message Session { 9 | bio.net.IP local_address = 1; 10 | bio.net.IP neighbor_address = 2; 11 | uint32 local_asn = 3; 12 | uint32 peer_asn = 4; 13 | enum State { 14 | Disabled = 0; 15 | Idle = 1; 16 | Connect = 2; 17 | Active = 3; 18 | OpenSent = 4; 19 | OpenConfirmed = 5; 20 | Established = 6; 21 | } 22 | State status = 5; 23 | SessionStats stats = 6; 24 | uint64 established_since = 7; 25 | string description = 8; 26 | } 27 | 28 | message SessionStats { 29 | uint64 messages_in = 1; 30 | uint64 messages_out = 2; 31 | uint64 flaps = 3; 32 | uint64 routes_received = 4; 33 | uint64 routes_imported = 5; 34 | uint64 routes_exported = 6; 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/metrics/bgp_address_family_metrics.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | // BGPAddressFamilyMetrics provides metrics on AFI/SAFI level for one session 4 | type BGPAddressFamilyMetrics struct { 5 | // AFI is the identifier for the address family 6 | AFI uint16 7 | 8 | // SAFI is the identifier for the sub address family 9 | SAFI uint8 10 | 11 | // RoutesReceived is the number of routes we recevied 12 | RoutesReceived uint64 13 | 14 | // RoutesAccepted is the number of routes we sent 15 | RoutesSent uint64 16 | 17 | // EndOfRIBMarkerReceived indicates if a BGP End of RIB marker was received for this AFI/SAFI from the peer 18 | EndOfRIBMarkerReceived bool 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/metrics/bgp_metrics.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | // BGPMetrics provides metrics for a single BGP server instance 4 | type BGPMetrics struct { 5 | // Peers is the collection of per peer metrics 6 | Peers []*BGPPeerMetrics 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/packet/decode_options.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | // DecodeOptions represents options for the BGP message decoder 4 | type DecodeOptions struct { 5 | AddPathIPv4Unicast bool 6 | AddPathIPv6Unicast bool 7 | Use32BitASN bool 8 | } 9 | 10 | func (d *DecodeOptions) addPath(afi uint16, safi uint8) bool { 11 | switch afi { 12 | case AFIIPv4: 13 | switch safi { 14 | case SAFIUnicast: 15 | return d.AddPathIPv4Unicast 16 | } 17 | case AFIIPv6: 18 | switch safi { 19 | case SAFIUnicast: 20 | return d.AddPathIPv6Unicast 21 | } 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/packet/encode_options.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | type EncodeOptions struct { 4 | Use32BitASN bool 5 | UseAddPath bool 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/packet/fuzzing.go: -------------------------------------------------------------------------------- 1 | //go:build go || fuzz 2 | // +build go fuzz 3 | 4 | package packet 5 | 6 | import ( 7 | "bytes" 8 | ) 9 | 10 | const ( 11 | INC_PRIO = 1 12 | KEEP = 0 13 | DISMISS = -1 14 | ) 15 | 16 | func Fuzz(data []byte) int { 17 | buf := bytes.NewBuffer(data) 18 | for _, option := range getAllDecodingOptions() { 19 | msg, err := Decode(buf, &option) 20 | if err != nil { 21 | if msg != nil { 22 | panic("msg != nil on error") 23 | } 24 | 25 | } 26 | 27 | return INC_PRIO 28 | } 29 | 30 | return KEEP 31 | } 32 | 33 | func getAllDecodingOptions() []DecodeOptions { 34 | parameters := []bool{true, false} 35 | var ret []DecodeOptions 36 | for _, octet := range parameters { 37 | ret = append(ret, DecodeOptions{ 38 | Use32BitASN: octet, 39 | }) 40 | } 41 | 42 | return ret 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/packet/helper.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | import ( 4 | "fmt" 5 | 6 | bnet "github.com/bio-routing/bio-rd/net" 7 | ) 8 | 9 | func deserializePrefix(b []byte, pfxLen uint8, afi uint16) (*bnet.Prefix, error) { 10 | numBytes := BytesInAddr(pfxLen) 11 | 12 | if numBytes != uint8(len(b)) { 13 | return nil, fmt.Errorf("could not parse prefix of length %d. Expected %d bytes, got %d", pfxLen, numBytes, len(b)) 14 | } 15 | 16 | if afi == AFIIPv4 { 17 | return bnet.NewPfx(bnet.IPv4FromBytes(b), pfxLen).Dedup(), nil 18 | } 19 | 20 | ipBytes := make([]byte, afiAddrLenBytes[afi]) 21 | copy(ipBytes, b) 22 | 23 | ip, err := bnet.IPFromBytes(ipBytes) 24 | if err != nil { 25 | return nil, err 26 | } 27 | 28 | pfx := bnet.NewPfx(ip, pfxLen) 29 | if !pfx.Valid() { 30 | return nil, fmt.Errorf("Invalid prefix: %q", pfx.String()) 31 | } 32 | 33 | return pfx.Dedup(), nil 34 | } 35 | 36 | // REMOVE 37 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/fake_conn.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "net" 5 | "time" 6 | ) 7 | 8 | type fakeConn struct { 9 | } 10 | 11 | type fakeAddr struct { 12 | } 13 | 14 | func (f fakeAddr) Network() string { 15 | return "" 16 | } 17 | 18 | func (f fakeAddr) String() string { 19 | return "169.254.100.100:179" 20 | } 21 | 22 | func (f fakeConn) Read(b []byte) (n int, err error) { 23 | return 0, nil 24 | } 25 | 26 | func (f fakeConn) Write(b []byte) (n int, err error) { 27 | return len(b), nil 28 | } 29 | 30 | func (f fakeConn) Close() error { 31 | return nil 32 | } 33 | 34 | func (f fakeConn) LocalAddr() net.Addr { 35 | return fakeAddr{} 36 | } 37 | 38 | func (f fakeConn) RemoteAddr() net.Addr { 39 | return fakeAddr{} 40 | } 41 | 42 | func (f fakeConn) SetDeadline(t time.Time) error { 43 | return nil 44 | } 45 | 46 | func (f fakeConn) SetReadDeadline(t time.Time) error { 47 | return nil 48 | } 49 | 50 | func (f fakeConn) SetWriteDeadline(t time.Time) error { 51 | return nil 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/fsm_cease.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | type ceaseState struct { 4 | } 5 | 6 | func newCeaseState() *ceaseState { 7 | return &ceaseState{} 8 | } 9 | 10 | func (s ceaseState) run() (state, string) { 11 | return newCeaseState(), "Loop" 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/fsm_counters.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | type fsmCounters struct { 4 | updatesReceived uint64 5 | updatesSent uint64 6 | } 7 | 8 | func (c *fsmCounters) reset() { 9 | c.updatesReceived = 0 10 | c.updatesSent = 0 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/fsm_manager.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import "net" 4 | 5 | type fsmManager struct { 6 | fsms map[string][]*FSM 7 | } 8 | 9 | func newFSMManager() *fsmManager { 10 | return &fsmManager{ 11 | fsms: make(map[string][]*FSM, 0), 12 | } 13 | } 14 | 15 | func (m *fsmManager) resolveCollision(addr net.IP) { 16 | 17 | } 18 | 19 | func (m *fsmManager) newFSMPassive() *FSM { 20 | return &FSM{} 21 | } 22 | 23 | func (m *fsmManager) newFSMActive() *FSM { 24 | return &FSM{} 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/peer_role.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import "github.com/bio-routing/bio-rd/protocols/bgp/packet" 4 | 5 | const ( 6 | // BGP Role configuration, these values will be translated into values defined by the RFC on peer setup 7 | PeerConfigRoleOff = 0 8 | PeerConfigRoleProvider = 1 9 | PeerConfigRoleRS = 2 10 | PeerConfigRoleRSClient = 3 11 | PeerConfigRoleCustomer = 4 12 | PeerConfigRolePeer = 5 13 | ) 14 | 15 | func translatePeerRole(pr uint8) uint8 { 16 | switch pr { 17 | case PeerConfigRoleProvider: 18 | return packet.PeerRoleRoleProvider 19 | case PeerConfigRoleCustomer: 20 | return packet.PeerRoleRoleCustomer 21 | case PeerConfigRoleRS: 22 | return packet.PeerRoleRoleRS 23 | case PeerConfigRoleRSClient: 24 | return packet.PeerRoleRoleRSClient 25 | case PeerConfigRolePeer: 26 | return packet.PeerRoleRolePeer 27 | default: 28 | return 255 29 | } 30 | } 31 | 32 | func peerRoleEnabled(pr uint8) bool { 33 | return pr >= PeerConfigRoleProvider && pr <= PeerConfigRolePeer 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/sockopt.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "net" 5 | 6 | "github.com/bio-routing/bio-rd/net/tcp" 7 | ) 8 | 9 | func setTTL(c net.Conn, ttl uint8) error { 10 | // as c is an interface for testability reason we're checking here if the concrete type 11 | // is a real TCP connection as only that supports setting a TTL 12 | switch c.(type) { 13 | case *tcp.Conn: 14 | return c.(*tcp.Conn).SetTTL(ttl) 15 | default: 16 | return nil 17 | } 18 | } 19 | 20 | func setDontRoute(c net.Conn) error { 21 | // as c is an interface for testability reason we're checking here if the concrete type 22 | // is a real TCP connection as only that supports setting SetDontRoute() 23 | switch c.(type) { 24 | case *tcp.Conn: 25 | return c.(*tcp.Conn).SetDontRoute() 26 | default: 27 | return nil 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/server/update_helper.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | 7 | "github.com/bio-routing/bio-rd/protocols/bgp/packet" 8 | "github.com/bio-routing/bio-rd/util/log" 9 | ) 10 | 11 | func serializeAndSendUpdate(out io.Writer, update serializeAbleUpdate, opt *packet.EncodeOptions) error { 12 | updateBytes, err := update.SerializeUpdate(opt) 13 | if err != nil { 14 | log.Errorf("unable to serialize BGP Update: %v", err) 15 | return nil 16 | } 17 | 18 | _, err = out.Write(updateBytes) 19 | if err != nil { 20 | return fmt.Errorf("failed sending Update: %w", err) 21 | } 22 | return nil 23 | } 24 | 25 | type serializeAbleUpdate interface { 26 | SerializeUpdate(opt *packet.EncodeOptions) ([]byte, error) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/types/aggregator.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // Aggregator represents an AGGREGATOR attribute (type code 7) as in RFC4271 4 | type Aggregator struct { 5 | Address uint32 6 | ASN uint16 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bgp/types/cluster_list.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "strconv" 5 | "strings" 6 | ) 7 | 8 | type ClusterList []uint32 9 | 10 | func (cl *ClusterList) String() string { 11 | if cl == nil { 12 | return "" 13 | } 14 | 15 | clStrings := make([]string, len(*cl)) 16 | for i, x := range *cl { 17 | clStrings[i] = strconv.Itoa(int(x)) 18 | } 19 | 20 | return strings.Join(clStrings, " ") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bmp/packet/common_header.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/bio-routing/bio-rd/util/decoder" 7 | "github.com/bio-routing/tflow2/convert" 8 | ) 9 | 10 | const ( 11 | // CommonHeaderLen is the length of a common header 12 | CommonHeaderLen = 6 13 | ) 14 | 15 | // CommonHeader represents a common header 16 | type CommonHeader struct { 17 | Version uint8 18 | MsgLength uint32 19 | MsgType uint8 20 | } 21 | 22 | // Serialize serializes a common header 23 | func (c *CommonHeader) Serialize(buf *bytes.Buffer) { 24 | buf.WriteByte(c.Version) 25 | buf.Write(convert.Uint32Byte(c.MsgLength)) 26 | buf.WriteByte(c.MsgType) 27 | } 28 | 29 | func decodeCommonHeader(buf *bytes.Buffer) (*CommonHeader, error) { 30 | ch := &CommonHeader{} 31 | fields := []interface{}{ 32 | &ch.Version, 33 | &ch.MsgLength, 34 | &ch.MsgType, 35 | } 36 | 37 | err := decoder.Decode(buf, fields) 38 | if err != nil { 39 | return ch, err 40 | } 41 | 42 | return ch, nil 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bmp/packet/information_tlv.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/bio-routing/bio-rd/util/decoder" 7 | ) 8 | 9 | const ( 10 | MinInformationTLVLen = 4 11 | ) 12 | 13 | // InformationTLV represents an information TLV 14 | type InformationTLV struct { 15 | InformationType uint16 16 | InformationLength uint16 17 | Information []byte 18 | } 19 | 20 | func decodeInformationTLV(buf *bytes.Buffer) (*InformationTLV, error) { 21 | infoTLV := &InformationTLV{} 22 | 23 | fields := []interface{}{ 24 | &infoTLV.InformationType, 25 | &infoTLV.InformationLength, 26 | } 27 | 28 | err := decoder.Decode(buf, fields) 29 | if err != nil { 30 | return infoTLV, err 31 | } 32 | 33 | infoTLV.Information = make([]byte, infoTLV.InformationLength) 34 | fields = []interface{}{ 35 | &infoTLV.Information, 36 | } 37 | 38 | err = decoder.Decode(buf, fields) 39 | if err != nil { 40 | return infoTLV, err 41 | } 42 | 43 | return infoTLV, nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/protocols/bmp/packet/termination_message.go: -------------------------------------------------------------------------------- 1 | package packet 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | ) 7 | 8 | // TerminationMessage represents a termination message 9 | type TerminationMessage struct { 10 | CommonHeader *CommonHeader 11 | TLVs []*InformationTLV 12 | } 13 | 14 | // MsgType returns the type of this message 15 | func (t *TerminationMessage) MsgType() uint8 { 16 | return t.CommonHeader.MsgType 17 | } 18 | 19 | func decodeTerminationMessage(buf *bytes.Buffer, ch *CommonHeader) (*TerminationMessage, error) { 20 | tm := &TerminationMessage{ 21 | CommonHeader: ch, 22 | TLVs: make([]*InformationTLV, 0, 2), 23 | } 24 | 25 | read := uint32(0) 26 | toRead := ch.MsgLength - CommonHeaderLen 27 | 28 | for read < toRead { 29 | tlv, err := decodeInformationTLV(buf) 30 | if err != nil { 31 | return nil, fmt.Errorf("unable to decode TLV: %w", err) 32 | } 33 | 34 | tm.TLVs = append(tm.TLVs, tlv) 35 | read += uint32(tlv.InformationLength) + MinInformationTLVLen 36 | } 37 | 38 | return tm, nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/route/bgp_path_cache.go: -------------------------------------------------------------------------------- 1 | package route 2 | 3 | import "sync" 4 | 5 | const initialBGPPathACacheSize = 100000 6 | 7 | var ( 8 | bgpC *bgpPathACache 9 | ) 10 | 11 | func init() { 12 | bgpC = newBGPPathACache() 13 | } 14 | 15 | type bgpPathACache struct { 16 | cache map[BGPPathA]*BGPPathA 17 | cacheMu sync.Mutex 18 | } 19 | 20 | func newBGPPathACache() *bgpPathACache { 21 | return &bgpPathACache{ 22 | cache: make(map[BGPPathA]*BGPPathA, initialBGPPathACacheSize), 23 | } 24 | } 25 | 26 | func (bgpc *bgpPathACache) get(p *BGPPathA) *BGPPathA { 27 | bgpc.cacheMu.Lock() 28 | 29 | if x, ok := bgpc.cache[*p]; ok { 30 | bgpc.cacheMu.Unlock() 31 | return x 32 | } 33 | 34 | bgpc.cache[*p] = p 35 | bgpc.cacheMu.Unlock() 36 | return p 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/accept_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | // AcceptAction accepts a path and terminates processing of filters 9 | type AcceptAction struct { 10 | } 11 | 12 | // NewAcceptAction returns a new AcceptAction 13 | func NewAcceptAction() *AcceptAction { 14 | return &AcceptAction{} 15 | } 16 | 17 | // Do applies the action 18 | func (*AcceptAction) Do(p *net.Prefix, pa *route.Path) Result { 19 | return Result{ 20 | Path: pa, 21 | Terminate: true, 22 | } 23 | } 24 | 25 | // Equal compares actions 26 | func (a *AcceptAction) Equal(b Action) bool { 27 | switch b.(type) { 28 | case *AcceptAction: 29 | default: 30 | return false 31 | } 32 | 33 | return true 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | // Action performs actions on a `route.Path` 9 | type Action interface { 10 | Do(p *net.Prefix, pa *route.Path) Result 11 | Equal(x Action) bool 12 | } 13 | 14 | // Result is a filter result 15 | type Result struct { 16 | Path *route.Path 17 | Reject bool 18 | Terminate bool 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/add_community_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/protocols/bgp/types" 6 | "github.com/bio-routing/bio-rd/route" 7 | ) 8 | 9 | type AddCommunityAction struct { 10 | communities *types.Communities 11 | } 12 | 13 | func NewAddCommunityAction(coms *types.Communities) *AddCommunityAction { 14 | return &AddCommunityAction{ 15 | communities: coms, 16 | } 17 | } 18 | 19 | func (a *AddCommunityAction) Do(p net.Prefix, pa *route.Path) Result { 20 | if pa.BGPPath == nil || len(*a.communities) == 0 { 21 | return Result{Path: pa} 22 | } 23 | 24 | modified := pa.Copy() 25 | for _, com := range *a.communities { 26 | if modified.BGPPath.Communities == nil { 27 | modified.BGPPath.Communities = &types.Communities{} 28 | } 29 | 30 | *modified.BGPPath.Communities = append(*modified.BGPPath.Communities, com) 31 | } 32 | 33 | return Result{Path: modified} 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/add_large_community_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/protocols/bgp/types" 6 | "github.com/bio-routing/bio-rd/route" 7 | ) 8 | 9 | type AddLargeCommunityAction struct { 10 | communities *types.LargeCommunities 11 | } 12 | 13 | func NewAddLargeCommunityAction(coms *types.LargeCommunities) *AddLargeCommunityAction { 14 | return &AddLargeCommunityAction{ 15 | communities: coms, 16 | } 17 | } 18 | 19 | func (a *AddLargeCommunityAction) Do(p net.Prefix, pa *route.Path) Result { 20 | if pa.BGPPath == nil || len(*a.communities) == 0 { 21 | return Result{Path: pa} 22 | } 23 | 24 | modified := pa.Copy() 25 | if modified.BGPPath.LargeCommunities == nil { 26 | modified.BGPPath.LargeCommunities = &types.LargeCommunities{} 27 | } 28 | 29 | *modified.BGPPath.LargeCommunities = append(*modified.BGPPath.LargeCommunities, *a.communities...) 30 | return Result{Path: modified} 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/as_path_prepend_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | type ASPathPrependAction struct { 9 | asn uint32 10 | times uint16 11 | } 12 | 13 | func NewASPathPrependAction(asn uint32, times uint16) *ASPathPrependAction { 14 | return &ASPathPrependAction{ 15 | asn: asn, 16 | times: times, 17 | } 18 | } 19 | 20 | func (a *ASPathPrependAction) Do(p *net.Prefix, pa *route.Path) Result { 21 | if pa.BGPPath == nil { 22 | return Result{Path: pa} 23 | } 24 | 25 | pa.BGPPath.Prepend(a.asn, a.times) 26 | return Result{Path: pa} 27 | } 28 | 29 | // Equal compares actions 30 | func (a *ASPathPrependAction) Equal(b Action) bool { 31 | switch b.(type) { 32 | case *ASPathPrependAction: 33 | default: 34 | return false 35 | } 36 | 37 | if a.asn != b.(*ASPathPrependAction).asn { 38 | return false 39 | } 40 | 41 | if a.times != b.(*ASPathPrependAction).times { 42 | return false 43 | } 44 | 45 | return true 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/reject_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | // RejectAction rejects a prefix and terminates filter processing 9 | type RejectAction struct { 10 | } 11 | 12 | func NewRejectAction() *RejectAction { 13 | return &RejectAction{} 14 | } 15 | 16 | func (*RejectAction) Do(p *net.Prefix, pa *route.Path) Result { 17 | return Result{ 18 | Path: pa, 19 | Reject: true, 20 | Terminate: true, 21 | } 22 | } 23 | 24 | // Equal compares actions 25 | func (a *RejectAction) Equal(b Action) bool { 26 | switch b.(type) { 27 | case *RejectAction: 28 | default: 29 | return false 30 | } 31 | 32 | return true 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/set_local_pref_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | type SetLocalPrefAction struct { 9 | pref uint32 10 | } 11 | 12 | func NewSetLocalPrefAction(pref uint32) *SetLocalPrefAction { 13 | return &SetLocalPrefAction{ 14 | pref: pref, 15 | } 16 | } 17 | 18 | func (a *SetLocalPrefAction) Do(p *net.Prefix, pa *route.Path) Result { 19 | if pa.BGPPath == nil { 20 | return Result{Path: pa} 21 | } 22 | 23 | modified := pa.Copy() 24 | modified.BGPPath.BGPPathA.LocalPref = a.pref 25 | return Result{Path: modified} 26 | } 27 | 28 | // Equal compares actions 29 | func (a *SetLocalPrefAction) Equal(b Action) bool { 30 | switch b.(type) { 31 | case *SetLocalPrefAction: 32 | default: 33 | return false 34 | } 35 | 36 | return true 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/set_med_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | // SetMEDAction sets the BGP MED 9 | type SetMEDAction struct { 10 | med uint32 11 | } 12 | 13 | // NewSetMEDAction creates new SetMEDAction 14 | func NewSetMEDAction(med uint32) *SetMEDAction { 15 | return &SetMEDAction{ 16 | med: med, 17 | } 18 | } 19 | 20 | // Do applies the action 21 | func (a *SetMEDAction) Do(p *net.Prefix, pa *route.Path) Result { 22 | if pa.BGPPath == nil { 23 | return Result{Path: pa} 24 | } 25 | 26 | modified := pa.Copy() 27 | modified.BGPPath.BGPPathA.MED = a.med 28 | 29 | return Result{Path: modified} 30 | } 31 | 32 | // Equal compares actions 33 | func (a *SetMEDAction) Equal(b Action) bool { 34 | switch b.(type) { 35 | case *SetMEDAction: 36 | default: 37 | return false 38 | } 39 | 40 | if a.med != b.(*SetMEDAction).med { 41 | return false 42 | } 43 | 44 | return true 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/actions/set_nexthop_action.go: -------------------------------------------------------------------------------- 1 | package actions 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | bnet "github.com/bio-routing/bio-rd/net" 6 | "github.com/bio-routing/bio-rd/route" 7 | ) 8 | 9 | type SetNextHopAction struct { 10 | ip *bnet.IP 11 | } 12 | 13 | func NewSetNextHopAction(ip *bnet.IP) *SetNextHopAction { 14 | return &SetNextHopAction{ 15 | ip: ip.Dedup(), 16 | } 17 | } 18 | 19 | func (a *SetNextHopAction) Do(p *net.Prefix, pa *route.Path) Result { 20 | if pa.BGPPath == nil { 21 | return Result{Path: pa} 22 | } 23 | 24 | modified := pa.Copy() 25 | modified.BGPPath.BGPPathA.NextHop = a.ip 26 | 27 | return Result{Path: modified} 28 | } 29 | 30 | // Equal compares actions 31 | func (a *SetNextHopAction) Equal(b Action) bool { 32 | switch b.(type) { 33 | case *SetNextHopAction: 34 | default: 35 | return false 36 | } 37 | 38 | if a.ip != b.(*SetNextHopAction).ip { 39 | return false 40 | } 41 | 42 | return true 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/chain.go: -------------------------------------------------------------------------------- 1 | package filter 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | type Chain []*Filter 9 | 10 | // Process processes a filter chain 11 | func (c Chain) Process(p *net.Prefix, pa *route.Path) (modPath *route.Path, reject bool) { 12 | mp := pa.Copy() 13 | for _, f := range c { 14 | res := f.Process(p, mp) 15 | if res.Terminate { 16 | return res.Path, res.Reject 17 | } 18 | 19 | mp = res.Path 20 | } 21 | 22 | return mp, false 23 | } 24 | 25 | // Equal compares twp filter chains 26 | func (c Chain) Equal(d Chain) bool { 27 | if len(c) != len(d) { 28 | return false 29 | } 30 | 31 | for i := range c { 32 | if !c[i].equal(d[i]) { 33 | return false 34 | } 35 | } 36 | 37 | return true 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/community_filter.go: -------------------------------------------------------------------------------- 1 | package filter 2 | 3 | import "github.com/bio-routing/bio-rd/protocols/bgp/types" 4 | 5 | type CommunityFilter struct { 6 | community uint32 7 | } 8 | 9 | func (f *CommunityFilter) Matches(coms *types.Communities) bool { 10 | for _, com := range *coms { 11 | if com == f.community { 12 | return true 13 | } 14 | } 15 | 16 | return false 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/large_community_filter.go: -------------------------------------------------------------------------------- 1 | package filter 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/protocols/bgp/types" 5 | ) 6 | 7 | // LargeCommunityFilter represents a filter for large communities 8 | type LargeCommunityFilter struct { 9 | community types.LargeCommunity 10 | } 11 | 12 | // Matches checks if a community f.community is on the filter list 13 | func (f *LargeCommunityFilter) Matches(coms *types.LargeCommunities) bool { 14 | if coms == nil { 15 | return false 16 | } 17 | 18 | for _, com := range *coms { 19 | if com == f.community { 20 | return true 21 | } 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/prefix_list.go: -------------------------------------------------------------------------------- 1 | package filter 2 | 3 | import "github.com/bio-routing/bio-rd/net" 4 | 5 | type PrefixList struct { 6 | allowed []*net.Prefix 7 | matcher PrefixMatcher 8 | } 9 | 10 | func NewPrefixList(pfxs ...*net.Prefix) *PrefixList { 11 | l := &PrefixList{ 12 | allowed: pfxs, 13 | matcher: NewExactMatcher(), 14 | } 15 | return l 16 | } 17 | 18 | func NewPrefixListWithMatcher(matcher PrefixMatcher, pfxs ...*net.Prefix) *PrefixList { 19 | l := &PrefixList{ 20 | allowed: pfxs, 21 | matcher: matcher, 22 | } 23 | return l 24 | } 25 | 26 | func (l *PrefixList) Matches(p *net.Prefix) bool { 27 | for _, a := range l.allowed { 28 | if a.Equal(p) { 29 | return true 30 | } 31 | } 32 | 33 | return false 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/filter/route_filter.go: -------------------------------------------------------------------------------- 1 | package filter 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | ) 6 | 7 | type RouteFilter struct { 8 | pattern *net.Prefix 9 | matcher PrefixMatcher 10 | } 11 | 12 | func NewRouteFilter(pattern *net.Prefix, matcher PrefixMatcher) *RouteFilter { 13 | return &RouteFilter{ 14 | pattern: pattern, 15 | matcher: matcher, 16 | } 17 | } 18 | 19 | func (f *RouteFilter) Matches(prefix *net.Prefix) bool { 20 | return f.matcher.Match(f.pattern, prefix) 21 | } 22 | 23 | func (f *RouteFilter) equal(x *RouteFilter) bool { 24 | if f.pattern != x.pattern { 25 | return false 26 | } 27 | 28 | if !f.matcher.equal(x.matcher) { 29 | return false 30 | } 31 | 32 | return true 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/rib_interface.go: -------------------------------------------------------------------------------- 1 | package routingtable 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/net" 5 | "github.com/bio-routing/bio-rd/route" 6 | ) 7 | 8 | type RIB interface { 9 | AddPath(*net.Prefix, *route.Path) 10 | RemovePath(*net.Prefix, *route.Path) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/vrf/metrics.go: -------------------------------------------------------------------------------- 1 | package vrf 2 | 3 | import ( 4 | "github.com/bio-routing/bio-rd/routingtable/vrf/metrics" 5 | ) 6 | 7 | // Metrics returns metrics for all VRFs 8 | func Metrics(r *VRFRegistry) []*metrics.VRFMetrics { 9 | vrfs := r.List() 10 | 11 | m := make([]*metrics.VRFMetrics, len(vrfs)) 12 | i := 0 13 | for _, v := range vrfs { 14 | m[i] = MetricsForVRF(v) 15 | i++ 16 | } 17 | 18 | return m 19 | } 20 | 21 | func MetricsForVRF(v *VRF) *metrics.VRFMetrics { 22 | m := &metrics.VRFMetrics{ 23 | Name: v.Name(), 24 | RD: v.RD(), 25 | RIBs: make([]*metrics.RIBMetrics, 0), 26 | } 27 | 28 | for family, rib := range v.ribs { 29 | m.RIBs = append(m.RIBs, &metrics.RIBMetrics{ 30 | Name: v.nameForRIB(rib), 31 | AFI: family.afi, 32 | SAFI: family.safi, 33 | RouteCount: rib.Count(), 34 | }) 35 | } 36 | 37 | return m 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/vrf/metrics/rib_metrics.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | // RIBMetrics represents metrics of a RIB in a VRF 4 | type RIBMetrics struct { 5 | // Name of the RIB 6 | Name string 7 | 8 | // AFI is the identifier for the address family 9 | AFI uint16 10 | 11 | // SAFI is the identifier for the sub address family 12 | SAFI uint8 13 | 14 | // Number of routes in the RIB 15 | RouteCount uint64 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/routingtable/vrf/metrics/vrf_metrics.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | // VRFMetrics represents a collection of metrics of one VRF 4 | type VRFMetrics struct { 5 | // Name of the VRF 6 | Name string 7 | 8 | // RD is the route distinguisher 9 | RD uint64 10 | 11 | // RIBs returns the RIB specific metrics 12 | RIBs []*RIBMetrics 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/util/decoder/decoder.go: -------------------------------------------------------------------------------- 1 | package decoder 2 | 3 | import ( 4 | "bytes" 5 | "encoding/binary" 6 | "fmt" 7 | ) 8 | 9 | // Decode decodes network packets 10 | func Decode(buf *bytes.Buffer, fields []interface{}) error { 11 | var err error 12 | for _, field := range fields { 13 | err = binary.Read(buf, binary.BigEndian, field) 14 | if err != nil { 15 | return fmt.Errorf("unable to read from buffer: %w", err) 16 | } 17 | } 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/util/math/max.go: -------------------------------------------------------------------------------- 1 | package math 2 | 3 | // Max returns the maximum of a and b 4 | func Max(a, b int) int { 5 | if a > b { 6 | return a 7 | } 8 | return b 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/util/math/min.go: -------------------------------------------------------------------------------- 1 | package math 2 | 3 | // Min returns the minimum of a and b 4 | func Min(a, b int) int { 5 | if a < b { 6 | return a 7 | } 8 | return b 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/bio-rd/util/net/net_addr.go: -------------------------------------------------------------------------------- 1 | package net 2 | 3 | import ( 4 | "net" 5 | 6 | bnet "github.com/bio-routing/bio-rd/net" 7 | ) 8 | 9 | // BIONetIPFromAddr retrives the IP from an net.Addr and returns the IP in BIO's internal IP type 10 | func BIONetIPFromAddr(hostPort string) (bnet.IP, error) { 11 | host, _, err := net.SplitHostPort(hostPort) 12 | if err != nil { 13 | return bnet.IP{}, err 14 | } 15 | 16 | return bnet.IPFromString(host) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/tflow2/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of tflow2 authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as one of 6 | # Organization's name 7 | # Individual's name 8 | # Individual's name 9 | # See CONTRIBUTORS for the meaning of multiple email addresses. 10 | 11 | # Please keep the list sorted. 12 | 13 | Google Inc. 14 | EXARING AG 15 | Oliver Herms 16 | Julian Kornberger 17 | Cedric Kienzler 18 | -------------------------------------------------------------------------------- /vendor/github.com/bio-routing/tflow2/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This is the official list of people who can contribute 2 | # (and typically have contributed) code to the tflow2 repository. 3 | # The AUTHORS file lists the copyright holders; this file 4 | # lists people. For example, Google employees are listed here 5 | # but not in AUTHORS, because Google holds the copyright. 6 | 7 | Oliver Herms 8 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/testall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu -o pipefail 3 | 4 | # Small convenience script for running the tests with various combinations of 5 | # arch/tags. This assumes we're running on amd64 and have qemu available. 6 | 7 | go test ./... 8 | go test -tags purego ./... 9 | GOARCH=arm64 go test 10 | GOARCH=arm64 go test -tags purego 11 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/xxhash_asm.go: -------------------------------------------------------------------------------- 1 | //go:build (amd64 || arm64) && !appengine && gc && !purego 2 | // +build amd64 arm64 3 | // +build !appengine 4 | // +build gc 5 | // +build !purego 6 | 7 | package xxhash 8 | 9 | // Sum64 computes the 64-bit xxHash digest of b with a zero seed. 10 | // 11 | //go:noescape 12 | func Sum64(b []byte) uint64 13 | 14 | //go:noescape 15 | func writeBlocks(d *Digest, b []byte) int 16 | -------------------------------------------------------------------------------- /vendor/github.com/cespare/xxhash/v2/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | //go:build appengine 2 | // +build appengine 3 | 4 | // This file contains the safe implementations of otherwise unsafe-using code. 5 | 6 | package xxhash 7 | 8 | // Sum64String computes the 64-bit xxHash digest of s with a zero seed. 9 | func Sum64String(s string) uint64 { 10 | return Sum64([]byte(s)) 11 | } 12 | 13 | // WriteString adds more data to d. It always returns len(s), nil. 14 | func (d *Digest) WriteString(s string) (n int, err error) { 15 | return d.Write([]byte(s)) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/go-xerial-snappy/.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 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/go-xerial-snappy/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5.4 5 | - 1.6.1 6 | 7 | sudo: false 8 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/go-xerial-snappy/README.md: -------------------------------------------------------------------------------- 1 | # go-xerial-snappy 2 | 3 | [![Build Status](https://travis-ci.org/eapache/go-xerial-snappy.svg?branch=master)](https://travis-ci.org/eapache/go-xerial-snappy) 4 | 5 | Xerial-compatible Snappy framing support for golang. 6 | 7 | Packages using Xerial for snappy encoding use a framing format incompatible with 8 | basically everything else in existence. This package wraps Go's built-in snappy 9 | package to support it. 10 | 11 | Apps that use this format include Apache Kafka (see 12 | https://github.com/dpkp/kafka-python/issues/126#issuecomment-35478921 for 13 | details). 14 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/queue/.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 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/queue/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | -------------------------------------------------------------------------------- /vendor/github.com/eapache/queue/README.md: -------------------------------------------------------------------------------- 1 | Queue 2 | ===== 3 | 4 | [![Build Status](https://travis-ci.org/eapache/queue.svg)](https://travis-ci.org/eapache/queue) 5 | [![GoDoc](https://godoc.org/github.com/eapache/queue?status.png)](https://godoc.org/github.com/eapache/queue) 6 | [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-active-blue.svg)](https://eapache.github.io/conduct.html) 7 | 8 | A fast Golang queue using a ring-buffer, based on the version suggested by Dariusz Górecki. 9 | Using this instead of other, simpler, queue implementations (slice+append or linked list) provides 10 | substantial memory and time benefits, and fewer GC pauses. 11 | 12 | The queue implemented here is as fast as it is in part because it is *not* thread-safe. 13 | 14 | Follows semantic versioning using https://gopkg.in/ - import from 15 | [`gopkg.in/eapache/queue.v1`](https://gopkg.in/eapache/queue.v1) 16 | for guaranteed API stability. 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/ptypes/doc.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 | // Package ptypes provides functionality for interacting with well-known types. 6 | // 7 | // Deprecated: Well-known types have specialized functionality directly 8 | // injected into the generated packages for each message type. 9 | // See the deprecation notice for each function for the suggested alternative. 10 | package ptypes 11 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Amazon.com, Inc 12 | Damian Gryski 13 | Eric Buth 14 | Google Inc. 15 | Jan Mercl <0xjnml@gmail.com> 16 | Klaus Post 17 | Rodolfo Carvalho 18 | Sebastien Binet 19 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/decode_asm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | // +build amd64 arm64 9 | 10 | package snappy 11 | 12 | // decode has the same semantics as in decode_other.go. 13 | // 14 | //go:noescape 15 | func decode(dst, src []byte) int 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/encode_asm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-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 !appengine 6 | // +build gc 7 | // +build !noasm 8 | // +build amd64 arm64 9 | 10 | package snappy 11 | 12 | // emitLiteral has the same semantics as in encode_other.go. 13 | // 14 | //go:noescape 15 | func emitLiteral(dst, lit []byte) int 16 | 17 | // emitCopy has the same semantics as in encode_other.go. 18 | // 19 | //go:noescape 20 | func emitCopy(dst []byte, offset, length int) int 21 | 22 | // extendMatch has the same semantics as in encode_other.go. 23 | // 24 | //go:noescape 25 | func extendMatch(src []byte, i, j int) int 26 | 27 | // encodeBlock has the same semantics as in encode_other.go. 28 | // 29 | //go:noescape 30 | func encodeBlock(dst, src []byte) (d int) 31 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | # test runs the test suite and vets the code. 6 | test: generate 7 | @echo "==> Running tests..." 8 | @go list $(TEST) \ 9 | | grep -v "/vendor/" \ 10 | | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} 11 | 12 | # testrace runs the race checker 13 | testrace: generate 14 | @echo "==> Running tests (race)..." 15 | @go list $(TEST) \ 16 | | grep -v "/vendor/" \ 17 | | xargs -n1 go test -timeout=60s -race ${TESTARGS} 18 | 19 | # updatedeps installs all the dependencies needed to run and build. 20 | updatedeps: 21 | @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" 22 | 23 | # generate runs `go generate` to build the dynamically generated source files. 24 | generate: 25 | @echo "==> Generating..." 26 | @find . -type f -name '.DS_Store' -delete 27 | @go list ./... \ 28 | | grep -v "/vendor/" \ 29 | | xargs -n1 go generate 30 | 31 | .PHONY: default test testrace updatedeps generate 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/flatten.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Flatten flattens the given error, merging any *Errors together into 4 | // a single *Error. 5 | func Flatten(err error) error { 6 | // If it isn't an *Error, just return the error as-is 7 | if _, ok := err.(*Error); !ok { 8 | return err 9 | } 10 | 11 | // Otherwise, make the result and flatten away! 12 | flatErr := new(Error) 13 | flatten(err, flatErr) 14 | return flatErr 15 | } 16 | 17 | func flatten(err error, flatErr *Error) { 18 | switch err := err.(type) { 19 | case *Error: 20 | for _, e := range err.Errors { 21 | flatten(e, flatErr) 22 | } 23 | default: 24 | flatErr.Errors = append(flatErr.Errors, err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/format.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // ErrorFormatFunc is a function callback that is called by Error to 9 | // turn the list of errors into a string. 10 | type ErrorFormatFunc func([]error) string 11 | 12 | // ListFormatFunc is a basic formatter that outputs the number of errors 13 | // that occurred along with a bullet point list of the errors. 14 | func ListFormatFunc(es []error) string { 15 | if len(es) == 1 { 16 | return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) 17 | } 18 | 19 | points := make([]string, len(es)) 20 | for i, err := range es { 21 | points[i] = fmt.Sprintf("* %s", err) 22 | } 23 | 24 | return fmt.Sprintf( 25 | "%d errors occurred:\n\t%s\n\n", 26 | len(es), strings.Join(points, "\n\t")) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/group.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import "sync" 4 | 5 | // Group is a collection of goroutines which return errors that need to be 6 | // coalesced. 7 | type Group struct { 8 | mutex sync.Mutex 9 | err *Error 10 | wg sync.WaitGroup 11 | } 12 | 13 | // Go calls the given function in a new goroutine. 14 | // 15 | // If the function returns an error it is added to the group multierror which 16 | // is returned by Wait. 17 | func (g *Group) Go(f func() error) { 18 | g.wg.Add(1) 19 | 20 | go func() { 21 | defer g.wg.Done() 22 | 23 | if err := f(); err != nil { 24 | g.mutex.Lock() 25 | g.err = Append(g.err, err) 26 | g.mutex.Unlock() 27 | } 28 | }() 29 | } 30 | 31 | // Wait blocks until all function calls from the Go method have returned, then 32 | // returns the multierror. 33 | func (g *Group) Wait() *Error { 34 | g.wg.Wait() 35 | g.mutex.Lock() 36 | defer g.mutex.Unlock() 37 | return g.err 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/prefix.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/errwrap" 7 | ) 8 | 9 | // Prefix is a helper function that will prefix some text 10 | // to the given error. If the error is a multierror.Error, then 11 | // it will be prefixed to each wrapped error. 12 | // 13 | // This is useful to use when appending multiple multierrors 14 | // together in order to give better scoping. 15 | func Prefix(err error, prefix string) error { 16 | if err == nil { 17 | return nil 18 | } 19 | 20 | format := fmt.Sprintf("%s {{err}}", prefix) 21 | switch err := err.(type) { 22 | case *Error: 23 | // Typed nils can reach here, so initialize if we are nil 24 | if err == nil { 25 | err = new(Error) 26 | } 27 | 28 | // Wrap each of the errors 29 | for i, e := range err.Errors { 30 | err.Errors[i] = errwrap.Wrapf(format, e) 31 | } 32 | 33 | return err 34 | default: 35 | return errwrap.Wrapf(format, err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/sort.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Len implements sort.Interface function for length 4 | func (err Error) Len() int { 5 | return len(err.Errors) 6 | } 7 | 8 | // Swap implements sort.Interface function for swapping elements 9 | func (err Error) Swap(i, j int) { 10 | err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] 11 | } 12 | 13 | // Less implements sort.Interface function for determining order 14 | func (err Error) Less(i, j int) bool { 15 | return err.Errors[i].Error() < err.Errors[j].Error() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | 11 | script: 12 | - go test -bench . -benchmem -v ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-uuid/README.md: -------------------------------------------------------------------------------- 1 | # uuid [![Build Status](https://travis-ci.org/hashicorp/go-uuid.svg?branch=master)](https://travis-ci.org/hashicorp/go-uuid) 2 | 3 | Generates UUID-format strings using high quality, _purely random_ bytes. It is **not** intended to be RFC compliant, merely to use a well-understood string representation of a 128-bit value. It can also parse UUID-format strings into their component bytes. 4 | 5 | Documentation 6 | ============= 7 | 8 | The full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/go-uuid). 9 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gofork/encoding/asn1/README.md: -------------------------------------------------------------------------------- 1 | This is a temporary repository that will be removed when the issues below are fixed in the core golang code. 2 | 3 | ## Issues 4 | * [encoding/asn1: cannot marshal into a GeneralString](https://github.com/golang/go/issues/18832) 5 | * [encoding/asn1: cannot marshal into slice of strings and pass stringtype parameter tags to members](https://github.com/golang/go/issues/18834) -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/config/error.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import "fmt" 4 | 5 | // UnsupportedDirective error. 6 | type UnsupportedDirective struct { 7 | text string 8 | } 9 | 10 | // Error implements the error interface for unsupported directives. 11 | func (e UnsupportedDirective) Error() string { 12 | return e.text 13 | } 14 | 15 | // Invalid config error. 16 | type Invalid struct { 17 | text string 18 | } 19 | 20 | // Error implements the error interface for invalid config error. 21 | func (e Invalid) Error() string { 22 | return e.text 23 | } 24 | 25 | // InvalidErrorf creates a new Invalid error. 26 | func InvalidErrorf(format string, a ...interface{}) Invalid { 27 | return Invalid{ 28 | text: fmt.Sprintf("invalid krb5 config "+format, a...), 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/crypto/rfc4757/checksum.go: -------------------------------------------------------------------------------- 1 | package rfc4757 2 | 3 | import ( 4 | "bytes" 5 | "crypto/hmac" 6 | "crypto/md5" 7 | "io" 8 | ) 9 | 10 | // Checksum returns a hash of the data in accordance with RFC 4757 11 | func Checksum(key []byte, usage uint32, data []byte) ([]byte, error) { 12 | // Create hashing key 13 | s := append([]byte(`signaturekey`), byte(0x00)) //includes zero octet at end 14 | mac := hmac.New(md5.New, key) 15 | mac.Write(s) 16 | Ksign := mac.Sum(nil) 17 | 18 | // Format data 19 | tb := UsageToMSMsgType(usage) 20 | p := append(tb, data...) 21 | h := md5.New() 22 | rb := bytes.NewReader(p) 23 | _, err := io.Copy(h, rb) 24 | if err != nil { 25 | return []byte{}, err 26 | } 27 | tmp := h.Sum(nil) 28 | 29 | // Generate HMAC 30 | mac = hmac.New(md5.New, Ksign) 31 | mac.Write(tmp) 32 | return mac.Sum(nil), nil 33 | } 34 | 35 | // HMAC returns a keyed MD5 checksum of the data 36 | func HMAC(key []byte, data []byte) []byte { 37 | mac := hmac.New(md5.New, key) 38 | mac.Write(data) 39 | return mac.Sum(nil) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/crypto/rfc4757/msgtype.go: -------------------------------------------------------------------------------- 1 | package rfc4757 2 | 3 | import "encoding/binary" 4 | 5 | // UsageToMSMsgType converts Kerberos key usage numbers to Microsoft message type encoded as a little-endian four byte slice. 6 | func UsageToMSMsgType(usage uint32) []byte { 7 | // Translate usage numbers to the Microsoft T numbers 8 | switch usage { 9 | case 3: 10 | usage = 8 11 | case 9: 12 | usage = 8 13 | case 23: 14 | usage = 13 15 | } 16 | // Now convert to bytes 17 | tb := make([]byte, 4) // We force an int32 input so we can't go over 4 bytes 18 | binary.PutUvarint(tb, uint64(usage)) 19 | return tb 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/gssapi/contextFlags.go: -------------------------------------------------------------------------------- 1 | package gssapi 2 | 3 | import "github.com/jcmturner/gofork/encoding/asn1" 4 | 5 | // GSS-API context flags assigned numbers. 6 | const ( 7 | ContextFlagDeleg = 1 8 | ContextFlagMutual = 2 9 | ContextFlagReplay = 4 10 | ContextFlagSequence = 8 11 | ContextFlagConf = 16 12 | ContextFlagInteg = 32 13 | ContextFlagAnon = 64 14 | ) 15 | 16 | // ContextFlags flags for GSSAPI 17 | // DEPRECATED - do not use 18 | type ContextFlags asn1.BitString 19 | 20 | // NewContextFlags creates a new ContextFlags instance 21 | // DEPRECATED - do not use 22 | func NewContextFlags() ContextFlags { 23 | var c ContextFlags 24 | c.BitLength = 32 25 | c.Bytes = make([]byte, 4) 26 | return c 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/addrtype/constants.go: -------------------------------------------------------------------------------- 1 | // Package addrtype provides Address type assigned numbers. 2 | package addrtype 3 | 4 | // Address type IDs. 5 | const ( 6 | IPv4 int32 = 2 7 | Directional int32 = 3 8 | ChaosNet int32 = 5 9 | XNS int32 = 6 10 | ISO int32 = 7 11 | DECNETPhaseIV int32 = 12 12 | AppleTalkDDP int32 = 16 13 | NetBios int32 = 20 14 | IPv6 int32 = 24 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/adtype/constants.go: -------------------------------------------------------------------------------- 1 | // Package adtype provides Authenticator type assigned numbers. 2 | package adtype 3 | 4 | // Authenticator type IDs. 5 | const ( 6 | ADIfRelevant int32 = 1 7 | ADIntendedForServer int32 = 2 8 | ADIntendedForApplicationClass int32 = 3 9 | ADKDCIssued int32 = 4 10 | ADAndOr int32 = 5 11 | ADMandatoryTicketExtensions int32 = 6 12 | ADInTicketExtensions int32 = 7 13 | ADMandatoryForKDC int32 = 8 14 | OSFDCE int32 = 64 15 | SESAME int32 = 65 16 | ADOSFDCEPKICertID int32 = 66 17 | ADAuthenticationStrength int32 = 70 18 | ADFXFastArmor int32 = 71 19 | ADFXFastUsed int32 = 72 20 | ADWin2KPAC int32 = 128 21 | ADEtypeNegotiation int32 = 129 22 | //Reserved values 9-63 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/asnAppTag/constants.go: -------------------------------------------------------------------------------- 1 | // Package asnAppTag provides ASN1 application tag numbers. 2 | package asnAppTag 3 | 4 | // ASN1 application tag numbers. 5 | const ( 6 | Ticket = 1 7 | Authenticator = 2 8 | EncTicketPart = 3 9 | ASREQ = 10 10 | TGSREQ = 12 11 | ASREP = 11 12 | TGSREP = 13 13 | APREQ = 14 14 | APREP = 15 15 | KRBSafe = 20 16 | KRBPriv = 21 17 | KRBCred = 22 18 | EncASRepPart = 25 19 | EncTGSRepPart = 26 20 | EncAPRepPart = 27 21 | EncKrbPrivPart = 28 22 | EncKrbCredPart = 29 23 | KRBError = 30 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/constants.go: -------------------------------------------------------------------------------- 1 | // Package iana provides Kerberos 5 assigned numbers. 2 | package iana 3 | 4 | // PVNO is the Protocol Version Number. 5 | const PVNO = 5 6 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/msgtype/constants.go: -------------------------------------------------------------------------------- 1 | // Package msgtype provides Kerberos 5 message type assigned numbers. 2 | package msgtype 3 | 4 | // KRB message type IDs. 5 | const ( 6 | KRB_AS_REQ = 10 //Request for initial authentication 7 | KRB_AS_REP = 11 //Response to KRB_AS_REQ request 8 | KRB_TGS_REQ = 12 //Request for authentication based on TGT 9 | KRB_TGS_REP = 13 //Response to KRB_TGS_REQ request 10 | KRB_AP_REQ = 14 //Application request to server 11 | KRB_AP_REP = 15 //Response to KRB_AP_REQ_MUTUAL 12 | KRB_RESERVED16 = 16 //Reserved for user-to-user krb_tgt_request 13 | KRB_RESERVED17 = 17 //Reserved for user-to-user krb_tgt_reply 14 | KRB_SAFE = 20 // Safe (checksummed) application message 15 | KRB_PRIV = 21 // Private (encrypted) application message 16 | KRB_CRED = 22 //Private (encrypted) message to forward credentials 17 | KRB_ERROR = 30 //Error response 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/iana/nametype/constants.go: -------------------------------------------------------------------------------- 1 | // Package nametype provides Kerberos 5 principal name type numbers. 2 | package nametype 3 | 4 | // Kerberos name type IDs. 5 | const ( 6 | KRB_NT_UNKNOWN int32 = 0 //Name type not known 7 | KRB_NT_PRINCIPAL int32 = 1 //Just the name of the principal as in DCE, or for users 8 | KRB_NT_SRV_INST int32 = 2 //Service and other unique instance (krbtgt) 9 | KRB_NT_SRV_HST int32 = 3 //Service with host name as instance (telnet, rcommands) 10 | KRB_NT_SRV_XHST int32 = 4 //Service with host as remaining components 11 | KRB_NT_UID int32 = 5 //Unique ID 12 | KRB_NT_X500_PRINCIPAL int32 = 6 //Encoded X.509 Distinguished name [RFC2253] 13 | KRB_NT_SMTP_NAME int32 = 7 //Name in form of SMTP email name (e.g., user@example.com) 14 | KRB_NT_ENTERPRISE int32 = 10 //Enterprise name; may be mapped to principal name 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/kadmin/changepasswddata.go: -------------------------------------------------------------------------------- 1 | package kadmin 2 | 3 | import ( 4 | "github.com/jcmturner/gofork/encoding/asn1" 5 | "github.com/jcmturner/gokrb5/v8/types" 6 | ) 7 | 8 | // ChangePasswdData is the payload to a password change message. 9 | type ChangePasswdData struct { 10 | NewPasswd []byte `asn1:"explicit,tag:0"` 11 | TargName types.PrincipalName `asn1:"explicit,optional,tag:1"` 12 | TargRealm string `asn1:"generalstring,optional,explicit,tag:2"` 13 | } 14 | 15 | // Marshal ChangePasswdData into a byte slice. 16 | func (c *ChangePasswdData) Marshal() ([]byte, error) { 17 | b, err := asn1.Marshal(*c) 18 | if err != nil { 19 | return []byte{}, err 20 | } 21 | //b = asn1tools.AddASNAppTag(b, asnAppTag.) 22 | return b, nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/pac/client_claims.go: -------------------------------------------------------------------------------- 1 | package pac 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | 7 | "github.com/jcmturner/rpc/v2/mstypes" 8 | "github.com/jcmturner/rpc/v2/ndr" 9 | ) 10 | 11 | // Claims reference: https://msdn.microsoft.com/en-us/library/hh553895.aspx 12 | 13 | // ClientClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh536365.aspx 14 | type ClientClaimsInfo struct { 15 | ClaimsSetMetadata mstypes.ClaimsSetMetadata 16 | ClaimsSet mstypes.ClaimsSet 17 | } 18 | 19 | // Unmarshal bytes into the ClientClaimsInfo struct 20 | func (k *ClientClaimsInfo) Unmarshal(b []byte) (err error) { 21 | dec := ndr.NewDecoder(bytes.NewReader(b)) 22 | m := new(mstypes.ClaimsSetMetadata) 23 | err = dec.Decode(m) 24 | if err != nil { 25 | err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSetMetadata: %v", err) 26 | return 27 | } 28 | k.ClaimsSetMetadata = *m 29 | k.ClaimsSet, err = k.ClaimsSetMetadata.ClaimsSet() 30 | if err != nil { 31 | err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSet: %v", err) 32 | } 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/pac/device_claims.go: -------------------------------------------------------------------------------- 1 | package pac 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | 7 | "github.com/jcmturner/rpc/v2/mstypes" 8 | "github.com/jcmturner/rpc/v2/ndr" 9 | ) 10 | 11 | // Claims reference: https://msdn.microsoft.com/en-us/library/hh553895.aspx 12 | 13 | // DeviceClaimsInfo implements https://msdn.microsoft.com/en-us/library/hh554226.aspx 14 | type DeviceClaimsInfo struct { 15 | ClaimsSetMetadata mstypes.ClaimsSetMetadata 16 | ClaimsSet mstypes.ClaimsSet 17 | } 18 | 19 | // Unmarshal bytes into the ClientClaimsInfo struct 20 | func (k *DeviceClaimsInfo) Unmarshal(b []byte) (err error) { 21 | dec := ndr.NewDecoder(bytes.NewReader(b)) 22 | m := new(mstypes.ClaimsSetMetadata) 23 | err = dec.Decode(m) 24 | if err != nil { 25 | err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSetMetadata: %v", err) 26 | return 27 | } 28 | k.ClaimsSetMetadata = *m 29 | k.ClaimsSet, err = k.ClaimsSetMetadata.ClaimsSet() 30 | if err != nil { 31 | err = fmt.Errorf("error unmarshaling ClientClaimsInfo ClaimsSet: %v", err) 32 | } 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/pac/s4u_delegation_info.go: -------------------------------------------------------------------------------- 1 | package pac 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | 7 | "github.com/jcmturner/rpc/v2/mstypes" 8 | "github.com/jcmturner/rpc/v2/ndr" 9 | ) 10 | 11 | // S4UDelegationInfo implements https://msdn.microsoft.com/en-us/library/cc237944.aspx 12 | type S4UDelegationInfo struct { 13 | S4U2proxyTarget mstypes.RPCUnicodeString // The name of the principal to whom the application can forward the ticket. 14 | TransitedListSize uint32 15 | S4UTransitedServices []mstypes.RPCUnicodeString `ndr:"pointer,conformant"` // List of all services that have been delegated through by this client and subsequent services or servers.. Size is value of TransitedListSize 16 | } 17 | 18 | // Unmarshal bytes into the S4UDelegationInfo struct 19 | func (k *S4UDelegationInfo) Unmarshal(b []byte) (err error) { 20 | dec := ndr.NewDecoder(bytes.NewReader(b)) 21 | err = dec.Decode(k) 22 | if err != nil { 23 | err = fmt.Errorf("error unmarshaling S4UDelegationInfo: %v", err) 24 | } 25 | return 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/gokrb5/v8/types/TypedData.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import "github.com/jcmturner/gofork/encoding/asn1" 4 | 5 | // TypedData implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 6 | type TypedData struct { 7 | DataType int32 `asn1:"explicit,tag:0"` 8 | DataValue []byte `asn1:"optional,explicit,tag:1"` 9 | } 10 | 11 | // TypedDataSequence implements RFC 4120 type: https://tools.ietf.org/html/rfc4120#section-5.9.1 12 | type TypedDataSequence []TypedData 13 | 14 | // Unmarshal bytes into the TypedDataSequence. 15 | func (a *TypedDataSequence) Unmarshal(b []byte) error { 16 | _, err := asn1.Unmarshal(b, a) 17 | return err 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/mstypes/common.go: -------------------------------------------------------------------------------- 1 | // Package mstypes provides implemnations of some Microsoft data types [MS-DTYP] https://msdn.microsoft.com/en-us/library/cc230283.aspx 2 | package mstypes 3 | 4 | // LPWSTR implements https://msdn.microsoft.com/en-us/library/cc230355.aspx 5 | type LPWSTR struct { 6 | Value string `ndr:"pointer,conformant,varying"` 7 | } 8 | 9 | // String returns the string representation of LPWSTR data type. 10 | func (s *LPWSTR) String() string { 11 | return s.Value 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/mstypes/kerb_sid_and_attributes.go: -------------------------------------------------------------------------------- 1 | package mstypes 2 | 3 | // Attributes of a security group membership and can be combined by using the bitwise OR operation. 4 | // They are used by an access check mechanism to specify whether the membership is to be used in an access check decision. 5 | const ( 6 | SEGroupMandatory = 31 7 | SEGroupEnabledByDefault = 30 8 | SEGroupEnabled = 29 9 | SEGroupOwner = 28 10 | SEGroupResource = 2 11 | //All other bits MUST be set to zero and MUST be ignored on receipt. 12 | ) 13 | 14 | // KerbSidAndAttributes implements https://msdn.microsoft.com/en-us/library/cc237947.aspx 15 | type KerbSidAndAttributes struct { 16 | SID RPCSID `ndr:"pointer"` // A pointer to an RPC_SID structure. 17 | Attributes uint32 18 | } 19 | 20 | // SetFlag sets a flag in a uint32 attribute value. 21 | func SetFlag(a *uint32, i uint) { 22 | *a = *a | (1 << (31 - i)) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/mstypes/rpc_unicode_string.go: -------------------------------------------------------------------------------- 1 | package mstypes 2 | 3 | // RPCUnicodeString implements https://msdn.microsoft.com/en-us/library/cc230365.aspx 4 | type RPCUnicodeString struct { 5 | Length uint16 // The length, in bytes, of the string pointed to by the Buffer member, not including the terminating null character if any. The length MUST be a multiple of 2. The length SHOULD equal the entire size of the Buffer, in which case there is no terminating null character. Any method that accesses this structure MUST use the Length specified instead of relying on the presence or absence of a null character. 6 | MaximumLength uint16 // The maximum size, in bytes, of the string pointed to by Buffer. The size MUST be a multiple of 2. If not, the size MUST be decremented by 1 prior to use. This value MUST not be less than Length. 7 | Value string `ndr:"pointer,conformant,varying"` 8 | } 9 | 10 | // String returns the RPCUnicodeString string value 11 | func (r *RPCUnicodeString) String() string { 12 | return r.Value 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/mstypes/user_session_key.go: -------------------------------------------------------------------------------- 1 | package mstypes 2 | 3 | // CypherBlock implements https://msdn.microsoft.com/en-us/library/cc237040.aspx 4 | type CypherBlock struct { 5 | Data [8]byte // size = 8 6 | } 7 | 8 | // UserSessionKey implements https://msdn.microsoft.com/en-us/library/cc237080.aspx 9 | type UserSessionKey struct { 10 | CypherBlock [2]CypherBlock // size = 2 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/ndr/error.go: -------------------------------------------------------------------------------- 1 | package ndr 2 | 3 | import "fmt" 4 | 5 | // Malformed implements the error interface for malformed NDR encoding errors. 6 | type Malformed struct { 7 | EText string 8 | } 9 | 10 | // Error implements the error interface on the Malformed struct. 11 | func (e Malformed) Error() string { 12 | return fmt.Sprintf("malformed NDR stream: %s", e.EText) 13 | } 14 | 15 | // Errorf formats an error message into a malformed NDR error. 16 | func Errorf(format string, a ...interface{}) Malformed { 17 | return Malformed{EText: fmt.Sprintf(format, a...)} 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/jcmturner/rpc/v2/ndr/pipe.go: -------------------------------------------------------------------------------- 1 | package ndr 2 | 3 | import ( 4 | "fmt" 5 | "reflect" 6 | ) 7 | 8 | func (dec *Decoder) fillPipe(v reflect.Value, tag reflect.StructTag) error { 9 | s, err := dec.readUint32() // read element count of first chunk 10 | if err != nil { 11 | return err 12 | } 13 | a := reflect.MakeSlice(v.Type(), 0, 0) 14 | c := reflect.MakeSlice(v.Type(), int(s), int(s)) 15 | for s != 0 { 16 | for i := 0; i < int(s); i++ { 17 | err := dec.fill(c.Index(i), tag, &[]deferedPtr{}) 18 | if err != nil { 19 | return fmt.Errorf("could not fill element %d of pipe: %v", i, err) 20 | } 21 | } 22 | s, err = dec.readUint32() // read element count of first chunk 23 | if err != nil { 24 | return err 25 | } 26 | a = reflect.AppendSlice(a, c) 27 | c = reflect.MakeSlice(v.Type(), int(s), int(s)) 28 | } 29 | v.Set(a) 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/.gitattributes: -------------------------------------------------------------------------------- 1 | * -text 2 | *.bin -text -diff 3 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/.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 | /s2/cmd/_s2sx/sfx-exe 26 | 27 | # Linux perf files 28 | perf.data 29 | perf.data.old 30 | 31 | # gdb history 32 | .gdb_history 33 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/flate/matchlen_amd64.go: -------------------------------------------------------------------------------- 1 | //go:build amd64 && !appengine && !noasm && gc 2 | // +build amd64,!appengine,!noasm,gc 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package flate 8 | 9 | // matchLen returns how many bytes match in a and b 10 | // 11 | // It assumes that: 12 | // 13 | // len(a) <= len(b) and len(a) > 0 14 | // 15 | //go:noescape 16 | func matchLen(a []byte, b []byte) int 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/flate/matchlen_generic.go: -------------------------------------------------------------------------------- 1 | //go:build !amd64 || appengine || !gc || noasm 2 | // +build !amd64 appengine !gc noasm 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package flate 8 | 9 | import ( 10 | "encoding/binary" 11 | "math/bits" 12 | ) 13 | 14 | // matchLen returns the maximum common prefix length of a and b. 15 | // a must be the shortest of the two. 16 | func matchLen(a, b []byte) (n int) { 17 | for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] { 18 | diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b) 19 | if diff != 0 { 20 | return n + bits.TrailingZeros64(diff)>>3 21 | } 22 | n += 8 23 | } 24 | 25 | for i := range a { 26 | if a[i] != b[i] { 27 | break 28 | } 29 | n++ 30 | } 31 | return n 32 | 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd s2/cmd/_s2sx/ || exit 1 4 | go generate . 5 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/huff0/.gitignore: -------------------------------------------------------------------------------- 1 | /huff0-fuzz.zip 2 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go: -------------------------------------------------------------------------------- 1 | // Package cpuinfo gives runtime info about the current CPU. 2 | // 3 | // This is a very limited module meant for use internally 4 | // in this project. For more versatile solution check 5 | // https://github.com/klauspost/cpuid. 6 | package cpuinfo 7 | 8 | // HasBMI1 checks whether an x86 CPU supports the BMI1 extension. 9 | func HasBMI1() bool { 10 | return hasBMI1 11 | } 12 | 13 | // HasBMI2 checks whether an x86 CPU supports the BMI2 extension. 14 | func HasBMI2() bool { 15 | return hasBMI2 16 | } 17 | 18 | // DisableBMI2 will disable BMI2, for testing purposes. 19 | // Call returned function to restore previous state. 20 | func DisableBMI2() func() { 21 | old := hasBMI2 22 | hasBMI2 = false 23 | return func() { 24 | hasBMI2 = old 25 | } 26 | } 27 | 28 | // HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions. 29 | func HasBMI() bool { 30 | return HasBMI1() && HasBMI2() 31 | } 32 | 33 | var hasBMI1 bool 34 | var hasBMI2 bool 35 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go: -------------------------------------------------------------------------------- 1 | //go:build amd64 && !appengine && !noasm && gc 2 | // +build amd64,!appengine,!noasm,gc 3 | 4 | package cpuinfo 5 | 6 | // go:noescape 7 | func x86extensions() (bmi1, bmi2 bool) 8 | 9 | func init() { 10 | hasBMI1, hasBMI2 = x86extensions() 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | // +build gc 3 | // +build !noasm 4 | 5 | #include "textflag.h" 6 | #include "funcdata.h" 7 | #include "go_asm.h" 8 | 9 | TEXT ·x86extensions(SB), NOSPLIT, $0 10 | // 1. determine max EAX value 11 | XORQ AX, AX 12 | CPUID 13 | 14 | CMPQ AX, $7 15 | JB unsupported 16 | 17 | // 2. EAX = 7, ECX = 0 --- see Table 3-8 "Information Returned by CPUID Instruction" 18 | MOVQ $7, AX 19 | MOVQ $0, CX 20 | CPUID 21 | 22 | BTQ $3, BX // bit 3 = BMI1 23 | SETCS AL 24 | 25 | BTQ $8, BX // bit 8 = BMI2 26 | SETCS AH 27 | 28 | MOVB AL, bmi1+0(FP) 29 | MOVB AH, bmi2+1(FP) 30 | RET 31 | 32 | unsupported: 33 | XORQ AX, AX 34 | MOVB AL, bmi1+0(FP) 35 | MOVB AL, bmi2+1(FP) 36 | RET 37 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/s2sx.mod: -------------------------------------------------------------------------------- 1 | module github.com/klauspost/compress 2 | 3 | go 1.19 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/s2sx.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudflare/bbmp2kafka/a3602cef4ea3d7ac7bc484f53e6f9873815e9f7d/vendor/github.com/klauspost/compress/s2sx.sum -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go: -------------------------------------------------------------------------------- 1 | //go:build (amd64 || arm64) && !appengine && gc && !purego && !noasm 2 | // +build amd64 arm64 3 | // +build !appengine 4 | // +build gc 5 | // +build !purego 6 | // +build !noasm 7 | 8 | package xxhash 9 | 10 | // Sum64 computes the 64-bit xxHash digest of b. 11 | // 12 | //go:noescape 13 | func Sum64(b []byte) uint64 14 | 15 | //go:noescape 16 | func writeBlocks(s *Digest, b []byte) int 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go: -------------------------------------------------------------------------------- 1 | package xxhash 2 | 3 | // Sum64String computes the 64-bit xxHash digest of s. 4 | func Sum64String(s string) uint64 { 5 | return Sum64([]byte(s)) 6 | } 7 | 8 | // WriteString adds more data to d. It always returns len(s), nil. 9 | func (d *Digest) WriteString(s string) (n int, err error) { 10 | return d.Write([]byte(s)) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go: -------------------------------------------------------------------------------- 1 | //go:build amd64 && !appengine && !noasm && gc 2 | // +build amd64,!appengine,!noasm,gc 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package zstd 8 | 9 | // matchLen returns how many bytes match in a and b 10 | // 11 | // It assumes that: 12 | // 13 | // len(a) <= len(b) and len(a) > 0 14 | // 15 | //go:noescape 16 | func matchLen(a []byte, b []byte) int 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/compress/zstd/matchlen_generic.go: -------------------------------------------------------------------------------- 1 | //go:build !amd64 || appengine || !gc || noasm 2 | // +build !amd64 appengine !gc noasm 3 | 4 | // Copyright 2019+ Klaus Post. All rights reserved. 5 | // License information can be found in the LICENSE file. 6 | 7 | package zstd 8 | 9 | import ( 10 | "encoding/binary" 11 | "math/bits" 12 | ) 13 | 14 | // matchLen returns the maximum common prefix length of a and b. 15 | // a must be the shortest of the two. 16 | func matchLen(a, b []byte) (n int) { 17 | for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] { 18 | diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b) 19 | if diff != 0 { 20 | return n + bits.TrailingZeros64(diff)>>3 21 | } 22 | n += 8 23 | } 24 | 25 | for i := range a { 26 | if a[i] != b[i] { 27 | break 28 | } 29 | n++ 30 | } 31 | return n 32 | 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/munnerz/goautoneg/Makefile: -------------------------------------------------------------------------------- 1 | include $(GOROOT)/src/Make.inc 2 | 3 | TARG=bitbucket.org/ww/goautoneg 4 | GOFILES=autoneg.go 5 | 6 | include $(GOROOT)/src/Make.pkg 7 | 8 | format: 9 | gofmt -w *.go 10 | 11 | docs: 12 | gomake clean 13 | godoc ${TARG} > README.txt 14 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/macos 2 | 3 | ### macOS ### 4 | *.DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must end with two \r 9 | Icon 10 | 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear in the root of a volume 16 | .DocumentRevisions-V100 17 | .fseventsd 18 | .Spotlight-V100 19 | .TemporaryItems 20 | .Trashes 21 | .VolumeIcon.icns 22 | .com.apple.timemachine.donotpresent 23 | 24 | # Directories potentially created on remote AFP share 25 | .AppleDB 26 | .AppleDesktop 27 | Network Trash Folder 28 | Temporary Items 29 | .apdisk 30 | 31 | # End of https://www.gitignore.io/api/macos 32 | 33 | cmd/*/*exe 34 | .idea 35 | 36 | fuzz/*.zip 37 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/internal/lz4block/decode_asm.go: -------------------------------------------------------------------------------- 1 | //go:build (amd64 || arm || arm64) && !appengine && gc && !noasm 2 | // +build amd64 arm arm64 3 | // +build !appengine 4 | // +build gc 5 | // +build !noasm 6 | 7 | package lz4block 8 | 9 | //go:noescape 10 | func decodeBlock(dst, src, dict []byte) int 11 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/internal/lz4errors/errors.go: -------------------------------------------------------------------------------- 1 | package lz4errors 2 | 3 | type Error string 4 | 5 | func (e Error) Error() string { return string(e) } 6 | 7 | const ( 8 | ErrInvalidSourceShortBuffer Error = "lz4: invalid source or destination buffer too short" 9 | ErrInvalidFrame Error = "lz4: bad magic number" 10 | ErrInternalUnhandledState Error = "lz4: unhandled state" 11 | ErrInvalidHeaderChecksum Error = "lz4: invalid header checksum" 12 | ErrInvalidBlockChecksum Error = "lz4: invalid block checksum" 13 | ErrInvalidFrameChecksum Error = "lz4: invalid frame checksum" 14 | ErrOptionInvalidCompressionLevel Error = "lz4: invalid compression level" 15 | ErrOptionClosedOrError Error = "lz4: cannot apply options on closed or in error object" 16 | ErrOptionInvalidBlockSize Error = "lz4: invalid block size" 17 | ErrOptionNotApplicable Error = "lz4: option not applicable" 18 | ErrWriterNotClosed Error = "lz4: writer not closed" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/internal/xxh32/xxh32zero_arm.go: -------------------------------------------------------------------------------- 1 | // +build !noasm 2 | 3 | package xxh32 4 | 5 | // ChecksumZero returns the 32-bit hash of input. 6 | // 7 | //go:noescape 8 | func ChecksumZero(input []byte) uint32 9 | 10 | //go:noescape 11 | func update(v *[4]uint32, buf *[16]byte, input []byte) 12 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/internal/xxh32/xxh32zero_other.go: -------------------------------------------------------------------------------- 1 | // +build !arm noasm 2 | 3 | package xxh32 4 | 5 | // ChecksumZero returns the 32-bit hash of input. 6 | func ChecksumZero(input []byte) uint32 { return checksumZeroGo(input) } 7 | 8 | func update(v *[4]uint32, buf *[16]byte, input []byte) { 9 | updateGo(v, buf, input) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/pierrec/lz4/v4/state_gen.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=aState -output state_gen.go"; DO NOT EDIT. 2 | 3 | package lz4 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[noState-0] 12 | _ = x[errorState-1] 13 | _ = x[newState-2] 14 | _ = x[readState-3] 15 | _ = x[writeState-4] 16 | _ = x[closedState-5] 17 | } 18 | 19 | const _aState_name = "noStateerrorStatenewStatereadStatewriteStateclosedState" 20 | 21 | var _aState_index = [...]uint8{0, 7, 17, 25, 34, 44, 55} 22 | 23 | func (i aState) String() string { 24 | if i >= aState(len(_aState_index)-1) { 25 | return "aState(" + strconv.FormatInt(int64(i), 10) + ")" 26 | } 27 | return _aState_name[_aState_index[i]:_aState_index[i+1]] 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/NOTICE: -------------------------------------------------------------------------------- 1 | Prometheus instrumentation library for Go applications 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | 7 | 8 | The following components are included in this product: 9 | 10 | perks - a fork of https://github.com/bmizerany/perks 11 | https://github.com/beorn7/perks 12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein 13 | See https://github.com/beorn7/perks/blob/master/README.md for license details. 14 | 15 | Go support for Protocol Buffers - Google's data interchange format 16 | http://github.com/golang/protobuf/ 17 | Copyright 2010 The Go Authors 18 | See source code for license details. 19 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/.gitignore: -------------------------------------------------------------------------------- 1 | command-line-arguments.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/README.md: -------------------------------------------------------------------------------- 1 | See [![Go Reference](https://pkg.go.dev/badge/github.com/prometheus/client_golang/prometheus.svg)](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus). 2 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/get_pid.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build !js || wasm 15 | // +build !js wasm 16 | 17 | package prometheus 18 | 19 | import "os" 20 | 21 | func getPIDFn() func() (int, error) { 22 | pid := os.Getpid() 23 | return func() (int, error) { 24 | return pid, nil 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build js && !wasm 15 | // +build js,!wasm 16 | 17 | package prometheus 18 | 19 | func getPIDFn() func() (int, error) { 20 | return func() (int, error) { 21 | return 1, nil 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/num_threads.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build !js || wasm 15 | // +build !js wasm 16 | 17 | package prometheus 18 | 19 | import "runtime" 20 | 21 | // getRuntimeNumThreads returns the number of open OS threads. 22 | func getRuntimeNumThreads() float64 { 23 | n, _ := runtime.ThreadCreateProfile(nil) 24 | return float64(n) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build js && !wasm 15 | // +build js,!wasm 16 | 17 | package prometheus 18 | 19 | // getRuntimeNumThreads returns the number of open OS threads. 20 | func getRuntimeNumThreads() float64 { 21 | return 1 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_golang/prometheus/vnext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | package prometheus 15 | 16 | type v2 struct{} 17 | 18 | // V2 is a struct that can be referenced to access experimental API that might 19 | // be present in v2 of client golang someday. It offers extended functionality 20 | // of v1 with slightly changed API. It is acceptable to use some pieces from v1 21 | // and e.g `prometheus.NewGauge` and some from v2 e.g. `prometheus.V2.NewDesc` 22 | // in the same codebase. 23 | var V2 = v2{} 24 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/client_model/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/NOTICE: -------------------------------------------------------------------------------- 1 | Common libraries shared by Prometheus Go components. 2 | Copyright 2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/common/model/model.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // Package model contains common data structures that are shared across 15 | // Prometheus components and libraries. 16 | package model 17 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/.gitignore: -------------------------------------------------------------------------------- 1 | /testdata/fixtures/ 2 | /fixtures 3 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/.golangci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | linters: 3 | enable: 4 | - errcheck 5 | - godot 6 | - gosimple 7 | - govet 8 | - ineffassign 9 | - misspell 10 | - revive 11 | - staticcheck 12 | - testifylint 13 | - unused 14 | 15 | linter-settings: 16 | godot: 17 | capital: true 18 | exclude: 19 | # Ignore "See: URL" 20 | - 'See:' 21 | misspell: 22 | locale: US 23 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Prometheus Community Code of Conduct 2 | 3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | * Johannes 'fish' Ziemke @discordianfish 2 | * Paul Gier @pgier 3 | * Ben Kochie @SuperQ 4 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Prometheus Authors 2 | # Licensed under the Apache License, Version 2.0 (the "License"); 3 | # you may not use this file except in compliance with the License. 4 | # You may obtain a copy of the License at 5 | # 6 | # http://www.apache.org/licenses/LICENSE-2.0 7 | # 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | include Makefile.common 15 | 16 | %/.unpacked: %.ttar 17 | @echo ">> extracting fixtures $*" 18 | ./ttar -C $(dir $*) -x -f $*.ttar 19 | touch $@ 20 | 21 | fixtures: testdata/fixtures/.unpacked 22 | 23 | update_fixtures: 24 | rm -vf testdata/fixtures/.unpacked 25 | ./ttar -c -f testdata/fixtures.ttar -C testdata/ fixtures/ 26 | 27 | .PHONY: build 28 | build: 29 | 30 | .PHONY: test 31 | test: testdata/fixtures/.unpacked common-test 32 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a security issue 2 | 3 | The Prometheus security policy, including how to report vulnerabilities, can be 4 | found here: 5 | 6 | 7 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cmdline.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | package procfs 15 | 16 | import ( 17 | "strings" 18 | 19 | "github.com/prometheus/procfs/internal/util" 20 | ) 21 | 22 | // CmdLine returns the command line of the kernel. 23 | func (fs FS) CmdLine() ([]string, error) { 24 | data, err := util.ReadFileNoStat(fs.proc.Path("cmdline")) 25 | if err != nil { 26 | return nil, err 27 | } 28 | 29 | return strings.Fields(string(data)), nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_armx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && (arm || arm64) 15 | // +build linux 16 | // +build arm arm64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoARM 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_loong64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux 15 | // +build linux 16 | 17 | package procfs 18 | 19 | var parseCPUInfo = parseCPUInfoLoong 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && (mips || mipsle || mips64 || mips64le) 15 | // +build linux 16 | // +build mips mipsle mips64 mips64le 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoMips 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_others.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && !386 && !amd64 && !arm && !arm64 && !loong64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x 15 | // +build linux,!386,!amd64,!arm,!arm64,!loong64,!mips,!mips64,!mips64le,!mipsle,!ppc64,!ppc64le,!riscv64,!s390x 16 | 17 | package procfs 18 | 19 | var parseCPUInfo = parseCPUInfoDummy 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && (ppc64 || ppc64le) 15 | // +build linux 16 | // +build ppc64 ppc64le 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoPPC 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && (riscv || riscv64) 15 | // +build linux 16 | // +build riscv riscv64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoRISCV 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux 15 | // +build linux 16 | 17 | package procfs 18 | 19 | var parseCPUInfo = parseCPUInfoS390X 20 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/cpuinfo_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build linux && (386 || amd64) 15 | // +build linux 16 | // +build 386 amd64 17 | 18 | package procfs 19 | 20 | var parseCPUInfo = parseCPUInfoX86 21 | -------------------------------------------------------------------------------- /vendor/github.com/prometheus/procfs/fs_statfs_notype.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Prometheus Authors 2 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 6 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | //go:build !freebsd && !linux 15 | // +build !freebsd,!linux 16 | 17 | package procfs 18 | 19 | // isRealProc returns true on architectures that don't have a Type argument 20 | // in their Statfs_t struct 21 | func isRealProc(mountPoint string) (bool, error) { 22 | return true, nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.gitignore: -------------------------------------------------------------------------------- 1 | *.[68] 2 | *.a 3 | *.out 4 | *.swp 5 | _obj 6 | _testmain.go 7 | cmd/metrics-bench/metrics-bench 8 | cmd/metrics-example/metrics-example 9 | cmd/never-read/never-read 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.3" 5 | - "1.4" 6 | - "1.5" 7 | - "1.6" 8 | - "1.7" 9 | - "1.8" 10 | - "1.9" 11 | - "1.10" 12 | - "1.11" 13 | - "1.12" 14 | - "1.13" 15 | - "1.14" 16 | - "1.15" 17 | 18 | script: 19 | - ./validate.sh 20 | 21 | # this should give us faster builds according to 22 | # http://docs.travis-ci.com/user/migrating-from-legacy/ 23 | sudo: false 24 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/json.go: -------------------------------------------------------------------------------- 1 | package metrics 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "time" 7 | ) 8 | 9 | // MarshalJSON returns a byte slice containing a JSON representation of all 10 | // the metrics in the Registry. 11 | func (r *StandardRegistry) MarshalJSON() ([]byte, error) { 12 | return json.Marshal(r.GetAll()) 13 | } 14 | 15 | // WriteJSON writes metrics from the given registry periodically to the 16 | // specified io.Writer as JSON. 17 | func WriteJSON(r Registry, d time.Duration, w io.Writer) { 18 | for _ = range time.Tick(d) { 19 | WriteJSONOnce(r, w) 20 | } 21 | } 22 | 23 | // WriteJSONOnce writes metrics from the given registry to the specified 24 | // io.Writer as JSON. 25 | func WriteJSONOnce(r Registry, w io.Writer) { 26 | json.NewEncoder(w).Encode(r) 27 | } 28 | 29 | func (p *PrefixedRegistry) MarshalJSON() ([]byte, error) { 30 | return json.Marshal(p.GetAll()) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/metrics.go: -------------------------------------------------------------------------------- 1 | // Go port of Coda Hale's Metrics library 2 | // 3 | // 4 | // 5 | // Coda Hale's original work: 6 | package metrics 7 | 8 | // UseNilMetrics is checked by the constructor functions for all of the 9 | // standard metrics. If it is true, the metric returned is a stub. 10 | // 11 | // This global kill-switch helps quantify the observer effect and makes 12 | // for less cluttered pprof profiles. 13 | var UseNilMetrics bool = false 14 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_cgo.go: -------------------------------------------------------------------------------- 1 | // +build cgo 2 | // +build !appengine 3 | 4 | package metrics 5 | 6 | import "runtime" 7 | 8 | func numCgoCall() int64 { 9 | return runtime.NumCgoCall() 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return memStats.GCCPUFraction 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go: -------------------------------------------------------------------------------- 1 | // +build !cgo appengine 2 | 3 | package metrics 4 | 5 | func numCgoCall() int64 { 6 | return 0 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go: -------------------------------------------------------------------------------- 1 | // +build !go1.5 2 | 3 | package metrics 4 | 5 | import "runtime" 6 | 7 | func gcCPUFraction(memStats *runtime.MemStats) float64 { 8 | return 0 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/rcrowley/go-metrics/validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # check there are no formatting issues 6 | GOFMT_LINES=`gofmt -l . | wc -l | xargs` 7 | test $GOFMT_LINES -eq 0 || echo "gofmt needs to be run, ${GOFMT_LINES} files have issues" 8 | 9 | # run the tests for the root package 10 | go test -race . 11 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | vendor 3 | 4 | .idea/ 5 | -------------------------------------------------------------------------------- /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 | go: 1.15.x 8 | os: linux 9 | install: 10 | - ./travis/install.sh 11 | script: 12 | - cd ci 13 | - go run mage.go -v -w ../ crossBuild 14 | - go run mage.go -v -w ../ lint 15 | - go run mage.go -v -w ../ test 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/buffer_pool.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bytes" 5 | "sync" 6 | ) 7 | 8 | var ( 9 | bufferPool BufferPool 10 | ) 11 | 12 | type BufferPool interface { 13 | Put(*bytes.Buffer) 14 | Get() *bytes.Buffer 15 | } 16 | 17 | type defaultPool struct { 18 | pool *sync.Pool 19 | } 20 | 21 | func (p *defaultPool) Put(buf *bytes.Buffer) { 22 | p.pool.Put(buf) 23 | } 24 | 25 | func (p *defaultPool) Get() *bytes.Buffer { 26 | return p.pool.Get().(*bytes.Buffer) 27 | } 28 | 29 | // SetBufferPool allows to replace the default logrus buffer pool 30 | // to better meets the specific needs of an application. 31 | func SetBufferPool(bp BufferPool) { 32 | bufferPool = bp 33 | } 34 | 35 | func init() { 36 | SetBufferPool(&defaultPool{ 37 | pool: &sync.Pool{ 38 | New: func() interface{} { 39 | return new(bytes.Buffer) 40 | }, 41 | }, 42 | }) 43 | } 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TIOCGETA 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | func isTerminal(fd int) bool { 6 | return false 7 | } 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_unix.go: -------------------------------------------------------------------------------- 1 | // +build linux aix zos 2 | // +build !js 3 | 4 | package logrus 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | const ioctlReadTermios = unix.TCGETS 9 | 10 | func isTerminal(fd int) bool { 11 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) 12 | return err == nil 13 | } 14 | -------------------------------------------------------------------------------- /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 | 9 | "golang.org/x/sys/windows" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | handle := windows.Handle(v.Fd()) 16 | var mode uint32 17 | if err := windows.GetConsoleMode(handle, &mode); err != nil { 18 | return false 19 | } 20 | mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING 21 | if err := windows.SetConsoleMode(handle, mode); err != nil { 22 | return false 23 | } 24 | return true 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | h2i/h2i 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/config_pre_go124.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | //go:build !go1.24 6 | 7 | package http2 8 | 9 | import "net/http" 10 | 11 | // Pre-Go 1.24 fallback. 12 | // The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24. 13 | 14 | func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {} 15 | 16 | func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {} 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/timer.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | package http2 5 | 6 | import "time" 7 | 8 | // A timer is a time.Timer, as an interface which can be replaced in tests. 9 | type timer = interface { 10 | C() <-chan time.Time 11 | Reset(d time.Duration) bool 12 | Stop() bool 13 | } 14 | 15 | // timeTimer adapts a time.Timer to the timer interface. 16 | type timeTimer struct { 17 | *time.Timer 18 | } 19 | 20 | func (t timeTimer) C() <-chan time.Time { return t.Timer.C } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 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 | //go:build go1.18 8 | 9 | package idna 10 | 11 | // Transitional processing is disabled by default in Go 1.18. 12 | // https://golang.org/issue/47510 13 | const transitionalLookup = false 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/pre_go118.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2021 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 | //go:build !go1.18 8 | 9 | package idna 10 | 11 | const transitionalLookup = true 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/trie12.0.0.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2016 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 | //go:build !go1.16 8 | 9 | package idna 10 | 11 | // appendMapping appends the mapping for the respective rune. isMapped must be 12 | // true. A mapping is a categorization of a rune as defined in UTS #46. 13 | func (c info) appendMapping(b []byte, s string) []byte { 14 | index := int(c >> indexShift) 15 | if c&xorBit == 0 { 16 | s := mappings[index:] 17 | return append(b, s[1:s[0]+1]...) 18 | } 19 | b = append(b, s...) 20 | if c&inlineXOR == inlineXOR { 21 | // TODO: support and handle two-byte inline masks 22 | b[len(b)-1] ^= byte(index) 23 | } else { 24 | for p := len(b) - int(xorData[index]); p < len(b); p++ { 25 | index++ 26 | b[p] ^= xorData[index] 27 | } 28 | } 29 | return b 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/idna/trie13.0.0.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | // Copyright 2016 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 | //go:build go1.16 8 | 9 | package idna 10 | 11 | // appendMapping appends the mapping for the respective rune. isMapped must be 12 | // true. A mapping is a categorization of a rune as defined in UTS #46. 13 | func (c info) appendMapping(b []byte, s string) []byte { 14 | index := int(c >> indexShift) 15 | if c&xorBit == 0 { 16 | p := index 17 | return append(b, mappings[mappingIndex[p]:mappingIndex[p+1]]...) 18 | } 19 | b = append(b, s...) 20 | if c&inlineXOR == inlineXOR { 21 | // TODO: support and handle two-byte inline masks 22 | b[len(b)-1] ^= byte(index) 23 | } else { 24 | for p := len(b) - int(xorData[index]); p < len(b); p++ { 25 | index++ 26 | b[p] ^= xorData[index] 27 | } 28 | } 29 | return b 30 | } 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | type Signal = syscall.Signal 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /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 | //go:build gc 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for 386 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for AMD64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-28 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 21 | B syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 24 | B syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 27 | B syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for ARM64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ppc64, BSD 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // System call support for RISCV64 BSD 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 21 | JMP syscall·Syscall9(SB) 22 | 23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 24 | JMP syscall·RawSyscall(SB) 25 | 26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 27 | JMP syscall·RawSyscall6(SB) 28 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64 || ppc64le) && gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 17 | BL runtime·entersyscall(SB) 18 | MOVD a1+8(FP), R3 19 | MOVD a2+16(FP), R4 20 | MOVD a3+24(FP), R5 21 | MOVD R0, R6 22 | MOVD R0, R7 23 | MOVD R0, R8 24 | MOVD trap+0(FP), R9 // syscall entry 25 | SYSCALL R9 26 | MOVD R3, r1+32(FP) 27 | MOVD R4, r2+40(FP) 28 | BL runtime·exitsyscall(SB) 29 | RET 30 | 31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 32 | MOVD a1+8(FP), R3 33 | MOVD a2+16(FP), R4 34 | MOVD a3+24(FP), R5 35 | MOVD R0, R6 36 | MOVD R0, R7 37 | MOVD R0, R8 38 | MOVD trap+0(FP), R9 // syscall entry 39 | SYSCALL R9 40 | MOVD R3, r1+32(FP) 41 | MOVD R4, r2+40(FP) 42 | RET 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.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 | //go:build gc 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for mips64, 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 | -------------------------------------------------------------------------------- /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 | //go:build gc 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/auxv_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2025 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 | //go:build !go1.21 && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Auxv() ([][2]uintptr, error) { 12 | return nil, syscall.ENOTSUP 13 | } 14 | -------------------------------------------------------------------------------- /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 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /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 | //go:build aix && ppc 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev >> 16) & 0xffff) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32(dev & 0xffff) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | return uint64(((major) << 16) | (minor)) 26 | } 27 | -------------------------------------------------------------------------------- /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 | //go:build aix && ppc64 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used AIX. 9 | 10 | package unix 11 | 12 | // Major returns the major component of a Linux device number. 13 | func Major(dev uint64) uint32 { 14 | return uint32((dev & 0x3fffffff00000000) >> 32) 15 | } 16 | 17 | // Minor returns the minor component of a Linux device number. 18 | func Minor(dev uint64) uint32 { 19 | return uint32((dev & 0x00000000ffffffff) >> 0) 20 | } 21 | 22 | // Mkdev returns a Linux device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | var DEVNO64 uint64 26 | DEVNO64 = 0x8000000000000000 27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 28 | } 29 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build zos && s390x 6 | 7 | // Functions to access/create device major and minor numbers matching the 8 | // encoding used by z/OS. 9 | // 10 | // The information below is extracted and adapted from macros. 11 | 12 | package unix 13 | 14 | // Major returns the major component of a z/OS device number. 15 | func Major(dev uint64) uint32 { 16 | return uint32((dev >> 16) & 0x0000FFFF) 17 | } 18 | 19 | // Minor returns the minor component of a z/OS device number. 20 | func Minor(dev uint64) uint32 { 21 | return uint32(dev & 0x0000FFFF) 22 | } 23 | 24 | // Mkdev returns a z/OS device number generated from the given major and minor 25 | // components. 26 | func Mkdev(major, minor uint32) uint64 { 27 | return (uint64(major) << 16) | uint64(minor) 28 | } 29 | -------------------------------------------------------------------------------- /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 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /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 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 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 | -------------------------------------------------------------------------------- /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 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.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 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | // Set adds fd to the set fds. 10 | func (fds *FdSet) Set(fd int) { 11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 12 | } 13 | 14 | // Clear removes fd from the set fds. 15 | func (fds *FdSet) Clear(fd int) { 16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 17 | } 18 | 19 | // IsSet returns whether fd is in the set fds. 20 | func (fds *FdSet) IsSet(fd int) bool { 21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 22 | } 23 | 24 | // Zero clears the set fds. 25 | func (fds *FdSet) Zero() { 26 | for i := range fds.Bits { 27 | fds.Bits[i] = 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mmap_nomremap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2023 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 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos 6 | 7 | package unix 8 | 9 | var mapper = &mmapper{ 10 | active: make(map[*byte][]byte), 11 | mmap: mmap, 12 | munmap: munmap, 13 | } 14 | -------------------------------------------------------------------------------- /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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build darwin && !ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 10 | return ptrace1(request, pid, addr, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 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 | //go:build ios 6 | 7 | package unix 8 | 9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 10 | return ENOTSUP 11 | } 12 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.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 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | 7 | package unix 8 | 9 | // ReadDirent reads directory entries from fd and writes them into buf. 10 | func ReadDirent(fd int, buf []byte) (n int, err error) { 11 | return Getdents(fd, buf) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.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 | //go:build darwin || zos 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // ReadDirent reads directory entries from fd and writes them into buf. 12 | func ReadDirent(fd int, buf []byte) (n int, err error) { 13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 15 | // actual system call is getdirentries64, 64 is a good guess. 16 | // TODO(rsc): Can we use a single global basep for all calls? 17 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 18 | return Getdirentries(fd, buf, base) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.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 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build hurd 6 | 7 | package unix 8 | 9 | /* 10 | #include 11 | int ioctl(int, unsigned long int, uintptr_t); 12 | */ 13 | import "C" 14 | import "unsafe" 15 | 16 | func ioctl(fd int, req uint, arg uintptr) (err error) { 17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) 18 | if r0 == -1 && er != nil { 19 | err = er 20 | } 21 | return 22 | } 23 | 24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { 25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) 26 | if r0 == -1 && er != nil { 27 | err = er 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_hurd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build 386 && hurd 6 | 7 | package unix 8 | 9 | const ( 10 | TIOCGETA = 0x62251713 11 | ) 12 | 13 | type Winsize struct { 14 | Row uint16 15 | Col uint16 16 | Xpixel uint16 17 | Ypixel uint16 18 | } 19 | 20 | type Termios struct { 21 | Iflag uint32 22 | Oflag uint32 23 | Cflag uint32 24 | Lflag uint32 25 | Cc [20]uint8 26 | Ispeed int32 27 | Ospeed int32 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 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 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | 7 | package unix 8 | 9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 10 | // values. 11 | 12 | //sys Alarm(seconds uint) (remaining uint, err error) 13 | -------------------------------------------------------------------------------- /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 | //go:build amd64 && linux && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //go:noescape 12 | func gettimeofday(tv *Timeval) (err syscall.Errno) 13 | -------------------------------------------------------------------------------- /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 | //go:build linux && gc 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 | -------------------------------------------------------------------------------- /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 | //go:build linux && gc && 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.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 | //go:build arm && gc && linux 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 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 32 | msghdr.Iovlen = int32(length) 33 | } 34 | 35 | func (cmsg *Cmsghdr) SetLen(length int) { 36 | cmsg.Len = uint32(length) 37 | } 38 | -------------------------------------------------------------------------------- /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 | //go: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 (msghdr *Msghdr) SetIovlen(length int) { 22 | msghdr.Iovlen = int32(length) 23 | } 24 | 25 | func (cmsg *Cmsghdr) SetLen(length int) { 26 | cmsg.Len = uint32(length) 27 | } 28 | -------------------------------------------------------------------------------- /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 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /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 | //go:build linux && (ppc64le || ppc64) && gc 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 12 | return syscall.Syscall(trap, a1, a2, a3) 13 | } 14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 16 | } 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.RawSyscall(trap, a1, a2, a3) 19 | } 20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build linux 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // SysvShmCtl performs control operations on the shared memory segment 12 | // specified by id. 13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 14 | if runtime.GOARCH == "arm" || 15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 16 | cmd |= ipc_64 17 | } 18 | 19 | return shmctl(id, cmd, desc) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 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 | //go:build (darwin && !ios) || zos 6 | 7 | package unix 8 | 9 | // SysvShmCtl performs control operations on the shared memory segment 10 | // specified by id. 11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 12 | return shmctl(id, cmd, desc) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | //go:build linux && go1.24 6 | 7 | package unix 8 | 9 | import _ "unsafe" 10 | 11 | //go:linkname vgetrandom runtime.vgetrandom 12 | //go:noescape 13 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 | //go:build !linux || !go1.24 6 | 7 | package unix 8 | 9 | func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { 10 | return -1, false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) 17 | } 18 | -------------------------------------------------------------------------------- /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 | //go:build windows 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | type Errno = syscall.Errno 12 | type SysProcAttr = syscall.SysProcAttr 13 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go:build generate 6 | 7 | package windows 8 | 9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 10 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.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 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /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 | //go: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 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 gRPC authors. 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 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | For information on gRPC Security Policy and reporting potentional security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md). 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | //go:generate ./regenerate.sh 20 | 21 | /* 22 | Package grpc implements an RPC system called gRPC. 23 | 24 | See grpc.io for more information about gRPC. 25 | */ 26 | package grpc // import "google.golang.org/grpc" 27 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | /* 5 | * 6 | * Copyright 2018 gRPC authors. 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * 20 | */ 21 | 22 | package channelz 23 | 24 | // GetSocketOption gets the socket option info of the conn. 25 | func GetSocketOption(c interface{}) *SocketOptionData { 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2022 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 grpcsync 20 | 21 | import ( 22 | "sync" 23 | ) 24 | 25 | // OnceFunc returns a function wrapping f which ensures f is only executed 26 | // once even if the returned function is executed multiple times. 27 | func OnceFunc(f func()) func() { 28 | var once sync.Once 29 | return func() { 30 | once.Do(f) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2021 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 grpcutil provides utility functions used across the gRPC codebase. 20 | package grpcutil 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/grpcutil/regex.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2021 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 grpcutil 20 | 21 | import "regexp" 22 | 23 | // FullMatchWithRegex returns whether the full text matches the regex provided. 24 | func FullMatchWithRegex(re *regexp.Regexp, text string) bool { 25 | if len(text) == 0 { 26 | return re.MatchString(text) 27 | } 28 | re.Longest() 29 | rem := re.FindString(text) 30 | return len(rem) == len(text) 31 | } 32 | -------------------------------------------------------------------------------- /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.56.3" 23 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/protojson/doc.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 protojson marshals and unmarshals protocol buffer messages as JSON 6 | // format. It follows the guide at 7 | // https://protobuf.dev/programming-guides/proto3#json. 8 | // 9 | // This package produces a different output than the standard [encoding/json] 10 | // package, which does not operate correctly on protocol buffer messages. 11 | package protojson 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.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 prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 editiondefaults contains the binary representation of the editions 6 | // defaults. 7 | package editiondefaults 8 | 9 | import _ "embed" 10 | 11 | //go:embed editions_defaults.binpb 12 | var Defaults []byte 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudflare/bbmp2kafka/a3602cef4ea3d7ac7bc484f53e6f9873815e9f7d/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/editionssupport/editions.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 editionssupport defines constants for editions that are supported. 6 | package editionssupport 7 | 8 | import "google.golang.org/protobuf/types/descriptorpb" 9 | 10 | const ( 11 | Minimum = descriptorpb.Edition_EDITION_PROTO2 12 | Maximum = descriptorpb.Edition_EDITION_2023 13 | 14 | // MaximumKnown is the maximum edition that is known to Go Protobuf, but not 15 | // declared as supported. In other words: end users cannot use it, but 16 | // testprotos inside Go Protobuf can. 17 | MaximumKnown = descriptorpb.Edition_EDITION_2024 18 | ) 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.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 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.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 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.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 genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.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 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" 14 | 15 | // Names for google.protobuf.FieldMask. 16 | const ( 17 | FieldMask_message_name protoreflect.Name = "FieldMask" 18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" 19 | ) 20 | 21 | // Field names for google.protobuf.FieldMask. 22 | const ( 23 | FieldMask_Paths_field_name protoreflect.Name = "paths" 24 | 25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" 26 | ) 27 | 28 | // Field numbers for google.protobuf.FieldMask. 29 | const ( 30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.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 genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | UnknownFields_goname = "unknownFields" 15 | UnknownFieldsA_goname = "XXX_unrecognized" 16 | 17 | ExtensionFields_goname = "extensionFields" 18 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 19 | ExtensionFieldsB_goname = "XXX_extensions" 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.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 genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/name.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 genid 6 | 7 | const ( 8 | NoUnkeyedLiteral_goname = "noUnkeyedLiteral" 9 | NoUnkeyedLiteralA_goname = "XXX_NoUnkeyedLiteral" 10 | 11 | BuilderSuffix_goname = "_builder" 12 | ) 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.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 genid 6 | 7 | import "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.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 impl 6 | 7 | // When using unsafe pointers, we can just treat enum values as int32s. 8 | 9 | var ( 10 | coderEnumNoZero = coderInt32NoZero 11 | coderEnum = coderInt32 12 | coderEnumPtr = coderInt32Ptr 13 | coderEnumSlice = coderInt32Slice 14 | coderEnumPackedSlice = coderInt32PackedSlice 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.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 impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/protolazy/pointer_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2024 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 protolazy 6 | 7 | import ( 8 | "sync/atomic" 9 | "unsafe" 10 | ) 11 | 12 | func atomicLoadIndex(p **[]IndexEntry) *[]IndexEntry { 13 | return (*[]IndexEntry)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) 14 | } 15 | func atomicStoreIndex(p **[]IndexEntry, v *[]IndexEntry) { 16 | atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.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 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.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 protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | --------------------------------------------------------------------------------